JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://canvasjs.com//assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 300px; width: 100%;"></div>
JavaScript
var chart = new CanvasJS.Chart("chartContainer", {
title: {
text: "Last 10 Days Orders",
fontSize: 30
},
axisX: {
gridColor: "Silver",
tickColor: "silver",
valueFormatString: "DD/MMM"
},
toolTip: {
shared: true
},
theme: "theme2",
axisY: {
gridColor: "Silver",
tickColor: "silver"
},
legend: {
verticalAlign: "center",
horizontalAlign: "right"
},
data: [{
type: "line",
showInLegend: true,
lineThickness: 2,
name: "Pickups",
markerType: "square",
color: "#F08080",
dataPoints: [
{
label: "11/17",
y: 49
}, {
label: "11/18",
y: 61
}, {
label: "11/19",
y: 39
},
{
label: "11/20",
y: 55
},
{
label: "11/21",
y: 60
},
{
label: "11/24",
y: 42
},
{
label: "11/22",
y: 6
},
{
label: "11/25",
y: 26
},
{
label: "11/26",
y: 1
},
]
}, {
type: "line",
showInLegend: true,
name: "Shipped",
color: "#20B2AA",
lineThickness: 2,
dataPoints: [{
label: "11/17",
y: 12
}, {
...