Chart with all dataPoints - CanvasJS
Chart with all dataPoints - CanvasJS
HTML
<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 300px; width: 100%;">
JavaScript
var chart = new CanvasJS.Chart("chartContainer", {
title : {
text: "Demo Of Line Chart"
},
legend: {
cursor: 'pointer',
horizontalAlign: 'right',
verticalAlign: 'center',
itemWidth: 60,
},
data :[
{
name: 'CHAN1',
type: 'line',
showInLegend: true,
dataPoints: [
{x: 0, y: 1},
]
},
{
name: "CHAN2",
type: 'line',
showInLegend: true,
dataPoints: [
{x: 0, y: 2},
]
},
{
name: "CHAN3",
type: 'line',
showInLegend: true,
dataPoints: [
{x: 0, y: 3},
]
},
{
name: "CHAN4",
type: 'line',
showInLegend: true,
dataPoints: [
{x: 0, y: 4},
]
},
{
name: "CHAN5",
type: 'line',
showInLegend: true,
dataPoints: [
{x: 0, y: 5},
]
},
{
name: "CHAN6",
type: 'line',
showInLegend: true,
dataPoints: [
{x: 0, y: 6},
]
},
{
name: "CHAN7",
type: 'line',
showInLegend: true,
dataPoints: [
{x: 0, y: 7},
]
},
{
name: "CHAN8",
type: 'line',
showInLegend: true,
dataPoints: [
{x: 0, y: 8},
]
},
]
});
chart.render();