-
-
Save wixshow/98f25c90f9e1771bff5e76a222d73e50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script> | |
<style> | |
</style> | |
<script> | |
window.onmessage = function(event){ | |
if (event.data) { | |
makeChart(event.data); | |
} | |
}; | |
function makeChart(dataValues) { | |
var ctx = document.getElementById('myChart').getContext('2d'); | |
var chart = new Chart(ctx, { | |
// The type of chart we want to create | |
type: 'line', | |
// The data for our dataset | |
data: dataValues, | |
// Configuration options go here | |
options: { | |
tooltips: {enabled: false}, | |
hover: {mode: null}, | |
animation: { | |
duration: 0, // general animation time | |
}, | |
hover: { | |
animationDuration: 0, // duration of animations when hovering an item | |
}, | |
responsiveAnimationDuration: 0, // animation duration after a resize | |
} | |
}); | |
} | |
</script> | |
</head> | |
<body style="background-Color:#b7a465"> | |
<canvas id="myChart"></canvas> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment