ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  tooltip showing data value 0 although it is not 0
Posted by dilip on Feb-19-2014 01:07
Attachments:
Hello

I'm using bar chart. There are 5 bars on the chart, 4 of which having the data value
>=10,000 (for these bars, the tooltip showing the value correctly when hover over) but for
the 5th bar, the value is 100 but is showing 0 on hover over (I'm guessing its because 5th
has small spike and is picking up the x-axis value on hover over).

I'm attaching the test JSP page with this post that will show the actual problem

Please could you suggest any solution for this?
ChartTest.jsp
ChartTest.jsp

2.27 Kb

  Re: tooltip showing data value 0 although it is not 0
Posted by Peter Kwan on Feb-19-2014 17:25
Hi dilip,

Your chart actually has 25 bars (five bar layers, with each bar layer having 5 bars as the
code uses an array of 5 numbers in each layer). Of the 25 bars, 20 of which are zero bars.
Your tooltip happens to show the tooltip of a zero bar.

To solve the problem, instead of 0, please initialize the arrays to Chart.NoValue:

double[] singleBarRange = new double[5]; // Add a layer for each bar with a new colour.
Arrays.fill(singleBarRange, Chart.NoValue);

Hope this can help.

Regards
Peter Kwan

  Re: tooltip showing data value 0 although it is not 0
Posted by dilip on Feb-19-2014 18:39
Hi Peter,

That's great, working perfect :)

Thanks for help.

Dilip

  Re: tooltip showing data value 0 although it is not 0
Posted by Basha on Mar-10-2014 21:29
Hi Peter,
Thanks for posting ur post about "replace '0' with Chart.NoValue". It really saved my day. I
was struggling to hide tooltip when value is 0.


Thanks,
Basha Himmatgori

  Re: tooltip showing data value 0 although it is not 0
Posted by Peter Kwan on Mar-11-2014 03:44
Hi Basha,

Please replace 0 with Chart.NoValue. In this way, there will not be any 0 value, and no
tooltip would appear.

Hope this can help.

Regards
Peter Kwan