Axis X labelling options
Trying to figure out how to start the x axis with 18 October 2009.
by pigottm
HTML
<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 360px; width: 100%;"></div>
JavaScript
var chart = new CanvasJS.Chart("chartContainer",
{
axisX:
{
intervalType: "month",
interval: 1,
valueFormatString: "DD/MM/YYYY",
minimum: new Date(2009, 9, 18),
},
data: [
{
type: "column",
color: "blue",
dataPoints: [
{x: new Date(2009, 10, 21),y: 5},
{x: new Date(2009, 11, 19),y: 7},
{x: new Date(2009, 12, 9),y: 10},
{x: new Date(2010, 0, 5),y: 20},
{x: new Date(2010, 1, 4),y: 8},
{x: new Date(2010, 2, 3),y: 5}
]
}
]
});
chart.render();