Defect #706
weird marker value in bar chart
0%
Description
adding a data value marker to a bar chart shows strange number instead of the given text
var markerObj = [{text: '9',index:1,flagged:false,size:9}];
instead of showing the marker value '9' it shows '986.01'. can't figure out where that number comes from. It just adds the '86.01' value, so if I use 'test' instead of '9', I get 'test86.01' as marker value.
But, when flagged:true then the correct value is shown!
Inspecting the google chart api URL, I see that the problematic URL is with 'chm=N9' and when flagged it has 'chm=f9'. And in several version ago of VelocityReport it created 'chm=t9'..
Files
History
Updated by Sem Tukenmez almost 12 years ago
Just realised that the added mistery value is actually the percentage value of the bar. (in my example it is incorrect, but in reality it is the %)
So, the problem is that when not flagged, the %-value of the bar is added to the given text value for the marker.
Updated by Patrick Talbot almost 12 years ago
- Status changed from New to In Progress
I see. Could you make a simple sample that demonstrate this issue?
It will help me finding what's going on, probably a bad marker send to google chart, but I need to track it down.
Thanks for your help.
Updated by Sem Tukenmez almost 12 years ago
Ok, I've included a simple example.
Please forget the remarks about %-value. That has to do with the more complex usage in my solution.
With this example you could see it is only a problem that the data value is added to a marker. I've set the marker text to 'test' and you could unexpectedly see the data values added. When flagged, then it only shows the value which is given in the 'text' property like you would expect.
Updated by Patrick Talbot almost 12 years ago
- Status changed from In Progress to Closed
The bug was in the Charts4J lib. I've corrected it, will be available in upcoming v3.2 release.
Note that your sample had an error in line 99 which should read:
graphDef2.bars = [barObj2];
and not
graphDef2.bars = [barObj];
I scratched my head on this for a while before finding this ;)
Updated by Sem Tukenmez almost 12 years ago
Thanks! Sorry about the example, made it in such a hurry that I've overseen it with copying and pasting code. Glad to hear that you took it as a challenge though ;)