TimeChart with data function
HTML
HTML
<script src="https://cdn.zoomcharts-cloud.com/1/nightly/zoomcharts.js"></script>
<div id="demo"></div>
CSS
CSS
//No CSS for this example
JavaScript
JavaScript
var t = new TimeChart({
container: document.getElementById("demo"),
data:
{
timestampInSeconds: true,
units: ["y", "M", "d", "h"],
dataFunction: function (from, to, step, success, fail) {
// using jquery for ajax call
jQuery.ajax({
url: "/dvsl/data/time-chart/bitcoin-" + step + ".json",
success: success,
error: fail
});
}
}
});
Data
Data
//No separate data for this example