tooltips with multiple line charts?

Posted by cfreas 
tooltips with multiple line charts?
September 15, 2009 09:15PM
I have two line charts on a page, in separate div containers. Tooltips only seem to work for one of the graphs. They're generated in exactly the same way. Is there a known limitation on tooltips with multiple line graphs on the same page? Or is there a common error that causes this?

-Colin Freas
Re: tooltips with multiple line charts?
September 15, 2009 09:38PM
looks like a bug with jscharts, as per following code, which recreates error:

<html>
	<head>
		<script type="text/javascript" src="jscharts.js"></script>
	</head>
	
	<body>
		<div id="chartcontainer"></div>
		<div id="chartcontainer2"></div>
		
		<script type="text/javascript">
			var myData = new Array([10, 20], [15, 10], [20, 30], [25, 10], [30, 5]);
			var myChart = new JSChart('chartcontainer', 'line');
			myChart.setDataArray(myData);
			myChart.setTooltip([10, 'Tooltip for value 10 on X axis']);
			myChart.setTooltip([15, 'Tooltip for value 15 on X axis']);
			myChart.draw();
		</script>	

		<script type="text/javascript">
			var myData2 = new Array([10, 20], [15, 10], [20, 30], [25, 10], [30, 5]);
			var myChart2 = new JSChart('chartcontainer2', 'line');
			myChart2.setDataArray(myData2);
			myChart2.setTooltip([10, 'Tooltip for value 10 on X axis']);
			myChart2.setTooltip([15, 'Tooltip for value 15 on X axis']);
			myChart2.draw();
		</script>	

	</body>
</html>
Re: tooltips with multiple line charts?
September 18, 2009 05:06AM
You're right, we just missed this bug in our tests... The IDs of the tooltips are duplicated when they are generated for the same data sets in different charts. We will take care of this bug and release soon the new script, sorry for the inconvenience.

Sabin

--------------------
JS Charts - Created by Smartketer LLC
Re: tooltips with multiple line charts?
September 24, 2009 01:19PM
Hi, we have updated the package with the fix for the bug you mentioned. You can download it from the site.

Sabin

--------------------
JS Charts - Created by Smartketer LLC
Re: tooltips with multiple line charts?
October 14, 2009 01:45AM
In dojo, there'are the complete js charts(http://archive.dojotoolkit.org/nightly/) in "dojo-2009-10-13\dojotoolkit\dojox\charting\", and dojo is complete open source!
Sorry, you do not have permission to post/reply in this forum.