JSFiddle - React, Tailwind, and code Playground
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",
{
title:{
text: "Multi-Series Line Chart"
},
data: [
{
type: "line",
dataPoints: [
{ x: 1, y: 30, label: "label1" },
{ x: 3, y: 40, label: "label3" },
{ x: 4, y: 50, label: "label4" },
{ x: 5, y: 60, label: "label5" },
{ x: 7, y: 90, label: "label7" },
{ x: 8, y: 20, label: "label8" },
{ x: 9, y: 50, label: "label9"}
]
}, {
type: "line",
dataPoints: [
{ x: 1, y: 10, label: "label1" },
{ x: 2, y: 20, label: "label2"},
{ x: 3, y: 30, label: "label3" },
{ x: 4, y: 40, label: "label4" },
{ x: 5, y: 50, label: "label5" },
{ x: 6, y: 60, label: "label6" },
{ x: 7, y: 70, label: "label7" },
{ x: 8, y: 80, label: "label8" },
{ x: 9, y: 90, label: "label9"}
]
}
]
});
chart.render();