I’m trying to migrate a chart from Chartkick to a Chart.js, as I plan to “merge” charts in the future and in Chartkick that function doesn’t exist. I’m having trouble understanding how data coming from the Rails controller is used in the “date” field when you write a function from a Charts.js with the same data as the Chartkick. Does anyone have this answer?
In chartkick, I have the following function:
<% = line_chart charts_loading_stock_days_path (start_date: @start_date, end_date: @end_date, granularity: @ granularity, supermarket: @supermarket, product: @product, family: @ family), download: true, colors: ["# FFD700"]% >
How would that look in Chart.js?
Thanks for the help and sorry if the question is very basic.