Reputation: 41
In chartkick's column_chart, I want to remove the axes of the chart as shown in the attached image.
I tried this code, but I couldn't hide axis.
<%= column_chart data, library: { hAxis: { textPosition: 'none' },vAxis: { textPosition: 'none' } } %>
Upvotes: 2
Views: 648
Reputation: 500
Maybe depends on the underlying library, but when using chartjs this is what worked
<%= column_chart data, library: { scales: {
x: {
ticks: {
display: false
}
},
y: {
ticks: {
display: false
}
}
} } %>
```
Upvotes: 1
Reputation: 41
The problem is now solved.
<%= column_chart data, library: { scales: { xAxes: [display: false], yAxes: [display: false] } %>
Upvotes: 2