JavaScript
var dataArray = [
{ErrorDate: "2017-09-07", Brand: "Toyota", Count: 3},
{ErrorDate: "2017-09-02", Brand: "Ford", Count: 258},
{ErrorDate: "2017-09-03", Brand: "Ford", Count: 239},
{ErrorDate: "2017-09-04", Brand: "Ford", Count: 197},
{ErrorDate: "2017-09-05", Brand: "Ford", Count: 187},
{ErrorDate: "2017-09-06", Brand: "Ford", Count: 418},
{ErrorDate: "2017-09-07", Brand: "Ford", Count: 344},
{ErrorDate: "2017-09-03", Brand: "Mercedes", Count: 43},
{ErrorDate: "2017-09-04", Brand: "Mercedes", Count: 220},
{ErrorDate: "2017-09-03", Brand: "Chrysler", Count: 3},
{ErrorDate: "2017-09-04", Brand: "Chrysler", Count: 3},
{ErrorDate: "2017-09-06", Brand: "Chrysler", Count: 6},
{ErrorDate: "2017-09-07", Brand: "Chrysler", Count: 1}
];
Highcharts.chart('container', {
chart: {
type: 'spline'
},
title: {
text: 'Car Metrix Test'
},
subtitle: {
text: 'Irregular time data in Highcharts JS'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { // don't display the dummy year
month: '%e. %b',
year: '%b'
},
title: {
text: 'Date'
}
},
yAxis: {
title: {
text: 'Count'
},
min: 0
},
tooltip: {
headerFormat: '<b>{series.name}</b><br>'
},
plotOptions: {
spline: {
marker: {
enabled: true
},
pointInterval: 24 * 3600 * 1000
}
},
series: [{
name: 'Toyota',
data: [3]
}, {
name: 'Ford',
data: [258, 239, 197, 187, 418, 344, 256]
}, {
name: 'Mercedes',
data: [3, 220]
}, {
name: 'Chrysler',
data: [3, 3, 6, 1]
}]
});