Enabling grid bands
Showing grid bands on a time series chart.
The complete code of thermal flow of machinery is given below:
js
Copy
Promise.all([
loadData(
"https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/enabling-grid-bands_data.json"
),
loadData(
"https://s3.eu-central-1.amazonaws.com/fusion.store/ft/schema/enabling-grid-bands_schema.json"
)
]).then(function(res) {
const data = res[0];
const schema = res[1];
const dataStore = new FusionCharts.DataStore();
const dataSource = {
chart: {
theme: "candy"
},
caption: {
text: "Thermal flow of machinery"
},
subcaption: {
text: "Observation from east region thermal sensor"
},
yaxis: [
{
plot: {
value: "Heat Flux"
},
title: "Heat Flux (in W/m²)",
showgridband: "1",
style: {
"grid-band": {
fill: "#f5f5ef"
}
}
}
]
};
dataSource.data = dataStore.createDataTable(data, schema);
new FusionCharts({
type: "timeseries",
renderAt: "chart-container",
width: "100%",
height: "500",
dataSource: dataSource
}).render();
});
html
Copy
<div id="chart-container"></div>