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 = "zoom" class="col-md-9">
<span id = "PortfolioTrend">Portfolio Trend</span>
<div id="chartContainer" style="height: 200px; width: 100%;"></div>
</div>
CSS
.expandedgraph {
position: fixed;
top: 50%;
left: 50%;
width: 30em;
height: 17.5em;
margin-top: -9em;
margin-left: -15em;
border: 1px solid #ccc;
background-color: #f3f3f3;
transform: scale(2.2);
z-index: 9999;
background: #000;
border: 1px solid #000;
transition: transform 0.5s ease 0.1s;
border-radius: 6px;
box-shadow: inset 1px 3px 9px 0px #0e0e0e, inset -2px 0px 0px 0px #282121, inset 2px 0px 3px 2px #202020, 0 0 0px 0px #000;
}
JavaScript
var chart = new CanvasJS.Chart("chartContainer", {
title:{
text: "Basic Column Chart"
},
data: [{
dataPoints: [
{ x: 10, y: 71 },
{ x: 20, y: 55},
{ x: 30, y: 50 },
{ x: 40, y: 65 },
{ x: 50, y: 95 },
{ x: 60, y: 68 },
{ x: 70, y: 28 },
{ x: 80, y: 34 },
{ x: 90, y: 14}
]
}]
});
chart.render();
$("#PortfolioTrend").click(function () {
$("#zoom").addClass("expandedgraph");
chart.render();
})