Using Google Charts, I'm trying to draw 2 charts on a dashboard based on the ChartWrapper library. I'm binding a slider to the two charts for which I set up a ControlWrapper. As you can see I'm using 2 different datatables, with the same columns in it. The issue I'm facing is that two times the same chart is rendered, i.e. the distance chart. Why is this happening and how can I remediate this? Thanks!
Here's the code for the same:
// Instantiate and draw our Heartrate chart, passing in some options.
heartrateChart = new google.visualization.ChartWrapper({
'chartType': 'ColumnChart',
'containerId': 'heartrate_container',
'options': {
'width': width,
'height': height
}
});
dashboard.bind(dateRangeSlider, heartrateChart);
dashboard.draw(HRdata);
// Instantiate and draw our Distance chart, passing in some options.
distanceChart = new google.visualization.ChartWrapper({
'chartType': 'ColumnChart',
'containerId': 'distance_container',
'options': {
'width': width,
'height': height
}
});
dashboard.bind(dateRangeSlider, distanceChart);
dashboard.draw(Distancedata);