What steps will reproduce the problem?
1. Create a MicroPlotChart using a colors array
<microcharts:MicroPlotChart width="200" height="40" showDataTips="true"
dataField="val" backgroundColor="#DDDDDD" backgroundStroke="#888888"
colors="[0xFFFFFF, 0xFFFFFF, 0, 0xFF0000, 0]" dataProvider="{dp}"
negative="false" radius="10" />
2. Note that all of the circles show up with black fills, instead of 2
white, 1 red, 2 black.
Analysis:
In createPlots() in MicroPlotChart.as, the line for using the colors array
is correctly being called, based on the flex debugger:
if (colors != null) {
plot.fill = new SolidFill(useColor(i));
}
The Degrapha asdocs for SolidFill say that the first arg should be an
Object specifying a color value (unit or string).
However, the useColor() method in BaseMicroChart.as is returning a
IGraphicsFill object, not a color value:
protected function useColor(indexIteration:Number):IGraphicsFill
The Degrapha code is just treating an unknown type of object input as
black, so everything shows up that way.
Fix: Use the fill returned from useColor() instead of creating a SolidFill.
if (colors != null) {
plot.fill = useColor(i);
//plot.fill = new SolidFill(useColor(i));
}
The attached image shows that the different colors now appear.
What version of the product are you using? On what operating system?
trunk, Windows
Please provide any additional information below.
Original issue reported on code.google.com by boni...@frii.com on 29 Mar 2009 at 2:25
Original issue reported on code.google.com by
boni...@frii.com
on 29 Mar 2009 at 2:25Attachments: