Hello, i am experiencing a rather weird bug, when my datasets are 3 the days on the x axis are being duplicated multiple times.
Check the image :
The code:
var colors = new Array();
colors[0] = "#AA5A4B";
colors[1] = "#DC5A4B";
colors[2] = "#E6918C";
colors[3] = "#505050";
colors[4] = "#32465F";
colors[5] = "#8C9196";
colors[6] = "#DCD2C8";
var line_graph = new CanvasJS.Chart("523ff45f32a214.25570229609267094",
{
backgroundColor: "rgba(0,0,0,0)",
axisX:{
intervalType: "day",
lineThickness: 0,
valueFormatString: "MMM DD"
},
axisY:{
gridThickness: 0.5,
gridColor: "#EAEAEA",
lineThickness: 0
},
legend:{
fontFamily:"Open Sans",
verticalAlign: "top",
horizontalAlign: "center",
fontSize: 13
},
data: [
{
type: "line",
color: ""+colors[Math.floor((Math.random()*6))],
markerSize: 0,
dataPoints: [
{x: new Date("2013-09-21"), y: 21 },
{x: new Date("2013-09-22"), y: 24 },
{x: new Date("2013-09-23"), y: 22 }
]
},
]
});
line_graph.render();
-
This topic was modified 11 years, 3 months ago by Patsy Issa.