Please observe the code snippet, below ... this is a sample bar chart taken from the main demo program. The only difference is that I inserted specific values for the horizontal bars, rather than using a random int.
The labels are set in the order "Ford", "Mazda", "BMW", "Porche" The Horizontal bars are set as "10", "20", "30", "40"
I would expect that this means that Ford=10, Mazda=20, etc. However, observing the example, it turns out that Ford=40, Mazda=30, etc. The labels and the bars are set in the opposite order.
So, it this by design (and therefore I should work around it) or is this a bug?
THANKS!
ChartData cd1 = new ChartData("Top Car Speed", "font-size: 14px; font- family: Verdana; text-align: center;"); cd1.setBackgroundColour("#ffffff"); XAxis xa = new XAxis(); xa.setRange(0, 200, 20); cd1.setXAxis(xa); YAxis ya = new YAxis(); ya.addLabels("Ford", "Mazda", "BMW", "Porche"); ya.setOffset(true); cd1.setYAxis(ya); HorizontalBarChart bchart1 = new HorizontalBarChart(); bchart1.setTooltip("#val# mph"); bchart1.addBars(new HorizontalBarChart.Bar(10, "#ffff00")); bchart1.addBars(new HorizontalBarChart.Bar(20, "#0000ff")); bchart1.addBars(new HorizontalBarChart.Bar(30, "#00ff00")); bchart1.addBars(new HorizontalBarChart.Bar(40, "#ff0000")); cd1.addElements(bchart1);
Comment #1
Posted on Feb 10, 2009 by Quick HorseI'll look into this...
Comment #2
Posted on Apr 16, 2009 by Quick HorseThe OFCGWT java code is correctly ordering the values into the JSON API - the fault is within OFC flash and would need to be corrected there.
So its by design I guess? Perhaps raise a bug report in the OFC forums http://forums.openflashchart.com/ and if it is fixed, I'll update OFCGWT at that time.
Comment #3
Posted on Apr 16, 2009 by Quick Horse(No comment was entered for this change.)
Status: WontFix
Labels:
Type-Defect
Priority-Medium