[Chartjs]-Chartkick chart.js change colour of axis and colour of axis title

1๐Ÿ‘

โœ…

Ok, it seem like chartkick with chart.js has some limitations. So I switch to google charts.
I removed the chart.js code in my application.html.erb and application.js and replace it with google chart code.
To change my line chart this page was helpful.
Below is the working code in my view:

<%= line_chart $tweet_day, id:"line_chart $tweet_day",xtitle: "Day of the Week", ytitle: "Tweets Count", colors: ["#C2F4FF"], download: "tweet_day", refresh: 60, 
  library: { 
    vAxis: { baselineColor: "#F76161",  gridlines: {Color: "" }, textStyle: { color: "#76BDD1"}, titleTextStyle: {color: "#F76161"} }, 
    hAxis: { baselineColor: "#F76161" , gridlines: {Color: "" }, textStyle: { color: "#76BDD1"} , titleTextStyle: {color: "#F76161"} } } %>   

hope it help someone.

Leave a comment