Hello,
Not sure if is a bug or some property i did not know how to enable. But when i create a linear chart and i use for
dataPoints : {
x : number;
y : number;
label : string;
}
I expect that on axisX only labels should exist, but no. It makes a combination of some labels and some x value numbers thrown in there like this example : https://jsfiddle.net/5Ld648eg/1/
var y = 0;
var data = [];
var dataSeries = { type: "line" };
var dataPoints = [];
dataPoints.push({
y: 3000,
label: '2014-05-06 12:02 PM'
// x: '2014-05-06 12:02 PM'
});
dataPoints.push({
x: 10,
y: 3100,
label: '2014-06-06 12:02 PM'
//x: '2014-06-06 12:02 PM'
});
dataPoints.push({
x: 14,
y: 3500,
label: '2014-07-06 12:02 PM'
//x: '2014-07-06 12:02 PM'
});
dataPoints.push({
x: 26,
y: 4000,
label: '2014-08-06 12:02 PM'
//x: '2014-08-06 12:02 PM'
});
dataSeries.dataPoints = dataPoints;
data.push(dataSeries);
//Better to construct options first and then pass it as a parameter
var options = {
zoomEnabled: true,
title: {
text: "Try Zooming - Panning"
},
axisX: {
labelAngle: -60,
},
axisY: {
includeZero: false
},
data: data // random data
};
var chart = new CanvasJS.Chart("chartContainer", options);
chart.render();