I'm using ChartKick gem and Google Charts library. HAML:
= line_chart @data.group(:date).average(:measure), discrete: true, library: {hAxis: {slantedText: true, slantedTextAngle: 45, gridlines: {units: {years: {format: 'yy'}}}}}
Results so far:
Docs: https://developers.google.com/chart/interactive/docs/gallery/linechart#configuration-options and http://icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details
I also tried
hAxis: {format: 'yy-MM-dd', slantedText: true, slantedTextAngle: 45}
Also, how do I stop from truncating the labels?