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?
Asked
Active
Viewed 79 times
0
-
1Can you post some code? – Pratik Patel Feb 19 '14 at 05:22
-
You can look for some other charting library. For example, http://manicharts.com They have given documentation and chart can be used as plugin without any dependance on div or ID. – codesnooker Mar 20 '14 at 16:48
2 Answers
1
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.

AKDad
- 113
- 10