Multiseries Scatter Chart - CanvasJS JavaScript Charts
Multiseries Scatter Chart - CanvasJS JavaScript Charts
by canvasjs
HTML
<script src="https://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",{
toolTip:{
content:"{name} : {x} , {y}"
},
data: [
{
type: "scatter",
markerType: "square",
name: "Groupe1",
dataPoints: [
{ x: new Date("2013-12-17 13:45"), y: 87.975 },
{ x: new Date("2013-12-17 14:45"), y: 37.975 },
{ x: new Date("2013-12-17 15:45"), y: 97.975 },
{ x: new Date("2013-12-17 16:45"), y: 17.975 },
]
} ,
{
type: "scatter",
name: "Groupe2",
markerType: "triangle",
dataPoints: [
{ x: new Date("2013-12-17 13:05"), y: 87.975 },
{ x: new Date("2013-12-17 14:05"), y: 37.975 },
{ x: new Date("2013-12-17 15:05"), y: 97.975 },
{ x: new Date("2013-12-17 16:05"), y: 17.975 },
]
}
]
});
chart.render();