Reputation: 171
Can some one give me the code for an itemRenderer for a ColumnSeries currently my best effort is as follows...
Defining the itemRenderer
columnSeries.setStyle("itemRenderer","comp.EmptyBox");
comp.EmptyBox
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
focusEnabled="true">
<s:Rect id="lblData" top="0" left="0" right="0" bottom="0">
<s:fill>
<s:SolidColor color="0xFFFFCC" />
</s:fill>
<s:stroke>
<s:SolidColorStroke color="0x660099" weight="2" />
</s:stroke>
</s:Rect>
And currently my error is a type cohersion due to a badly constructed itemRenderer.
Upvotes: 1
Views: 515
Reputation: 976
Try this:
columnSeries.setStyle("itemRenderer", new ClassFactory(comp.EmptyBox));
Upvotes: 1