ChartJS - array of data longer than number of labels?

I am making a line chart for charts. I am trying to figure out how / if I can pass a longer array of data than there are labels for. So basically time series in ChartJS?

Something like: http://www.highcharts.com/demo/line-time-series

I have something like:

    var data = {
labels: [1,2,3],
datasets: [
    {
        label: "My First dataset",
        fillColor: "rgba(151,187,205,0.2)",
        strokeColor: "rgba(151,187,205,1)",
        pointColor: "rgba(151,187,205,1)",
        pointStrokeColor: "#fff",
        pointHighlightFill: "#fff",
        pointHighlightStroke: "rgba(220,220,220,1)",
        data: [0, 1, 1, 0, 0, 1, 0,]
    }
]
};

      

Where labels 1,2,3 represent hours. I want to display slightly more accurate data than one hour (say every minute or so), but shouldn't be flagged.

+3
javascript charts linechart


source to share


No one has answered this question yet

Check out similar questions:

663
How to find the sum of an array of numbers
1
ASP Chart is not formatted correctly if XValueType = "Time" and the series contains a DateTime that spans several days
1
Highcharts - how to create multiple y-axis and group data series
1
How to feed hourly and minute data in chartJS
1
Chartjs.org Display only chart on one page
1
Chartjs X axis sticker and tick
0
Highcharts Error # 15: www.highcharts.com/errors/15
0
Is there a way to insert multiple lines, with labels, dynamically, into a ChartJS bar chart?
0
Custom line chart
0
Chart chart chart



All Articles
Loading...
X
Show
Funny
Dev
Pics