Reputation: 1
How can I have 2 bar charts plotted in 2 different divs on a single web page? If I try to do so one bar chart gets overwritten with the values of the second chart since the library looks for hardcoded div name 'infovis'. Any idea how to fix this?
Upvotes: 0
Views: 80
Reputation: 113
I know this is a bit late, but I'd like to share what I've done.
First create two div's:
<div id='InfoVisChart1'></div>
<div id='InfoVisChart2'></div>
Then, in your JS, where you write in your code, inject into the two id's:
var barChart = new $jit.BarChart({
//id of the visualization container
injectInto: 'InfoVisChart1',
.... etc.
var barChart2 = new $jit.BarChart({
//id of the visualization container
injectInto: 'InfoVisChart2',
.... etc.
Works for me.
Upvotes: 1