parambox
Version:
Too much parameters to handle ? paramBox is a collection of smart plug and play tools to facilitate the design of javascript projects such as games and cognitive tasks. ParamBox is one of the helper class and allows to modify key variable on the fly witho
54 lines (50 loc) • 1.67 kB
HTML
<html>
<head>
<title>
ParamBox.js: Example Chart
</title>
<!-- Load jquery -->
<script src="jquery.min.js">
</script>
<!-- Load Chart.js -->
<script src="Chart.bundle.js">
</script>
<!-- Load Bootstrap -->
<script src="bootstrap.min.js">
</script>
<link href="bootstrap.css" rel="stylesheet" type="text/css"/>
<!-- Load Parambox -->
<script src="../dist/paramBox.js" type="text/javascript">
</script>
<script type="text/javascript">
var smartChartInstance = null;
var chartOptions = {
type: 'bar',
data: {
labels: ['Item 1', 'Item 2', 'Item 3'],
datasets: [
{
type: 'bar',
label: 'Bar Component',
data: [10, 20, 30],
},
{
type: 'line',
label: 'Line Component',
data: [30, 20, 10],
}
]
}
};
document.addEventListener("DOMContentLoaded", function(event) {
/* if ParamBox library is loaded - create one */
if (typeof SmartChart === "function") {
smartChartInstance = new SmartChart(chartOptions, function(){ console.log("Chart Closed"); });
}
});
</script>
</head>
<body>
</body>
</html>