We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug X-axis converts the values Uge 37'to the integer 2037 for some reason. I expect the x-axis to have Uge 37, Uge 38 ... Uge 49 etc.
Uge 37
2037
Uge 38
Uge 49
If I add a letter at the end of one of the points, then nothing gets converted. How can I prevent the x-axis from being cast to integers?
To reproduce Steps to reproduce.
inspection_data = JSON.parse("[[\"Uge 37\",38716],[\"Uge 38\",38391],[\"Uge 39\",39206],[\"Uge 40\",41988],[\"Uge 41\",40607],[\"Uge 42\",36551],[\"Uge 43\",37248],[\"Uge 44\",37976],[\"Uge 45\",38158],[\"Uge 46\",36465],[\"Uge 47\",35085],[\"Uge 48\",31513],[\"Uge 49\",33685]]") @card = { chart_type: 'area_chart', data: inspection_data, options: { colors: [['#ff8a8c']], suffix: ' syn', legend: false, thousands: '.' } } = send(@card[:chart_type], @card[:data], **@card[:options])
HTML generated by Chartkick
<script> (function() { if (document.documentElement.hasAttribute("data-turbolinks-preview")) return; if (document.documentElement.hasAttribute("data-turbo-preview")) return; var createChart = function() { new Chartkick["AreaChart"]("chart-2", [["Uge 37",38716],["Uge 38",38391],["Uge 39",39206],["Uge 40",41988],["Uge 41",40607],["Uge 42",36551],["Uge 43",37248],["Uge 44",37976],["Uge 45",38158],["Uge 46",36465],["Uge 47",35085],["Uge 48",31513],["Uge 49",33685]], {"colors":[["#ff8a8c"]],"suffix":" syn","legend":false,"thousands":"."}); }; if ("Chartkick" in window) { createChart(); } else { window.addEventListener("chartkick:load", createChart, true); } })(); </script>
The text was updated successfully, but these errors were encountered:
Hi @Tobias-Knudsen, check out the discrete option.
discrete
Sorry, something went wrong.
No branches or pull requests
Describe the bug
X-axis converts the values
Uge 37
'to the integer2037
for some reason. I expect the x-axis to haveUge 37
,Uge 38
...Uge 49
etc.If I add a letter at the end of one of the points, then nothing gets converted. How can I prevent the x-axis from being cast to integers?
To reproduce
Steps to reproduce.
HTML generated by Chartkick
The text was updated successfully, but these errors were encountered: