Hi,

Recently I've written a custom fillFunction which I'm struggling with. Here's 
the source code:

                     private function myFillFunction(element:ChartItem, 
index:Number):IFill
                     {
                        var c:SolidColor = new SolidColor(0x00CC00);
                        if(index == buyIndex)
                        {
                                return c;
                        }  
                        else if(index == sellIndex || !operationIntentionBuy)
                        {
                            c.color = 0xFF0000;
                        }
                        return c;
                    }           


The buyIndex, sellIndex and operationIntentionBuy are flags which are updated 
as the users selects different chart items. The idea is to select to chart 
items (a buy item and a sell item on the chart). However, the logic doesn't 
work as I've expected. In particular, it seems that my fillFunction is only 
called initially and then the values are cached. 
Initially I thought that the function would be called every time you mouse over 
a chart item, but perhaps for performance issues, the values of the 
fillFunction are cached.
Presumably it's called only when the dataProvider is refreshed?

So my questions are:
1. When does fillFunction get actually called? Is my guess above correct?
2. How can I force my fillFunction to be called? refreshing the dataProvider?
3. Is there a better way of doing this?

Many thanks

Reply via email to