Two Data Sources
Time series chart where data is loaded from two different sources. In 'data', we have provided two different data sources with unique URLs, and you can reference values from either source when configuring a new 'series'.
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({
data: [
{
id: "bitcoin",
units: ["h"],
url: "/dvsl/data/time-chart/bitcoin-h.json",
timestampInSeconds: true
},
{
id: "temperature",
units: ["h"],
url: "/dvsl/data/time-chart/temperature-kuldiga-h.json"
}
],
currentTime:{enabled:false},
valueAxis:{
"currency":{
side:"left"
},
"temp":{
side:"right",
zeroLine:"center"
}
},
series:[
{
type:"line",
valueAxis:"temp",
data:{ index:1, source: "temperature"},
style:{fillColor: "rgba(255,0,0,0.6)", smoothing:true}
},
{
type:"columns",
valueAxis:"currency",
data:{ index:1, source: "bitcoin"}
}
],
container: document.getElementById("demo")
});
Data
Data
//No separate data for this example