Basic HTML5 Chart Example - CanvasJS JavaScript Charts
Basic HTML5 Chart Example - CanvasJS JavaScript Charts
HTML
<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<br/><!-- Just so that JSFiddle's Result label doesn't overlap the Chart -->
<div id="chartContainer" style="height: 360px; width: 100%;"></div>
JavaScript
var chart = new CanvasJS.Chart("chartContainer",
{
axisY: {
gridDashType: "dot",
stripLines:[{
value: 0,
thickness: 2,
color: "grey",
lineDashType: "dash",
}],
},
toolTip: {
fontWeight: "bold",
fontSize: "20",
fontFamily: "Consolas,Tohama,verdana",
fontStyle: "normal",
borderThickness: 2,
},
data: [
{
type: "candlestick",
dataPoints: [{
x: new Date(2),
y: [10, 20, -20, -10],
}]
}
]
});
chart.render();