Closed dahousecat closed 4 years ago
Have you provided any value for values
?
chart_config: {
values: ['hours', 'production'], // This option line
date: {
key: 'date',
inputFormat: '%Y',
outputFormat: '%Y',
},
},
values
must be an string array matching the field names that you want to draw:
chart_data: [
{hours: 238, production: 134, date: 2000},
]
I see, got it - I just copied the sample code and expected it to work. I totally missed the little caveat saying:
To work with this data, configuration must be date: { key: "when", inputFormat: "%Y-%m-%d"}, values: ["iphone","android"].
Thanks for the swift reply!
Ok, great.
I'll add some error messages to help in these cases.
Just trying to create a line graph using sample data and configuration as supplied on this page but gettting the error:
this.cfg.values.forEach is not a function
When I inspect the code I can see that this.cfg.values is false