Closed afonsofsgomes closed 3 years ago
If I understand your intention corretly: You want to create a chart with two lines, one for the temperature, the other one for the humidity correct? It's a bit tricky to use such a timestamp for the x axis using chartist.js, but I can create a JSFiddle which shows you how to create such a chart.
Yes, correct!
Okay here's an example of creating a single combined chart or two charts by using your ajax data: https://jsfiddle.net/kf5cxp21/16/
I closed this issue, because there was no recent activity. If there are any question, feel free to comment or reopen this issue.
Hi! I would like to know how can I insert values incoming from AJAX Request in array.
Here is the example:
var chart = new Chartist.Line('.ct-chart', { labels: [1, 2, 3], series: [ [ {meta: 'description', value: value1}, ] ] }, { plugins: [ Chartist.plugins.tooltip() ] });
value1 has this values:
{"hour":"23:29:26","temperature":"19.00","humidity":"71.50"}
Any idea?