JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 370px; width: 100%;"></div>
JavaScript
var chart = new CanvasJS.Chart("chartContainer", {
theme: "light2",
title:{
text: "Simple Line Chart"
},
data: [{
type: "line",
indexLabelFontSize: 16,
dataPoints: [
{ y: 450 },
{ y: 414},
{ y: 520, indexLabel: "\u2191 highest",markerColor: "red", markerType: "triangle" },
{ y: 460 },
{ y: 450 },
{ y: 500 },
{ y: 480 },
{ y: 480 },
{ y: 410 , indexLabel: "\u2193 lowest",markerColor: "DarkSlateGrey", markerType: "cross" },
{ y: 500 },
{ y: 480 },
{ y: 510 }
]
}]
});
chart.render();
// logic for making the marker blink
var flag = true;
setInterval(function(){
if(flag === true){
chart.options.data[0].dataPoints[2].markerColor = "transparent";
flag = false;
}
else {
chart.options.data[0].dataPoints[2].markerColor = "red";
flag = true;
}
chart.render();
}, 500);