Re: [flexcoders] Re: Getting a reference to a itemRenderer of a chart series
On Saturday 06 Sep 2008, Fernando Ghisi wrote: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_1 2.html I can´t agree with you. Just take a look on the styles of ColumnSeries in http://livedocs.adobe.com/flex/3/langref/mx/charts/series/ColumnSeries.ht ml - itemRenderer=BoxItemRenderer Aye, the ColumnSeries livedocs you pointed out might well list it under 'Styles' but very few people think of it as one. -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: Getting a reference to a itemRenderer of a chart series
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Saturday 06 Sep 2008, Fernando Ghisi wrote: http://livedocs.adobe.com/flex/3/html/help.html? content=charts_formatting_1 2.html I can´t agree with you. Just take a look on the styles of ColumnSeries in http://livedocs.adobe.com/flex/3/langref/mx/charts/series/ColumnSeries .ht ml - itemRenderer=BoxItemRenderer Aye, the ColumnSeries livedocs you pointed out might well list it under 'Styles' but very few people think of it as one. I believe the reason so many things are styles in charting is so that you can use a styleFunction to set properties on a chart embedded in an AdvancedDataGrid. IMO they should have overloaded things we expect to see as proprties so that they would act consistently with the rest of the framework but could still be set up via styleFunction. -Amy
Re: [flexcoders] Re: Getting a reference to a itemRenderer of a chart series
The question here is not if charts uses styles for itemRenderers or not - it´s fact, it really uses it. It´s working like this: I created my CustomItemRenderer extending BoxItemRenderer and I´m setting the series itemRenderers with setStyle method, like this: //For each columnSeries series.setStyle(itemRenderer, new ClassFactory(mx.charts.renderers.CustomtemRenderer)); See also: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html It´s working, I repeat. But the question was how can I get a reference for the series itemRenderes. On execution time, I have to modify an attribute of the itemRenderes than, when the updateDisplayList is executed again, the renderer will modify the draw made on each column (based on the attribut setted). If I use serie.getStyle(itemRenderer), it will return the ClassFActorty, not the itemRenderer. So, any idea people? -- Fernando Benedet Ghisi
[flexcoders] Re: Getting a reference to a itemRenderer of a chart series
Not arguing with you, but why would you use setStyle instead of: mx:ColumnSeries id=mySeries itemRenderer=mx.charts.renderers.CustomtemRenderer/ Does mySeries.items[0] not give you a reference? -TH --- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: The question here is not if charts uses styles for itemRenderers or not - it´s fact, it really uses it. It´s working like this: I created my CustomItemRenderer extending BoxItemRenderer and I´m setting the series itemRenderers with setStyle method, like this: //For each columnSeries series.setStyle(itemRenderer, new ClassFactory(mx.charts.renderers.CustomtemRenderer)); See also: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formattin\ g_12.html It´s working, I repeat. But the question was how can I get a reference for the series itemRenderes. On execution time, I have to modify an attribute of the itemRenderes than, when the updateDisplayList is executed again, the renderer will modify the draw made on each column (based on the attribut setted). If I use serie.getStyle(itemRenderer), it will return the ClassFActorty, not the itemRenderer. So, any idea people? -- Fernando Benedet Ghisi
Re: [flexcoders] Re: Getting a reference to a itemRenderer of a chart series
When you do this in a MXML, I almost sure that it will be transformed on a setStyle(itemRenderer, ...) in actionscript. There is no other way of doing this on actionscript. To apply a renderer to a series in ActionScript, you use the setStyle() method. In that method, you create a new ClassFactory and pass the renderer to its constructor. Flex generates an instance of this class to be the renderer. Be sure to import the appropriate classes when using renderer classes. But you gave me a solution - when I set the itemRenderer for one serie, in fact I´m setting the itemRenderer for all items of this serie. So, I can really get a reference using the serie´s items array, like you said or, more especificaly, like this: CustomItemRenderer(ColumnSeriesItem(ColumnSeries(chart.series[index]).items[index]).itemRenderer That was easier than I thought it was. Thanks for the light Tim! Fernando Ghisi 2008/9/8 Tim Hoff [EMAIL PROTECTED]: Not arguing with you, but why would you use setStyle instead of: mx:ColumnSeries id=mySeries itemRenderer=mx.charts.renderers.CustomtemRenderer/ Does mySeries.items[0] not give you a reference? -TH --- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: The question here is not if charts uses styles for itemRenderers or not - it´s fact, it really uses it. It´s working like this: I created my CustomItemRenderer extending BoxItemRenderer and I´m setting the series itemRenderers with setStyle method, like this: //For each columnSeries series.setStyle(itemRenderer, new ClassFactory(mx.charts.renderers.CustomtemRenderer)); See also: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html It´s working, I repeat. But the question was how can I get a reference for the series itemRenderes. On execution time, I have to modify an attribute of the itemRenderes than, when the updateDisplayList is executed again, the renderer will modify the draw made on each column (based on the attribut setted). If I use serie.getStyle(itemRenderer), it will return the ClassFActorty, not the itemRenderer. So, any idea people? -- Fernando Benedet Ghisi -- Fernando Benedet Ghisi
[flexcoders] Re: Getting a reference to a itemRenderer of a chart series
Great Fernando. Thanks for the info too. I learned something as well. -TH --- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: When you do this in a MXML, I almost sure that it will be transformed on a setStyle(itemRenderer, ...) in actionscript. There is no other way of doing this on actionscript. To apply a renderer to a series in ActionScript, you use the setStyle() method. In that method, you create a new ClassFactory and pass the renderer to its constructor. Flex generates an instance of this class to be the renderer. Be sure to import the appropriate classes when using renderer classes. But you gave me a solution - when I set the itemRenderer for one serie, in fact I´m setting the itemRenderer for all items of this serie. So, I can really get a reference using the serie´s items array, like you said or, more especificaly, like this: CustomItemRenderer(ColumnSeriesItem(ColumnSeries(chart.series[index]).it\ ems[index]).itemRenderer That was easier than I thought it was. Thanks for the light Tim! Fernando Ghisi 2008/9/8 Tim Hoff [EMAIL PROTECTED]: Not arguing with you, but why would you use setStyle instead of: mx:ColumnSeries id=mySeries itemRenderer=mx.charts.renderers.CustomtemRenderer/ Does mySeries.items[0] not give you a reference? -TH --- In flexcoders@yahoogroups.com, Fernando Ghisi fernandoghisi@ wrote: The question here is not if charts uses styles for itemRenderers or not - it´s fact, it really uses it. It´s working like this: I created my CustomItemRenderer extending BoxItemRenderer and I´m setting the series itemRenderers with setStyle method, like this: //For each columnSeries series.setStyle(itemRenderer, new ClassFactory(mx.charts.renderers.CustomtemRenderer)); See also: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formattin\ g_12.html It´s working, I repeat. But the question was how can I get a reference for the series itemRenderes. On execution time, I have to modify an attribute of the itemRenderes than, when the updateDisplayList is executed again, the renderer will modify the draw made on each column (based on the attribut setted). If I use serie.getStyle(itemRenderer), it will return the ClassFActorty, not the itemRenderer. So, any idea people? -- Fernando Benedet Ghisi -- Fernando Benedet Ghisi
[flexcoders] Re: Getting a reference to a itemRenderer of a chart series
--- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: The question here is not if charts uses styles for itemRenderers or not - it´s fact, it really uses it. It´s working like this: I created my CustomItemRenderer extending BoxItemRenderer and I´m setting the series itemRenderers with setStyle method, like this: //For each columnSeries series.setStyle(itemRenderer, new ClassFactory(mx.charts.renderers.CustomtemRenderer)); See also: http://livedocs.adobe.com/flex/3/html/help.html? content=charts_formatting_12.html It´s working, I repeat. But the question was how can I get a reference for the series itemRenderes. On execution time, I have to modify an attribute of the itemRenderes than, when the updateDisplayList is executed again, the renderer will modify the draw made on each column (based on the attribut setted). If I use serie.getStyle(itemRenderer), it will return the ClassFActorty, not the itemRenderer. So, any idea people? Did you look at the link I posted? I believe it showed you how to get at the LegendData for each series, which should know this. HTH; Amy
Re: [flexcoders] Re: Getting a reference to a itemRenderer of a chart series
Yeah, it´s a good link. I will use it now, for the next issues that I have to solve (legend ones). Thanks. 2008/9/8 Amy [EMAIL PROTECTED]: --- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: The question here is not if charts uses styles for itemRenderers or not - it´s fact, it really uses it. It´s working like this: I created my CustomItemRenderer extending BoxItemRenderer and I´m setting the series itemRenderers with setStyle method, like this: //For each columnSeries series.setStyle(itemRenderer, new ClassFactory(mx.charts.renderers.CustomtemRenderer)); See also: http://livedocs.adobe.com/flex/3/html/help.html? content=charts_formatting_12.html It´s working, I repeat. But the question was how can I get a reference for the series itemRenderes. On execution time, I have to modify an attribute of the itemRenderes than, when the updateDisplayList is executed again, the renderer will modify the draw made on each column (based on the attribut setted). If I use serie.getStyle(itemRenderer), it will return the ClassFActorty, not the itemRenderer. So, any idea people? Did you look at the link I posted? I believe it showed you how to get at the LegendData for each series, which should know this. HTH; Amy -- Fernando Benedet Ghisi
[flexcoders] Re: Getting a reference to a itemRenderer of a chart series
--- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: Assuming chart is a ColumnChart, chart.series[0].items[0] will get you a rference to the first ColumnSeriesItem. Charts don't have itemRenderers and an itemRenderer is not a style. They do, and in charting, it is.
[flexcoders] Re: Getting a reference to a itemRenderer of a chart series
--- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: I can´t agree with you. Just take a look on the styles of ColumnSeries in http://livedocs.adobe.com/flex/3/langref/mx/charts/series/ColumnSeries.h tml - itemRenderer=BoxItemRenderer I want a reference of the SERIES itemRenderer, not the charts one. This might help you: http://blogs.adobe.com/flexdoc/charts/ HTH; Amy
[flexcoders] Re: Getting a reference to a itemRenderer of a chart series
Good link Amy. Thanks! -TH --- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Fernando Ghisi fernandoghisi@ wrote: I can´t agree with you. Just take a look on the styles of ColumnSeries in http://livedocs.adobe.com/flex/3/langref/mx/charts/series/ColumnSeries .h tml - itemRenderer=BoxItemRenderer I want a reference of the SERIES itemRenderer, not the charts one. This might help you: http://blogs.adobe.com/flexdoc/charts/ HTH; Amy
[flexcoders] Re: Getting a reference to a itemRenderer of a chart series
So, nobody can help me? 2008/9/5 Fernando Ghisi [EMAIL PROTECTED]: How can I get a reference to a itemRenderer of a chart series? If I use getStyle method, I´ll get the reference of the ClassFactory Ex: Series(chart.series[index]).getStyle(itemRenderer) Looking for any property that I could use, I´ve found in the ColumnSeries a property called _instanceCache. I could get a reference of the objects created by the ClassFactory using _instanceCache.instances, but this attribute is private. So, what should I do to get the reference of the itemRenderes of the series? -- Fernando Benedet Ghisi -- Fernando Benedet Ghisi
[flexcoders] Re: Getting a reference to a itemRenderer of a chart series
Assuming chart is a ColumnChart, chart.series[0].items[0] will get you a rference to the first ColumnSeriesItem. Charts don't have itemRenderers and an itemRenderer is not a style. -TH --- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: So, nobody can help me? 2008/9/5 Fernando Ghisi [EMAIL PROTECTED]: How can I get a reference to a itemRenderer of a chart series? If I use getStyle method, I´ll get the reference of the ClassFactory Ex: Series(chart.series[index]).getStyle(itemRenderer) Looking for any property that I could use, I´ve found in the ColumnSeries a property called _instanceCache. I could get a reference of the objects created by the ClassFactory using _instanceCache.instances, but this attribute is private. So, what should I do to get the reference of the itemRenderes of the series? -- Fernando Benedet Ghisi -- Fernando Benedet Ghisi
Re: [flexcoders] Re: Getting a reference to a itemRenderer of a chart series
ItemRenders are not part of Style even is not the way we could get a reference into a render for Charts. Try this. http://www.flex888.com/699/the-illusive-itemrenderer.html Maybe will help you to figure out how. Regards Igor Costa www.igorcosta.org On Fri, Sep 5, 2008 at 9:12 PM, Tim Hoff [EMAIL PROTECTED] wrote: Assuming chart is a ColumnChart, chart.series[0].items[0] will get you a rference to the first ColumnSeriesItem. Charts don't have itemRenderers and an itemRenderer is not a style. -TH --- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: So, nobody can help me? 2008/9/5 Fernando Ghisi [EMAIL PROTECTED]: How can I get a reference to a itemRenderer of a chart series? If I use getStyle method, I´ll get the reference of the ClassFactory Ex: Series(chart.series[index]).getStyle(itemRenderer) Looking for any property that I could use, I´ve found in the ColumnSeries a property called _instanceCache. I could get a reference of the objects created by the ClassFactory using _instanceCache.instances, but this attribute is private. So, what should I do to get the reference of the itemRenderes of the series? -- Fernando Benedet Ghisi -- Fernando Benedet Ghisi -- Igor Costa www.igorcosta.com www.igorcosta.org
Re: [flexcoders] Re: Getting a reference to a itemRenderer of a chart series
I can´t agree with you. Just take a look on the styles of ColumnSeries in http://livedocs.adobe.com/flex/3/langref/mx/charts/series/ColumnSeries.html - itemRenderer=BoxItemRenderer I want a reference of the SERIES itemRenderer, not the charts one. 2008/9/5 Igor Costa [EMAIL PROTECTED]: ItemRenders are not part of Style even is not the way we could get a reference into a render for Charts. Try this. http://www.flex888.com/699/the-illusive-itemrenderer.html Maybe will help you to figure out how. Regards Igor Costa www.igorcosta.org On Fri, Sep 5, 2008 at 9:12 PM, Tim Hoff [EMAIL PROTECTED] wrote: Assuming chart is a ColumnChart, chart.series[0].items[0] will get you a rference to the first ColumnSeriesItem. Charts don't have itemRenderers and an itemRenderer is not a style. -TH --- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: So, nobody can help me? 2008/9/5 Fernando Ghisi [EMAIL PROTECTED]: How can I get a reference to a itemRenderer of a chart series? If I use getStyle method, I´ll get the reference of the ClassFactory Ex: Series(chart.series[index]).getStyle(itemRenderer) Looking for any property that I could use, I´ve found in the ColumnSeries a property called _instanceCache. I could get a reference of the objects created by the ClassFactory using _instanceCache.instances, but this attribute is private. So, what should I do to get the reference of the itemRenderes of the series? -- Fernando Benedet Ghisi -- Fernando Benedet Ghisi -- Igor Costa www.igorcosta.com www.igorcosta.org -- Fernando Benedet Ghisi
Re: [flexcoders] Re: Getting a reference to a itemRenderer of a chart series
And if you want examples... http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_12.html And now, I´m still worng? 2008/9/6 Fernando Ghisi [EMAIL PROTECTED]: I can´t agree with you. Just take a look on the styles of ColumnSeries in http://livedocs.adobe.com/flex/3/langref/mx/charts/series/ColumnSeries.html - itemRenderer=BoxItemRenderer I want a reference of the SERIES itemRenderer, not the charts one. 2008/9/5 Igor Costa [EMAIL PROTECTED]: ItemRenders are not part of Style even is not the way we could get a reference into a render for Charts. Try this. http://www.flex888.com/699/the-illusive-itemrenderer.html Maybe will help you to figure out how. Regards Igor Costa www.igorcosta.org On Fri, Sep 5, 2008 at 9:12 PM, Tim Hoff [EMAIL PROTECTED] wrote: Assuming chart is a ColumnChart, chart.series[0].items[0] will get you a rference to the first ColumnSeriesItem. Charts don't have itemRenderers and an itemRenderer is not a style. -TH --- In flexcoders@yahoogroups.com, Fernando Ghisi [EMAIL PROTECTED] wrote: So, nobody can help me? 2008/9/5 Fernando Ghisi [EMAIL PROTECTED]: How can I get a reference to a itemRenderer of a chart series? If I use getStyle method, I´ll get the reference of the ClassFactory Ex: Series(chart.series[index]).getStyle(itemRenderer) Looking for any property that I could use, I´ve found in the ColumnSeries a property called _instanceCache. I could get a reference of the objects created by the ClassFactory using _instanceCache.instances, but this attribute is private. So, what should I do to get the reference of the itemRenderes of the series? -- Fernando Benedet Ghisi -- Fernando Benedet Ghisi -- Igor Costa www.igorcosta.com www.igorcosta.org -- Fernando Benedet Ghisi -- Fernando Benedet Ghisi