Is this possible?
I have a view which displays several small graphs along the top of the screen, like icons. Clicking on one of these graphs will display that graph in the main section of the screen. The small graph will remain visible in the list of icons.
So, this means I will have the same chart displayed twice on the same screen. The data for some of the charts comes from quite complicated calculations, which happens within the chart component itself, so I would like to find a way of calculating this only once, rather than once for each time the chart is displayed.
Is there a way of duplicating the same instance of a component, so that the calculations will be done only once, but reflected on each displayed instance of the chart?
I hope this is clear enough!
Sounds to me like you need to refactor your code to encapsulate the calculations into a separate class; perhaps into a "CalculationManager" type of class. That way the two different instances of your graph can reference the exact same data.
Yup, that's what I'd considered, I was just wondering if there was anything built-in for reusing a component in this way.
Thanks for your answer!
I'm wondering if the results of calculations can be stored in class variables in the charting component.
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
Flex / AIR Development, Training, and Support Services