JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 300px; width: 100%;"></div>
JavaScript
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer",{
title:{
text: "Line Chart"
},
axisX: {
gridThickness: 1,
},
data: [
{
type: "line",
color: "orange",
dataPoints: [
{ x: 50, y: 105},
{ x: 53, y: 90},
]
},
{
type: "line",
color: "orange",
dataPoints: [
{ x: 55, y: 105},
{ x: 55, y: 95},
]
},
{
type: "line",
color: "green",
dataPoints: [
{ x: 55, y: 95},
{ x: 53, y: 95},
{ x: 53, y: 90},
{ x: 54, y: 85},
{ x: 55, y: 90},
{ x: 55, y: 95},
]
},
{
type: "line",
lineDashType: "dash",
markerSize: 0,
color: "purple",
dataPoints: [
{ x: 54, y: 85},
{ x: 54, y: 95},
{ x: 55, y: 95},
]
}]
});
chart.render();
}