[flexcoders] Re: How do you alternate two colors in a single column on a stacked bar chart
Check out the fillFunction(): http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_07.html --- In flexcoders@yahoogroups.com, rlull2001 rlull2...@... wrote: I want to alternate two colors on a stacked bar chart. For example, if there are 4 items stacked in a single column, I want the first and third one to be orange and the second and fourth ones to be blue. Does anyone know how to do this?
[flexcoders] Re: ColumnChart LineSeries Bug?
I understand your frustration. I've been through it myself. In the end, I found that I got better results by creating the charts through action script. Granted, it takes a little longer and there's a lot more to learn, but because you're combining line and columns AND changing the chart type at run-time, there may not be a simple MXML-only solution. -Eddie B. --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi Eddie, Thanks for the link. I tried to emulate the example as you have provided in the link but it seems that when I set the following: mx:ColumnSet type=stacked for my column series, the columns does not render (not displaying). Changing the type from stacked to clustered, the columns are rendered and displayed. I still cannot figure this out though. I think it must be because both line series is intersecting with the columns, but when I tried to disable one of the line series and set the columns type to stacked, they still don't render. Am already banging my head for the past couple of days on this. I hope adobe could post a resolution on this, or perhaps a little work around. Thanks and regards, Angelo From: EddieBerman eddieberman2...@... To: flexcoders@yahoogroups.com Sent: Monday, 12 October, 2009 0:35:08 Subject: [flexcoders] Re: ColumnChart LineSeries Bug? I began creating an example for you and unfortunately discovered another bug further down the chain that had to do with stacking the columns. Rather than diagnose that now, here's a great blog article I found a while back that may be a better starting point, particularly since you'll get past the other annoying flex bug that messes with the visual spacing between columns when combining lines and columns. http://flexxxed. wordpress. com/2009/ 05/20/using- right-chart- when-you- have-multiple- chart-series/ And just an FYI - I've run into so many bugs changing from clustered to stacked to 100% at runtime that I ultimately chose to simply have multiple charts, one of each type, that I hide/show as needed. It's a headache, but since the bugs I've logged in the Adobe bug base haven't yet been addressed, it's the best solution for us. You may be luckier depending on your needs. -Eddie B. http://www.edberman .com --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Eddie, Thanks for the pointers. Care to show some sample code on how I may be able to achieve extending the ColumnChart. as? I am quite new with Flex and would appreciate a lot if you could provide me some further directions to achieve this. Thanks a lot. Rgds, Angelo _ _ __ From: EddieBerman eddieberman2000@ ... To: flexcod...@yahoogro ups.com Sent: Sunday, 11 October, 2009 2:19:38 Subject: [flexcoders] Re: ColumnChart LineSeries Bug? It's a flex bug. It fails in applySeriesSet( ) in ColumnChart. as. The case statement for stacked and 100% assumes that the series is a column series and chokes on the line: seriesSet[i] .offset = 0; as there's no offset for lines series. You can get past this problem by extending ColumnChart. as and overriding this function, filtering for line series. -Eddie B. --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi FlexCoders, I wonder if any of you came up with this bug in ColumnChart. In my ColumnChart, I have the following MXML: ComboBox dataProvider= {['overlaid' ,'clustered' ,'stacked' ,'100%']} id=stackType selectedItem= clustered / ColumnChart id=myChart2 type={stackType. value} showDataTips= true dataProvider= {SMITH} height=100% width=100% horizontalAxis CategoryAxis categoryField= qtr/ /horizontalAxis verticalAxis LinearAxis minimum=0 maximum=3 title=YTD TRCFs/ /verticalAxis series ColumnSeries dataProvider= {SMITH} xField=qtr yField=lti displayName= SMITH /ColumnSeries ColumnSeries dataProvider= {SMITH} xField=qtr yField=rwc displayName= RWC /ColumnSeries ColumnSeries dataProvider= {SMITH} xField=qtr yField=mtc displayName= MTC /ColumnSeries !--LineSeries dataProvider= {SMITH} xField=qtr yField=target displayName= TARGET /LineSeries LineSeries dataProvider= {SMITH} xField=qtr yField=ytdTRCF displayName= YTD TRCF /LineSeries -- /series /ColumnChart Legend dataProvider= {myChart2} direction=horizont al/ and in my script, I have the following declaration: [Bindable] public var SMITH:Array = [ {qtr:Jan, close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, {qtr:Feb, close:1, target:0.9, ytdTRCF:0.44, lti:1, mtc:0, rwc:1}, {qtr:Mar, close:1, target:0.9, ytdTRCF:0.42, lti:1, mtc:0, rwc:0}, {qtr:Apr, close:1, target:0.9, ytdTRCF
[flexcoders] Re: ColumnChart LineSeries Bug?
I began creating an example for you and unfortunately discovered another bug further down the chain that had to do with stacking the columns. Rather than diagnose that now, here's a great blog article I found a while back that may be a better starting point, particularly since you'll get past the other annoying flex bug that messes with the visual spacing between columns when combining lines and columns. http://flexxxed.wordpress.com/2009/05/20/using-right-chart-when-you-have\ -multiple-chart-series/ http://flexxxed.wordpress.com/2009/05/20/using-right-chart-when-you-hav\ e-multiple-chart-series/ And just an FYI - I've run into so many bugs changing from clustered to stacked to 100% at runtime that I ultimately chose to simply have multiple charts, one of each type, that I hide/show as needed. It's a headache, but since the bugs I've logged in the Adobe bug base haven't yet been addressed, it's the best solution for us. You may be luckier depending on your needs. -Eddie B.http://www.edberman.com www.edberman.com --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi Eddie, Thanks for the pointers. Care to show some sample code on how I may be able to achieve extending the ColumnChart.as? I am quite new with Flex and would appreciate a lot if you could provide me some further directions to achieve this. Thanks a lot. Rgds, Angelo From: EddieBerman eddieberman2...@... To: flexcoders@yahoogroups.com Sent: Sunday, 11 October, 2009 2:19:38 Subject: [flexcoders] Re: ColumnChart LineSeries Bug? It's a flex bug. It fails in applySeriesSet( ) in ColumnChart. as. The case statement for stacked and 100% assumes that the series is a column series and chokes on the line: seriesSet[i] .offset = 0; as there's no offset for lines series. You can get past this problem by extending ColumnChart. as and overriding this function, filtering for line series. -Eddie B. --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi FlexCoders, I wonder if any of you came up with this bug in ColumnChart. In my ColumnChart, I have the following MXML: ComboBox dataProvider= {['overlaid' ,'clustered' ,'stacked' ,'100%']} id=stackType selectedItem= clustered / ColumnChart id=myChart2 type={stackType. value} showDataTips= true dataProvider= {SMITH} height=100% width=100% horizontalAxis CategoryAxis categoryField= qtr/ /horizontalAxis verticalAxis LinearAxis minimum=0 maximum=3 title=YTD TRCFs/ /verticalAxis series ColumnSeries dataProvider= {SMITH} xField=qtr yField=lti displayName= SMITH /ColumnSeries ColumnSeries dataProvider= {SMITH} xField=qtr yField=rwc displayName= RWC /ColumnSeries ColumnSeries dataProvider= {SMITH} xField=qtr yField=mtc displayName= MTC /ColumnSeries !--LineSeries dataProvider= {SMITH} xField=qtr yField=target displayName= TARGET /LineSeries LineSeries dataProvider= {SMITH} xField=qtr yField=ytdTRCF displayName= YTD TRCF /LineSeries -- /series /ColumnChart Legend dataProvider= {myChart2} direction=horizont al/ and in my script, I have the following declaration: [Bindable] public var SMITH:Array = [ {qtr:Jan, close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, {qtr:Feb, close:1, target:0.9, ytdTRCF:0.44, lti:1, mtc:0, rwc:1}, {qtr:Mar, close:1, target:0.9, ytdTRCF:0.42, lti:1, mtc:0, rwc:0}, {qtr:Apr, close:1, target:0.9, ytdTRCF:0.40, lti:1, mtc:0, rwc:0}, {qtr:May, close:1, target:0.9, ytdTRCF:0.40, lti:0, mtc:1, rwc:0}, {qtr:Jun, close:1, target:0.9, ytdTRCF:0.38, lti:0, mtc:1, rwc:0}, {qtr:Jul, close:1, target:0.9, ytdTRCF:0.32, lti:0, mtc:0, rwc:0}, {qtr:Aug, close:1, target:0.9, ytdTRCF:0.32, lti:0, mtc:1, rwc:0}, {qtr:Sep, close:1, target:0.9, ytdTRCF:0.32, lti:0, mtc:2, rwc:0}, {qtr:Oct, close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, {qtr:Nov, close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, {qtr:Dec, close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0} ]; As you may notice, I have commented out the LineSeries tags for the column chart component. Doing this, my column chart renders properly (i.e., selecting the type from the combobox displays the selected column chart type properly). But when I uncomment out the Line Series, what happens is that the chart will render fine when the type is clustered but when I select, say the stacked or 100% type, my whole application does not respond and the chart is not displayed properly. Selecting back
[flexcoders] Re: ColumnChart LineSeries Bug?
It's a flex bug. It fails in applySeriesSet() in ColumnChart.as. The case statement for stacked and 100% assumes that the series is a column series and chokes on the line: seriesSet[i].offset = 0; as there's no offset for lines series. You can get past this problem by extending ColumnChart.as and overriding this function, filtering for line series. -Eddie B. --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi FlexCoders, I wonder if any of you came up with this bug in ColumnChart. In my ColumnChart, I have the following MXML: ComboBox dataProvider={['overlaid','clustered','stacked','100%']} id=stackType selectedItem=clustered / ColumnChart id=myChart2 type={stackType.value} showDataTips=true dataProvider={SMITH} height=100% width=100% horizontalAxis CategoryAxis categoryField=qtr/ /horizontalAxis verticalAxis LinearAxis minimum=0 maximum=3 title=YTD TRCFs/ /verticalAxis series ColumnSeries dataProvider={SMITH} xField=qtr yField=lti displayName=SMITH /ColumnSeries ColumnSeries dataProvider={SMITH} xField=qtr yField=rwc displayName=RWC /ColumnSeries ColumnSeries dataProvider={SMITH} xField=qtr yField=mtc displayName=MTC /ColumnSeries !--LineSeries dataProvider={SMITH} xField=qtr yField=target displayName=TARGET /LineSeries LineSeries dataProvider={SMITH} xField=qtr yField=ytdTRCF displayName=YTD TRCF /LineSeries-- /series /ColumnChart Legend dataProvider={myChart2} direction=horizontal/ and in my script, I have the following declaration: [Bindable] public var SMITH:Array = [ {qtr:Jan, close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, {qtr:Feb, close:1, target:0.9, ytdTRCF:0.44, lti:1, mtc:0, rwc:1}, {qtr:Mar, close:1, target:0.9, ytdTRCF:0.42, lti:1, mtc:0, rwc:0}, {qtr:Apr, close:1, target:0.9, ytdTRCF:0.40, lti:1, mtc:0, rwc:0}, {qtr:May, close:1, target:0.9, ytdTRCF:0.40, lti:0, mtc:1, rwc:0}, {qtr:Jun, close:1, target:0.9, ytdTRCF:0.38, lti:0, mtc:1, rwc:0}, {qtr:Jul, close:1, target:0.9, ytdTRCF:0.32, lti:0, mtc:0, rwc:0}, {qtr:Aug, close:1, target:0.9, ytdTRCF:0.32, lti:0, mtc:1, rwc:0}, {qtr:Sep, close:1, target:0.9, ytdTRCF:0.32, lti:0, mtc:2, rwc:0}, {qtr:Oct, close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, {qtr:Nov, close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, {qtr:Dec, close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0} ]; As you may notice, I have commented out the LineSeries tags for the column chart component. Doing this, my column chart renders properly (i.e., selecting the type from the combobox displays the selected column chart type properly). But when I uncomment out the Line Series, what happens is that the chart will render fine when the type is clustered but when I select, say the stacked or 100% type, my whole application does not respond and the chart is not displayed properly. Selecting back the working type (i.e. clustered) still does not do anything. Is this a bug in Adobe Flex Column Chart? Appreciate your inputs. Thanks. Regards, Angelo
[flexcoders] Re: Simple chart data tip question
You can add a callback function on your chart to return any text you'd like. Look into the dataTipFunction here: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_displayin\ gdata_08.html You%20can%20add%20a%20callback%20function%20on%20your%20chart%20to%20re\ turn%20any%20text%20you%27d%20like.%20Look%20into%20the%20 other examples: http://www.codersrevolution.com/index.cfm/2008/10/14/Flex-Charting-Forma\ t-Your-Data-Tips-The-Same-As-Your-Axes http://www.codersrevolution.com/index.cfm/2008/10/14/Flex-Charting-Form\ at-Your-Data-Tips-The-Same-As-Your-Axes http://blog.kevinhoyt.org/?p=67 http://blog.kevinhoyt.org/?p=67 google for more -Eddie B. --- In flexcoders@yahoogroups.com, |Mirko msabl...@... wrote: Hi, If i have a graph with let's say month names on x-axis and some numeric values on y-axis, when over specific chart item tooltip displays both month name and numeric value. How can i achive that tooltip displays only let's say numeric value (y-axis value) and not also month name (x-axis value)? Thanks in advance, Best regards -- View this message in context: http://www.nabble.com/Simple-chart-data-tip-question-tp25212571p25212571\ .html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: AxisRenderer Error #1009: Cannot access a property or method of a null object reference
That makes sense. I'll give it a try. Thanks much. --- In flexcoders@yahoogroups.com, Chad Callahan chad.calla...@... wrote: My application grew too large to pull a snippet out of as well. I began to put a sample application together but while doing so found where my error stemmed from. I got the error when the numeric data points on the chart were of values greater than 6 digits. What fixed it for me was setting the canDropLabels property of AxisRenderer to false. It appears that the values were too large so the AxisRenderer was dropping those labels, and when it tried to calculate the vertical gutters to make room for the labels, the labels that were dropped were then null, causing a null object reference error. I hope this helps you as well. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of EddieBerman Sent: Wednesday, July 22, 2009 11:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: AxisRenderer Error #1009: Cannot access a property or method of a null object reference I have no solution for you, but have come across this problem as well. If you have a simple app that demonstrates this error, you should create a new bug on the Adobe Bug Base and attach the code. My app is too huge at this point, and I haven't yet distilled it down to a submittable size. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Chad Callahan Chad.Callahan@ wrote: I am using a ColumnChart with a ColumnSet of type stacked. If I switch this ColumnSet.type property to 100% then it works just as expected, but when I use the stacked type, I get the following: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.charts::AxisRenderer/calcVerticalGutters()[C:\work\flex\dmv_automatio n\projects\datavisualisation\src\mx\charts\AxisRenderer.as:2055] at mx.charts::AxisRenderer/calcRotationAndSpacing()[C:\work\flex\dmv_automa tion\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1845] at mx.charts::AxisRenderer/adjustGutters()[C:\work\flex\dmv_automation\proj ects\datavisualisation\src\mx\charts\AxisRenderer.as:1534] at mx.charts::AxisRenderer/set gutters()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\ charts\AxisRenderer.as:836] at mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\work\flex\d mv_automation\projects\datavisualisation\src\mx\charts\chartClasses\Cart esianChart.as:2110] at mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\work\flex\ dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\Car tesianChart.as:1366] at mx.core::UIComponent/validateDisplayList() at mx.managers::LayoutManager/validateClient() at mx.core::UIComponent/validateNow() at com.deere.jdlink.view.dashboard.pod::UltimatePod/set data()[C:\Documents and Settings\chad.callahan\My Documents\clients\deere\jdlink\repository\trunk\development\flex\src\com \deere\jdlink\view\dashboard\pod\UltimatePod.mxml:109] at spark.components::DataGroup/updateRenderer() at spark.components::DataGroup/http://www.adobe.com/2006/flex/mx/internal:: http://www.adobe.com/2006/flex/mx/internal:: itemAdded() at spark.components::DataGroup/initializeDataProvider() at spark.components::DataGroup/commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/validateProperties() at mx.managers::LayoutManager/doPhasedInstantiation() at mx.managers::LayoutManager/doPhasedInstantiationCallback() Which is thrown from AxisRenderer line 2055 private function calcVerticalGutters(width:Number, leftGutter:Number, rightGutter:Number, firstLabel:ARLabelData, lastLabel:ARLabelData, adjustable:Object):Object { var labelAlignOffset:Number = this.labelAlignOffset; var axisLength:Number = width - leftGutter - rightGutter; var LS:Number = firstLabel.height * labelAlignOffset; var RS:Number = firstLabel.height * (1 - labelAlignOffset); var P1:Number = firstLabel.position; var P2:Number = 1 - lastLabel.position; ---(line 255) The error is being thrown because lastLabel is null. Can anyone think of how lastLabel could possibly be null? Thanks, Chad
[flexcoders] Re: AxisRenderer Error #1009: Cannot access a property or method of a null object reference
I have no solution for you, but have come across this problem as well. If you have a simple app that demonstrates this error, you should create a new bug on the Adobe Bug Base and attach the code. My app is too huge at this point, and I haven't yet distilled it down to a submittable size. --- In flexcoders@yahoogroups.com, Chad Callahan chad.calla...@... wrote: I am using a ColumnChart with a ColumnSet of type stacked. If I switch this ColumnSet.type property to 100% then it works just as expected, but when I use the stacked type, I get the following: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.charts::AxisRenderer/calcVerticalGutters()[C:\work\flex\dmv_automatio n\projects\datavisualisation\src\mx\charts\AxisRenderer.as:2055] at mx.charts::AxisRenderer/calcRotationAndSpacing()[C:\work\flex\dmv_automa tion\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1845] at mx.charts::AxisRenderer/adjustGutters()[C:\work\flex\dmv_automation\proj ects\datavisualisation\src\mx\charts\AxisRenderer.as:1534] at mx.charts::AxisRenderer/set gutters()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\ charts\AxisRenderer.as:836] at mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\work\flex\d mv_automation\projects\datavisualisation\src\mx\charts\chartClasses\Cart esianChart.as:2110] at mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\work\flex\ dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\Car tesianChart.as:1366] at mx.core::UIComponent/validateDisplayList() at mx.managers::LayoutManager/validateClient() at mx.core::UIComponent/validateNow() at com.deere.jdlink.view.dashboard.pod::UltimatePod/set data()[C:\Documents and Settings\chad.callahan\My Documents\clients\deere\jdlink\repository\trunk\development\flex\src\com \deere\jdlink\view\dashboard\pod\UltimatePod.mxml:109] at spark.components::DataGroup/updateRenderer() at spark.components::DataGroup/http://www.adobe.com/2006/flex/mx/internal:: itemAdded() at spark.components::DataGroup/initializeDataProvider() at spark.components::DataGroup/commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/validateProperties() at mx.managers::LayoutManager/doPhasedInstantiation() at mx.managers::LayoutManager/doPhasedInstantiationCallback() Which is thrown from AxisRenderer line 2055 private function calcVerticalGutters(width:Number, leftGutter:Number, rightGutter:Number, firstLabel:ARLabelData, lastLabel:ARLabelData, adjustable:Object):Object { var labelAlignOffset:Number = this.labelAlignOffset; var axisLength:Number = width - leftGutter - rightGutter; var LS:Number = firstLabel.height * labelAlignOffset; var RS:Number = firstLabel.height * (1 - labelAlignOffset); var P1:Number = firstLabel.position; var P2:Number = 1 - lastLabel.position; ---(line 255) The error is being thrown because lastLabel is null. Can anyone think of how lastLabel could possibly be null? Thanks, Chad
[flexcoders] Re: Charts - multiple data series (column/line) bar width issue
This is due to a Flex bug (https://bugs.adobe.com/jira/browse/FLEXDMV-1957 https://bugs.adobe.com/jira/browse/FLEXDMV-1957 ) which I'd love to see fixed. Until then, here's one solution that I found: http://flexxxed.wordpress.com/ http://flexxxed.wordpress.com/2009/05/20/using-right-chart-when-you-hav\ e-multiple-chart-series/ http://flexxxed.wordpress.com/ http://flexxxed.wordpress.com/ Good luck, Eddie B. --- In flexcoders@yahoogroups.com, Shurup shu...@... wrote: Hi I have an issue with column width in mixed chart: on one chart I have 9 line series and 1 column series and visually that one column takes 1/10 of the category width, which would be logical if other series would also be columns (then each of them would take 1/10 of widths and it would look perfect). But line series don't spread into the rest 9/10 of the space, all together they also take only 1/10 of the space (and all data points are on same X coordinate at same exact X position and not spread horizontally to take free Y space), so they only reserve horizontal space in category width, but don't use it. Here is a screenshot of what I'm talking about: http://www.shurup.info/screenshot_chart.jpg Is there any way to make a fixed width of the column chart at least to 1/2 of the category width and all line series would be in other 1/2 of the space? Thank you!!!
[flexcoders] Re: Possible to create a chart with clustered overlaid columns? (picture inside)
While I haven't yet attempted that layout, here are my thoughts on one potential path: You'll need 5 series, with the first one (series 0) being the composite (as the series are drawn from 0 to n, and if the composite column was the last one it would draw over the previous columns). You'll need to adjust the individual series columnWidthRatios and offsets so that series 0 and series 1 start at the same x position, and (obviously) series 1-4 take up the space of 5 series columns. You'll need to have an itemRenderer for series 0. Override updateDisplayList() and set the unscaledWidth to be wide enough to span series 1-4. Here are some potentially helpful links: 1) demonstrates tampering with columnWidthRatio and offsets: http://www.stretchmedia.ca/code_examples/offset_calculator/SeriesOffsetC\ alculator.html http://www.stretchmedia.ca/code_examples/offset_calculator/SeriesOffset\ Calculator.html 2) QuietlyScheming shows an example of complex stacking which you'll need since series 0 is a composite: http://demo.quietlyscheming.com/ChartSampler/app.html http://demo.quietlyscheming.com/ChartSampler/app.html That's only a start as you'll still need to also create a custom legend and deal with the challenge of having the first 4 clusters blue-ish and the next 4 orange-y. Having custom itemRenderers should help with that coloring issue. Good luck! -Eddie B. --- In flexcoders@yahoogroups.com, gmoniey22 gmonie...@... wrote: I haven't been able to find an example of this, or any indication in the docs of how to do this, but I would imagine it is possible. I want to chart some data that is hierarchical. Essentially each parent has a few children. I want the children to be clustered columns inside a big column which indicates the parent (which is the sum of all the children) I found this example image which kinda shows what I am thinking of: http://peltiertech.com/images/2009-02/MariBar_OverlapColumns.png Thanks!
[flexcoders] BarChart - CartesianDataCanvas lifecycle problem
Due to a bug that causes chart item labels to not appear (https://bugs.adobe.com/jira/browse/FLEXDMV-2158 https://bugs.adobe.com/jira/browse/FLEXDMV-2158 ), I'm having to create my own chart item labels. Though a simple approach is to add labels to the itemRenderers, I can't use that method in this particular instance. Instead, I'm looking at using a CartesianDataCanvas annotationElement that contains an array of labels. Since the chart displays real-time data that updates every 5 seconds, the thought was to use the chart's updateComplete event to first set the label's text and then position each label using updateDataChild(). The problem is that this causes another update cycle of the chart itself, which becomes an unending loop. Is there a way to set the text and position of a label on the CartesianDataCanvas as the absolute last step of the update process such that it won't restart the updating process? Thanks in advance.
[flexcoders] Adobe Bug System - Please explain the internal Found in Version numbers
When adding new bugs to the Adobe Bug System (chart bugs in my case), I'm never entirely clear as to what version to use from those offered in the drop-down. I'd like to use, for example, SDK 3.3.0, but that's not one of the choices. I have no idea what I12, I12, DMV 3.0.2, DMV 3.4.0, etc, are so I leave the field blank, and then note my SDK version in the Steps To Reproduce. I've searched for clues, but can't find one. I suspect I'm not the only one dealing with this. Thanks in advance for deciphering the list. Cheers, Eddie B.
[flexcoders] Help needed - assigning a custom CartesianTransform to a ColumnChart at runtime
Anyone with CartesianTransform knowledge? I'm having a good bit of difficulty getting a dynamically assigned custom CartesianTransform to work. I'm not finding a whole lot of sample code to learn from and am currently slogging through the framework code trying to determine what's up. Hopefully someone with more knowledge or experience can point me in the right direction. I just spent way too much time with a related dataTransform issue before I realized that it was an unreported bug (https://bugs.adobe.com/jira/browse/FLEXDMV-2103), and I'd prefer to know more quickly if this too is a bug, or just inexperience. I've made a simple demo to demonstrate the problem. The code is below. Thanks in advance. Eddie B. Steps: 1) Compile and run the 2 files below (main app and custom transform) 2) Click the Change Data button to see that the data changes correctly. 3) Click the Set Transforms button to assign the new transform. 4) Click the Change Data button again to see the problem. /* File 1 : The Main App */ ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.charts.chartClasses.*; [Bindable] private var medalsAC:ArrayCollection = new ArrayCollection( [ { Country: USA, Gold: 35, Silver:39, Bronze: 29 }, { Country: China, Gold: 32, Silver:17, Bronze: 14 }, { Country: Russia, Gold: 27, Silver:27, Bronze: 38 } ]); [Bindable] private var medalsAC2:ArrayCollection = new ArrayCollection( [ { Country: USA, Gold: 25, Silver:32, Bronze: 29 }, { Country: China, Gold: 12, Silver:17, Bronze: 44 }, { Country: Russia, Gold: 17, Silver:17, Bronze: 38 } ]); private function setTransforms():void { for (var i:int = 0; i chart.series.length; i++) { var cs:ColumnSeries = chart.series[i] as ColumnSeries; var elements:Array = cs.dataTransform.elements; cs.dataTransform = new MyCartesianTransform(); //cs.dataTransform.elements = elements; //cs.dataTransform.setAxis(CartesianTransform.HORIZONTAL_AXIS, ca); //cs.invalidateProperties(); } } private function showTransforms():void { var classInfo:XML; textArea.text = \nStacked chart's transforms:\n; for (var i:int = 0; i chart.series.length; i++) { var cs:ColumnSeries = chart.series[i] as ColumnSeries; classInfo = describeType(cs.dataTransform); textArea.text += classin...@name.tostring() + \n; } } private function changeData():void { if (chart.dataProvider == medalsAC) chart.dataProvider = medalsAC2; else chart.dataProvider = medalsAC; } ]] /mx:Script mx:Panel title=Stacked Chart / CartesianTransform Bug height=100% width=100% layout=vertical mx:ColumnChart id=chart height=100% width=45% dataProvider={medalsAC} mx:horizontalAxis mx:CategoryAxis id=ca categoryField=Country/ /mx:horizontalAxis mx:series mx:ColumnSeries xField=Country yField=Gold displayName=Gold / mx:ColumnSeries xField=Country yField=Silver displayName=Silver / mx:ColumnSeries xField=Country yField=Bronze displayName=Bronze / /mx:series /mx:ColumnChart mx:Legend dataProvider={chart}/ mx:Button label=Change Data click=changeData()/ mx:Button label=Set Transforms click=setTransforms()/ mx:Button label=Show Transform info click=showTransforms()/ mx:TextArea id=textArea height=174 width=100%/ /mx:Panel /mx:Application / File 2 : The Custom Cartesian Transform / package { import mx.charts.ColumnChart; import mx.charts.chartClasses.CartesianTransform; public class MyCartesianTransform extends CartesianTransform { public function MyCartesianTransform(){ super(); } override public function transformCache(cache:Array /* of Object */, xField:String, xConvertedField:String, yField:String, yConvertedField:String):void { var series:MyColumnSeries = this.elements[0] as MyColumnSeries; if (series != null) { var str:String = series.owner.name; trace(MyCartesianTransform: + str); } else { trace(series == null. Where are the elements?); } super.transformCache(cache, xField, xConvertedField, yField, yConvertedField); } }
[flexcoders] How do I assign a custom CartestianTransform to a ColumnChart?
Anyone with CartesianTransform knowledge? I'm having a good bit of difficulty getting a dynamically assigned custom CartesianTransform to work. I'm not finding a whole lot of sample code to learn from and am currently slogging through the framework code trying to determine what's up. The problem is that once I assign the new Transform, the columns no longer display. It seems that the new Tranform doesn't seem to have the needed ColumnSeries data. Why this data isn't assigned when the Transform is created and attached to the series is a bit of a mystery. Is there another step needed, or is this a bug? Hopefully someone with more knowledge or experience can point me in the right direction. I just spent way too much time with a related dataTransform issue before I realized that it was indeed an unreported bug (https://bugs.adobe.com/jira/browse/FLEXDMV-2103), and I'd prefer to know more quickly if this too is a bug, or just inexperience. I've made a simple demo to demonstrate the problem. The code is below. Thanks in advance. Eddie B. Steps: 1) Compile and run the 2 files below (main app and custom transform) 2) Click the Change Data button to see that the data changes correctly. 3) Click the Set Transforms button to assign the new transform. 4) Click the Change Data button again to see the columns fail to display. /* File 1 : The Main App */ ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.charts.chartClasses.*; [Bindable] private var medalsAC:ArrayCollection = new ArrayCollection( [ { Country: USA, Gold: 35, Silver:39, Bronze: 29 }, { Country: China, Gold: 32, Silver:17, Bronze: 14 }, { Country: Russia, Gold: 27, Silver:27, Bronze: 38 } ]); [Bindable] private var medalsAC2:ArrayCollection = new ArrayCollection( [ { Country: USA, Gold: 25, Silver:32, Bronze: 29 }, { Country: China, Gold: 12, Silver:17, Bronze: 44 }, { Country: Russia, Gold: 17, Silver:17, Bronze: 38 } ]); private function setTransforms():void { for (var i:int = 0; i chart.series.length; i++) { var cs:ColumnSeries = chart.series[i] as ColumnSeries; var elements:Array = cs.dataTransform.elements; cs.dataTransform = new MyCartesianTransform(); //cs.dataTransform.elements = elements; //cs.dataTransform.setAxis(CartesianTransform.HORIZONTAL_AXIS, ca); //cs.invalidateProperties(); } } private function showTransforms():void { var classInfo:XML; textArea.text = \nStacked chart's transforms:\n; for (var i:int = 0; i chart.series.length; i++) { var cs:ColumnSeries = chart.series[i] as ColumnSeries; classInfo = describeType(cs.dataTransform); textArea.text += classin...@name.tostring() + \n; } } private function changeData():void { if (chart.dataProvider == medalsAC) chart.dataProvider = medalsAC2; else chart.dataProvider = medalsAC; } ]] /mx:Script mx:Panel title=Stacked Chart / CartesianTransform Bug height=100% width=100% layout=vertical mx:ColumnChart id=chart height=100% width=45% dataProvider={medalsAC} mx:horizontalAxis mx:CategoryAxis id=ca categoryField=Country/ /mx:horizontalAxis mx:series mx:ColumnSeries xField=Country yField=Gold displayName=Gold / mx:ColumnSeries xField=Country yField=Silver displayName=Silver / mx:ColumnSeries xField=Country yField=Bronze displayName=Bronze / /mx:series /mx:ColumnChart mx:Legend dataProvider={chart}/ mx:Button label=Change Data click=changeData()/ mx:Button label=Set Transforms click=setTransforms()/ mx:Button label=Show Transform info click=showTransforms()/ mx:TextArea id=textArea height=174 width=100%/ /mx:Panel /mx:Application / File 2 : The Custom Cartesian Transform / package { import mx.charts.ColumnChart; import mx.charts.chartClasses.CartesianTransform; public class MyCartesianTransform extends CartesianTransform { public function MyCartesianTransform(){ super(); } override public function transformCache(cache:Array /* of Object */, xField:String, xConvertedField:String, yField:String, yConvertedField:String):void { var series:MyColumnSeries = this.elements[0] as MyColumnSeries; if (series != null) { var str:String = series.owner.name; trace(MyCartesianTransform: + str); } else { trace(series == null. Where are the elements?); } super.transformCache(cache, xField, xConvertedField, yField, yConvertedField); } }
[flexcoders] How do I assign a custom CartesianTransform to a ColumnChart?
Anyone with CartesianTransform knowledge? I'm having a good bit of difficulty getting a dynamically assigned custom CartesianTransform to work. I'm not finding a whole lot of sample code to learn from and am currently slogging through the framework code trying to determine what's up. The problem is that once I assign the new Transform, the columns no longer display. It seems that the new Tranform doesn't seem to have the needed ColumnSeries data. Why this data isn't assigned when the Transform is created and attached to the series is a bit of a mystery. Is there another step needed, or is this a bug? Hopefully someone with more knowledge or experience can point me in the right direction. I just spent way too much time with a related dataTransform issue before I realized that it was indeed an unreported bug (https://bugs.adobe.com/jira/browse/FLEXDMV-2103), and I'd prefer to know more quickly if this too is a bug, or just inexperience. I've made a simple demo to demonstrate the problem. The code is below. Thanks in advance. Eddie B. Steps: 1) Compile and run the 2 files below (main app and custom transform) 2) Click the Change Data button to see that the data changes correctly. 3) Click the Set Transforms button to assign the new transform. 4) Click the Change Data button again to see the columns fail to display. /* File 1 : The Main App */ ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.charts.chartClasses.*; [Bindable] private var medalsAC:ArrayCollection = new ArrayCollection( [ { Country: USA, Gold: 35, Silver:39, Bronze: 29 }, { Country: China, Gold: 32, Silver:17, Bronze: 14 }, { Country: Russia, Gold: 27, Silver:27, Bronze: 38 } ]); [Bindable] private var medalsAC2:ArrayCollection = new ArrayCollection( [ { Country: USA, Gold: 25, Silver:32, Bronze: 29 }, { Country: China, Gold: 12, Silver:17, Bronze: 44 }, { Country: Russia, Gold: 17, Silver:17, Bronze: 38 } ]); private function setTransforms():void { for (var i:int = 0; i chart.series.length; i++) { var cs:ColumnSeries = chart.series[i] as ColumnSeries; var elements:Array = cs.dataTransform.elements; cs.dataTransform = new MyCartesianTransform(); //cs.dataTransform.elements = elements; //cs.dataTransform.setAxis(CartesianTransform.HORIZONTAL_AXIS, ca); //cs.invalidateProperties(); } } private function showTransforms():void { var classInfo:XML; textArea.text = \nStacked chart's transforms:\n; for (var i:int = 0; i chart.series.length; i++) { var cs:ColumnSeries = chart.series[i] as ColumnSeries; classInfo = describeType(cs.dataTransform); textArea.text += classin...@...() + \n; } } private function changeData():void { if (chart.dataProvider == medalsAC) chart.dataProvider = medalsAC2; else chart.dataProvider = medalsAC; } ]] /mx:Script mx:Panel title=Stacked Chart / CartesianTransform Bug height=100% width=100% layout=vertical mx:ColumnChart id=chart height=100% width=45% dataProvider={medalsAC} mx:horizontalAxis mx:CategoryAxis id=ca categoryField=Country/ /mx:horizontalAxis mx:series mx:ColumnSeries xField=Country yField=Gold displayName=Gold / mx:ColumnSeries xField=Country yField=Silver displayName=Silver / mx:ColumnSeries xField=Country yField=Bronze displayName=Bronze / /mx:series /mx:ColumnChart mx:Legend dataProvider={chart}/ mx:Button label=Change Data click=changeData()/ mx:Button label=Set Transforms click=setTransforms()/ mx:Button label=Show Transform info click=showTransforms()/ mx:TextArea id=textArea height=174 width=100%/ /mx:Panel /mx:Application / File 2 : The Custom Cartesian Transform / package { import mx.charts.ColumnChart; import mx.charts.chartClasses.CartesianTransform; public class MyCartesianTransform extends CartesianTransform { public function MyCartesianTransform(){ super(); } override public function transformCache(cache:Array /* of Object */, xField:String, xConvertedField:String, yField:String, yConvertedField:String):void { var series:MyColumnSeries = this.elements[0] as MyColumnSeries; if (series != null) { var str:String = series.owner.name; trace(MyCartesianTransform: + str); } else { trace(series == null. Where are the elements?); } super.transformCache(cache, xField, xConvertedField, yField, yConvertedField); } }
[flexcoders] To Adobe Folks - General Question About Using Deprecated Tags
I posted a related question here a few days back (ColumnCharts - problem adding a LineSeries to ColumnChart w/o SecondSeries), but this question is a bit more general. In order get past this bug - https://bugs.adobe.com/jira/browse/FLEXDMV-1957, I'm likely going to need to use the deprecated SecondSeries tag. My question is how safe is using this, or any of the other deprecated tags, methods, etc. I read what I could find in the docs, but what I saw seemed more focused on layout style differences. Is there an expectation that support could be dropped in future versions, or are these warnings simply there to point us to the newer, improved-upon replacements. Thanks, Eddie B.
[flexcoders] ColumnCharts - problem adding a LineSeries to ColumnChart w/o SecondSeries
I'm trying to add a LineSeries to a ColumnChart. The problem is that for each LineSeries added, a ghost series of columns is also added. This doesn't happen if I add a LineSeries via the SecondSeries tag, but I'm trying to avoid that since it's been deprecated. Is there a way to avoid the ghost column series? Am I doing something wrong? To better visualize the problem, look at this Adobe doc page: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html Notice how the columns in the very top image are adjacent, unlike the two examples below it which both contain placeholders for the added series, which won't ever be drawn since the series is actually the LineSeries floating on top. Any help or alternative solutions very much appreciated. -Eddie www.edberman.com
[flexcoders] Re: ColumnCharts - problem adding a LineSeries to ColumnChart w/o SecondSeries
Just noticed - it appears that this behavior has been logged as a bug: https://bugs.adobe.com/jira/browse/FLEXDMV-1957 Still looking for a workaround, in the event anyone's already dealt with this. Thanks, -Eddie --- In flexcoders@yahoogroups.com, EddieBerman eddieberman2...@... wrote: I'm trying to add a LineSeries to a ColumnChart. The problem is that for each LineSeries added, a ghost series of columns is also added. This doesn't happen if I add a LineSeries via the SecondSeries tag, but I'm trying to avoid that since it's been deprecated. Is there a way to avoid the ghost column series? Am I doing something wrong? To better visualize the problem, look at this Adobe doc page: http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html Notice how the columns in the very top image are adjacent, unlike the two examples below it which both contain placeholders for the added series, which won't ever be drawn since the series is actually the LineSeries floating on top. Any help or alternative solutions very much appreciated. -Eddie www.edberman.com
[flexcoders] Re: Showing grid in line series graph
Easy. Here are some links that should help: http://blog.flexexamples.com/2007/11/15/displaying-grid-lines-in-a- flex-linechart-control/ http://livedocs.adobe.com/flex/3/langref/mx/charts/GridLines.html -Eddie www.edberman.com --- In flexcoders@yahoogroups.com, Vik vik@... wrote: Hie I have a line series graph. Doing a showAlldataTip gives a bad look to my graph. So i just want to show grid lines in the graph. is it possible? how? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com
[flexcoders] Re: Chart Axis Location
If I understand correctly, you want to: 1) turn off all ticks (http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_04.html) 2) move the horizontal AxisRenderer. Ex: myHorizAxisRenderer.move(myHorizAxisRenderer.x, yourNewYPos); Keep in mind that you can set the placement for the horizontal AxisRenderer to initially be at the top of your chart. Then just move it down as needed to overlap the top of the chart. -Eddie www.edberman.com --- In flexcoders@yahoogroups.com, Chad Callahan chad.calla...@... wrote: And this is what I have so far http://screencast.com/t/UlS2yx1y From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Chad Callahan Sent: Wednesday, February 11, 2009 1:51 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Chart Axis Location I'm not using titles for the chart, so those don't matter. Let's say that I have the LineChart in a Canvas and i want the chart to fill 100% of that canvas so that I don't see anything on any sides of the chart (no buffer for axis labels and such). So yes, I want the tick marks and labels to be over top of the chart (overlay). Ultimately, I'm trying to build this: http://screencast.com/t/3vz1MULH http://screencast.com/t/3vz1MULH Thanks! From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Richard Rodseth Sent: Wednesday, February 11, 2009 12:00 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Chart Axis Location Do you mean that you want the title for the left vertical axis, for example, to be above the axis rather than sideways alongside it? Or do you mean that you want the horizontal axis, along with its tick marks and tick mark labels to be above the chart? The latter is easy, the former might be easiest down outside of the chart (i.e. by putting the chart on a canvas, with the vertical axis titles pinned to the left or right. On Wed, Feb 11, 2009 at 9:22 AM, Chad Callahan chad.calla...@... mailto:chad.calla...@... wrote: Hello, I am using a LineChart that has labels for the horizontal axis, but no labels for the vertical axis. I would like the labels to be displayed over top of the chart, rather than below or above of the chart. Does anyone have any good ideas on how to accomplish this? The point of this is to hide the extra space that is put around the chart to renderer the axis labels. I want my chart to take up 100% of the space it is allotted and place the axis labels on top of the chart. Thank you, Chad
[flexcoders] Re: building a pie chart with XML data
Try this: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=rockstar.send() mx:HTTPService id=rockstar url=xmldata.xml / mx:PieChart width=300 height=300 dataProvider={rockstar.lastResult.employees.employee} mx:series mx:PieSeries field=sales labelField=name labelPosition=callout / /mx:series /mx:PieChart mx:Button label=fred/ /mx:Application --- In flexcoders@yahoogroups.com, flexnoob flexn...@... wrote: I am trying to construct a pie chart using XML data and the resulting chart is empty. Because I am using the trial version I do see the flex data visualization trial message. However, the pie chart does not appear. I have the xml file located in the src directory. My flex 3 code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=rockstar.send() mx:HTTPService id=rockstar url=piebv.xml / mx:PieChart width=300 height=300 mx:series mx:PieSeries dataProvider={rockstar.lastResult.piebv.employee} field=@sales labelField=@name labelPosition=callout / /mx:series /mx:PieChart /mx:Application My XML: ?xml version=1.0 encoding=utf-8 ? employees employee name=Doug sales=15 / employee name=Deepa sales=75000 / employee name=Darron sales=3 / employee name=Ben sales=6 / /employees
[flexcoders] Re: building a pie chart with XML data
Try this (moved the dataprovider to the chart rather than the series and removed the @ before the field names) ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=rockstar.send() mx:HTTPService id=rockstar url=piebv.xml / mx:PieChart width=300 height=300 dataProvider={rockstar.lastResult.employees.employee} mx:series mx:PieSeries field=sales labelField=name labelPosition=callout / /mx:series /mx:PieChart /mx:Application --- In flexcoders@yahoogroups.com, flexnoob flexn...@... wrote: I am trying to construct a pie chart using XML data and the resulting chart is empty. Because I am using the trial version I do see the flex data visualization trial message. However, the pie chart does not appear. I have the xml file located in the src directory. My flex 3 code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=rockstar.send() mx:HTTPService id=rockstar url=piebv.xml / mx:PieChart width=300 height=300 mx:series mx:PieSeries dataProvider={rockstar.lastResult.piebv.employee} field=@sales labelField=@name labelPosition=callout / /mx:series /mx:PieChart /mx:Application My XML: ?xml version=1.0 encoding=utf-8 ? employees employee name=Doug sales=15 / employee name=Deepa sales=75000 / employee name=Darron sales=3 / employee name=Ben sales=6 / /employees
[flexcoders] Re: Flex chart zoom according to series
One idea - don't bind your legend to your chart. Create your own legend. To get the color, query your series fill style (once both series have initially been created), or just use the Halo colors array. An example: for (var i:int = 0; i array.length; i++) { var color:uint; var legItem:LegendItem = new LegendItem(); legend.addChild(legItem); legItem.label = array[i] legItem.setStyle(fill, determineYourColorHere...) legItem.setStyle(fontSize, 12); } -Eddie --- In flexcoders@yahoogroups.com, Sefi Ninio [EMAIL PROTECTED] wrote: Some more info: The legend wasn't there at all, and when I debugged the app, I caught an Error: ReferenceError: Error #1069: Property marker not found on com.innovid.view.common.LineSeries and there is no default value. Probably because it's a member of the chart itself and not of the series... On Sat, Nov 22, 2008 at 10:56 AM, Sefi Ninio [EMAIL PROTECTED] wrote: Hey, I have a chart with two series, but one has values a lot bigger than the other (avg of ~3000 against ~4), so the second series's values are almost not visible... Setting the big series's visibility to false doesn't cause the chart to redraw to show the small series since the big series is still there, just not visible. I'd like to implement a mechanism, that when clicking on the series item in the legend, the series is removed from the chart and clicking on it again will add it again I implemented logic that on click on a legend item, it removes the clicked series from the chart's dataProvider and stores it in backup arrayCollection to be able to put it back when the legend item is clicked again. This works and the chart rescales to view the small series just fine. The problem is, that when I remove a series from the chart, it is also removed from the legend (since it's dataProvider is bound to the chart itself) and I can't get it back in there since there's nothing to click on... So, I tried to bound the legend to a function that returns an arrayCollection which has it's source set to the combined series from the chart series array and the removed series array. This didn't work and the legend wasn't there at all... Any ideas anyone? Thanks, Sefi
[flexcoders] Re: 3 charts side by side but only one vertical axis?
Assuming ar is your AxisRenderer: ar.setStyle(showLabels, false); ar.setStyle('showLine', false); ar.setStyle(tickPlacement, none); -Eddie --- In flexcoders@yahoogroups.com, maunger [EMAIL PROTECTED] wrote: Hi y'all i have a customer who wants 3 charts jammed together (see the customer's mockup with my notes - http://img.skitch.com/20081120-pqa3yk2se6m94fugee6r8dnpi4.jpg ) but they only want one vertical axis with the values. I hope the image describes it better than i can with text. I've not found a way to suppress the vertical axis on a chart (which is what i think i need to do). I have the 3 charts ready to go, but just can't seem to get rid of the axis on 23. Any ideas? Thanks Mitch
[flexcoders] Re: Why aren't my .as files included when I build my project?
There could be any number of reasons, but if you haven't already tried this, you might try right-clicking on the .as filename and selecting Include Class in Library. -Eddie --- In flexcoders@yahoogroups.com, sailorsea21 [EMAIL PROTECTED] wrote: Hi everyone, why are my .as files being excluded when I build my project? Thanks.
[flexcoders] Re: How can I get my CircleItemRenderer to work with SeriesInterpolate?
Hmmm. It works for me. Here's my quick code sample: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:local=* creationComplete=Init() mx:Script![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var profits1:ArrayCollection = new ArrayCollection([ {Month:Jan, Profit:1900, Expenses:1540, Pizza:440}, {Month:Feb, Profit:1800, Expenses:2400, Pizza:470}, {Month:Mar, Profit:1300, Expenses:1400, Pizza:490}, ]); [Bindable] public var profits2:ArrayCollection = new ArrayCollection([ {Month:Jan, Profit:100, Expenses:300, Pizza:400}, {Month:Feb, Profit:200, Expenses:400, Pizza:500}, {Month:Mar, Profit:300, Expenses:200, Pizza:500}, ]); private var t:Timer; public var dataSet:int = 1; private function Init():void { t = new Timer(2000); t.addEventListener(TimerEvent.TIMER,swapData); t.start(); } private function swapData(e:Event):void { if (dataSet == 2) { colchart.dataProvider=profits1; dataSet=1; } else { colchart.dataProvider=profits2; dataSet=2; } } ]]/mx:Script mx:SeriesInterpolate id=seriesInterpolate duration=1500/ mx:Panel title=Column Chart mx:ColumnChart id=colchart dataProvider={profits1} mx:horizontalAxis mx:CategoryAxis id=catAxis categoryField=Month / /mx:horizontalAxis mx:verticalAxis mx:LinearAxis id=axis baseAtZero=false / /mx:verticalAxis mx:series mx:ColumnSeries xField=Month yField=Profit displayName=Profit itemRenderer=mx.charts.renderers.CircleItemRenderer showDataEffect={seriesInterpolate} / mx:ColumnSeries xField=Month yField=Expenses displayName=Expenses itemRenderer=mx.charts.renderers.CircleItemRenderer showDataEffect={seriesInterpolate} / mx:ColumnSeries xField=Month yField=Pizza displayName=Pizza itemRenderer=mx.charts.renderers.CircleItemRenderer showDataEffect={seriesInterpolate} / mx:LineSeries showDataEffect={seriesInterpolate} itemRenderer=mx.charts.renderers.CircleItemRenderer yField=Pizza displayName=TOTAL (2)/ /mx:series /mx:ColumnChart mx:Legend dataProvider={colchart}/ /mx:Panel /mx:Application --- In flexcoders@yahoogroups.com, sailorsea21 [EMAIL PROTECTED] wrote: Hi everyone, how can I get my CircleItemRenderer to work with my interpolate on a LineSeries??? If I remove the Interpolate, the ItemRenderer works fine but when I add the Interpolate, the itemRenderer disapears??? Do I need to import anything to make this work??? (import mx.charts...) This is my script. mx:SeriesInterpolate id=seriesInterpolate duration=1500/ (...) mx:series mx:ColumnSeries showDataEffect={seriesInterpolate} yField=TOTAL displayName=TOTAL/ mx:LineSeries showDataEffect={seriesInterpolate} temRenderer=mx.charts.renderers.CircleItemRenderer yField=TOTAL2 displayName=TOTAL (2)/ /mx:series Thanks.
[flexcoders] Re: sailorsea21 - How can I modify the value in my ColumnSeries datatip.
Here you go... private function myDataTipFunction( e:HitData ):String { var obj:Object = e.chartItem; if (e.chartItem is ColumnSeriesItem) { ...your columnSeries code here } else { ...your lineSeries code here } -Eddie --- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, sailorsea21 sailorsea21@ wrote: Hi Amy, My graph is a multiple series (Column and Line). I successfully modified the column series datatip but my line series data tip is now giving me an error: Type Coercion failed: cannot convert mx.charts.series::[EMAIL PROTECTED] to mx.charts.series.ColumnSeries. How can I have another function for my LineSeries data tip? This is my script: public function myDataTipFunction(e:HitData):String { var columnValue:String; var value:String; var yF:String = ColumnSeries(e.element).yField; if (yF == importations) { columnValue = ColumnSeries(e.element).displayName + \n + e.item.period + \n + numberFormatter.format (e.item.importations); value = columnValue; } else if (yF == finalises) { columnValue = ColumnSeries(e.element).displayName + \n + e.item.period + \n + numberFormatter.format(e.item.finalises); value = columnValue; } return value; } There should be a more generic type that both series types inherit from that you could use. If not, try casting it both ways and having alternate paths for each. HTH; Amy
[flexcoders] Re: Removing extreme ends of an Axis
The good news is that it's not a bug. Just add caps=none to your xAxisStroke definition. -Eddie --- In flexcoders@yahoogroups.com, jamiebadman [EMAIL PROTECTED] wrote: Hi, Weird one this... if you run the attached code, you'll see that on the horizontal axis, at each side of it, it extends fractionally past the vertical axes... anyone know how to prevent this? Thanks, Jamie. ?xml version=1.0? !-- charts/AddLabelsWithOffsetLines.mxml -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; backgroundColor=0xFF backgroundGradientColors=[0xFF, 0xFF] mx:Script![CDATA[ import mx.containers.HBox; import mx.charts.LinearAxis; import mx.containers.Box; import mx.collections.ArrayCollection; import mx.charts.series.items.ColumnSeriesItem; import mx.charts.ChartItem; import mx.charts.chartClasses.CartesianCanvasValue; import mx.charts.chartClasses.CartesianTransform; import qs.charts.dataShapes.*; [Bindable] public var profits:ArrayCollection = new ArrayCollection([ {Month:1, Profit:1300}, {Month:2, Profit:750}, {Month:3, Profit:1100}, {Month:4, Profit:1000}, {Month:5, Profit:980}, {Month:6, Profit:1500}, {Month:7, Profit:2060}, {Month:8, Profit:1700}, {Month:9, Profit:1690}, {Month:10, Profit:2200}, {Month:11, Profit:2550}, {Month:12, Profit:3000} ]); ]]/mx:Script mx:Stroke id=yAxisStroke color=#44 alpha=1 weight=2/ mx:Stroke id=xAxisStroke color=#44 alpha=1 weight=2/ mx:Canvas id=mainCanvas width=80% height=80% backgroundAlpha=0 mx:LineChart id=myChart width=100% height=90% dataProvider={profits} selectionMode=single mx:seriesFilters mx:Array/ /mx:seriesFilters mx:backgroundElements mx:CartesianDataCanvas id=canvas alpha=0 includeInRanges=false / /mx:backgroundElements mx:horizontalAxis mx:CategoryAxis dataProvider={profits} categoryField=Month / /mx:horizontalAxis mx:secondVerticalAxis mx:LinearAxis / /mx:secondVerticalAxis mx:horizontalAxisRenderer mx:AxisRenderer showLabels=false canStagger=false placement=top tickLength=0 minorTickPlacement=outside tickPlacement=outside minorTickLength=0 fontSize=11 mx:axisStroke{xAxisStroke}/mx:axisStroke mx:tickStroke{xAxisStroke}/mx:tickStroke mx:minorTickStroke{xAxisStroke}/mx:minorTickStroke /mx:AxisRenderer /mx:horizontalAxisRenderer mx:verticalAxisRenderer mx:AxisRenderer tickLength=0 minorTickPlacement=outside tickPlacement=outside minorTickLength=0 fontSize=11 fontWeight=normal mx:axisStroke{yAxisStroke}/mx:axisStroke mx:tickStroke{yAxisStroke}/mx:tickStroke mx:minorTickStroke{yAxisStroke}/mx:minorTickStroke /mx:AxisRenderer /mx:verticalAxisRenderer mx:secondVerticalAxisRenderer mx:AxisRenderer tickLength=0 minorTickPlacement=outside tickPlacement=outside minorTickLength=0 fontSize=11 fontWeight=normal mx:axisStroke{yAxisStroke}/mx:axisStroke mx:tickStroke{yAxisStroke}/mx:tickStroke mx:minorTickStroke{yAxisStroke}/mx:minorTickStroke /mx:AxisRenderer /mx:secondVerticalAxisRenderer mx:series mx:LineSeries id=mainSeries xField=Month yField=Profit displayName=Profit selectable=true mx:lineStroke mx:Stroke id=mainLine color=0x44 weight=2 / /mx:lineStroke /mx:LineSeries /mx:series /mx:LineChart /mx:Canvas /mx:Application
[flexcoders] Re: Drawing on Charts - pixel perfection?
Sounds like you've solved your problem, but my take is that for pixel drawing you'd be better off using a ChartElement object rather than the DataDrawingCanvas which is an abstraction more appropriate for data coords. For example - take a look at the framework code in GridLines.as. It's all pixel-based drawing. You can extend GridLines and do your own addtional drawing in update DisplayList() after calling super.updateDisplayList(). Or create a completely separate backgroundElement using a class extended from ChartElement. ...just some more options. -Eddie --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 29 Oct 2008, jamiebadman wrote: Thanks Tom... but that's still working with the data related to the chart rather than the chart dimensions and as such won't work unless your drawing requirements happen to correspond to actual data points. We use it to draw a cross in the background of the chart, with the center point at certain percentages of each axis' max. That's fairly disconnected from the actual data points :-) Glad you found something that worked out for you though. -- Tom Chiverton Helping to advantageously disseminate fine-grained interfaces 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: The trouble with Alert.show()
I can't help with the Alert issue, but since I often debug within a wrapper, here's one alternative that provides a constant, simple debug window. I can't remember, but I might've grabbed it from this forum originally. Paste the code below in your app. Call showWindow() to activate the window. Call debug(your text here) for your debug text. Good luck. import mx.events.*; import mx.containers.*; import mx.controls.*; import mx.managers.PopUpManager; private var _window:TitleWindow; private var debugText:TextArea = new TextArea(); private function showWindow():void { debugText.height = 600; debugText.width= 400; _window = TitleWindow(PopUpManager.createPopUp(this, TitleWindow)); _window.addChild(debugText); _window.showCloseButton = true; _window.addEventListener(CloseEvent.CLOSE,closeHandler); } public function debug(str:String):void { if (debugText.text.length 1000) debugText.text = ; debugText.text += str; } private function closeHandler(event:CloseEvent):void { PopUpManager.removePopUp(_window); } --- In flexcoders@yahoogroups.com, Amy [EMAIL PROTECTED] wrote: I am trying to troubleshoot a problem that only occurs in the Flash Player ActiveX embedded in an application, so I can't use normal debug methods. I'm trying to use Alert.show() to try to get to the bottom of what's going on. The problem I'm having is that in some situations, this just pops up the blurry overlay with no Alert on top (which means the Alert can't be dismissed). I tried making my Application really narrow to ensure it's not off the side. This is definitely not what is happening. Does anyone know what would cause Alert.show() to come up without an actual Alert? It might provide a clue as to what the larger problem is. Thanks! Amy
[flexcoders] Re: how do I send a custom event from an application to a component?
In this case, Application.application.addEventListener... won't work. This will, though: parentApplication.addEventListener(appEvent, appEventHandler); -Eddie --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: But you can dispatch an event from Application and listen for it in a component. Code in the component: Application.application.addEventListener(EventDispatchecInMainapp, listenerInThisComponent); Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott Melby Sent: Tuesday, September 30, 2008 8:03 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] how do I send a custom event from an application to a component? Rather than sending an event to a component, what you do is declare a public function in your component, then call it from the application. so... in myComp public function someFunction(var param1:type):void { //do stuff } and out in your main code you need to give your myComp an id... id=myComp. Then in your button click handler call myComp.someFunction(blah); hth Scott luvfotography wrote: Hi, I'm able to send a custom event from a component to an application, but how do I send a custom event from the application to a component? example code: mycomp.mxml: ?xml version=1.0 encoding=utf- 8? !--this is myapp.mxml-- mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml http://www.adobe.com/2006/mxml layout=absolute xmlns:comp= * xmlns:events= flash.events. * creationComplete= init() mx:Metadata [Event(name= appEvent , type=flash. events.Event )] /mx:Metadata mx:Script ![CDATA[ import mx.controls. Alert; private function init():void { addEventListener( compEvent ,compEventHandle r); } private function compEventHandler( e:Event): void { Alert.show( event received from component); } private function sendEvent(e: Event):void { var myappEvent:Event = new Event(appEvent , true,true); dispatchEvent( myappEvent) ; } ]] /mx:Script comp:mycomp / mx:Button label=send event to component id=appbutton click=sendEvent( event) / /mx:Application component: ?xml version=1.0 encoding=utf- 8? !--this is mycomp.mxml- - mx:Canvas xmlns:mx=http://www.adobe. com/2006/ mxml http://www.adobe.com/2006/mxml width=400 height=300 creationComplete= compInit( ) mx:Metadata [Event(name= compEvent , type=flash. events.Event )] /mx:Metadata mx:Script ![CDATA[ import mx.controls. Alert; private function compInit():void { addEventListener( appEvent ,appEventHandler ); } private function appEventHandler( e:Event): void { Alert.show( event received from application ); } private function sendEvent(e: Event):void { var mycompEvent: Event = new Event(compEvent , true,true); dispatchEvent( mycompEvent) ; } ]] /mx:Script mx:Button id=mybutton x=200 label=send event to application click=sendEvent( event) / /mx:Canvas thanks!
[flexcoders] Chart ItemRenderer - Seeking Confirmation of this Bad Memory Leak Queue Problem
I submitted this issue to the Adobe Flex Bug Mgmt System a few weeks back but haven't as yet seen a comment, nor did my last post on this forum yield a response, so I'm going to give it another go here. The problem I'm seeing is that you cannot dynamically switch itemRenderers on a chart series at runtime. You can code it, and run it, but any and all previous itemRenderers remain active. Since your likely initial graphics command is Graphics.clear(), you may not notice the problem as each itemRenderer clears the previous itemRenderer's drawing, BUT under the covers this continued switching of itemRenderers will add itemRenderers to the priorityQueue, eating memory and slowing things down along the way. ItemRenderers are never removed from the queue. I'm hoping someone with knowledge, or at least interest, could weigh in and let me know if indeed it's a bug, or if I'm coding this incorrectly, or if there's an alternative approach, etc... I'm polishing off a 3D ColumnChart and may have to remove support for dynamic itemRenderers. More info, a screenshot of a huge priorityQueue, and sample code can be found in my bug report: https://bugs.adobe.com/jira/browse/FLEXDMV- 1882. Thanks in advance to anyone who can help me move past this issue. Cheers, Eddie
[flexcoders] Chart ItemRenderer - Seeking Confirmation of this Bad Memory Leak Queue Bug
I submitted this issue to the Adobe Flex Bug Mgmt System a few weeks back but haven't as yet seen a comment, nor did my last post on this forum yield a response, so I'm going to give it another go here. The problem I'm seeing is that it appears that you cannot dynamically switch itemRenderers on a chart series at runtime. You can code it, and run it, but any and all previous itemRenderers continue to remain active. As your initial graphics command is likely to be Graphics.clear(), you may not notice the problem since each itemRenderer clears the previous itemRenderer's drawing, BUT under the covers this continued switching of itemRenderers will add itemRenderers to the priorityQueue, eating memory and slowing things down along the way. ItemRenderers are never removed from the queue. I'm hoping someone with knowledge, or at least interest, could weigh in and let me know if indeed it's a bug, or if I'm coding this incorrectly, or if there's an alternative approach, etc... More info, a screenshot of a huge priorityQueue, and sample code can be found in my bug report: https://bugs.adobe.com/jira/browse/FLEXDMV-182 Thanks in advance to anyone who can help me move past this issue. Cheers, Eddie
[flexcoders] Chart ItemRenderer - Seeking Confirmation of this Bad Memory Leak Queue Bug
I submitted this issue to the Adobe Flex Bug Mgmt System a few weeks back but haven't as yet seen a comment, nor did my last post on this forum yield a response, so I'm going to give it another go here. The problem I'm seeing is that it appears that you cannot dynamically switch itemRenderers on a chart series at runtime. Or rather - you can code it, and run it, but any and all previous itemRenderers continue to remain active. As your initial graphics command is likely to be Graphics.clear(), you may not notice the problem since each itemRenderer clears the previous itemRenderer's drawing, BUT under the covers continued switching of itemRenderers will simply add itemRenderers to the priorityQueue, eating memory and slowing things down along the way. ItemRenderers are never removed from the queue. I'm hoping someone with knowledge, or at least interest, could weigh in and let me know if indeed it's a bug, or if I'm coding this incorrectly, or if there's an alternative approach, etc... More info, a screenshot of a huge priorityQueue, and sample code can be found in my bug report: https://bugs.adobe.com/jira/browse/FLEXDMV-1882 Thanks in advance to anyone who can help me move past this issue. Cheers, Eddie
[flexcoders] Why does changing a chart's itemRenderer at runtime call BOTH itemRenderers?
At runtime, I'm changing the itemRenderer on my column chart's series based on the value of a checkbox. Pretty simple. Unfortunately, it appears to me that both itemRenderers - the previous and the current - are getting called. Prior to changing the itemRenderer, I clear the series style, but that doesn't seem to help. The more often I change the itemRenderers, the more they stack up, with each replaced one getting called prior to the actual assigned one. So - either this is a bug (haven't found it yet in the bugbase, but there are quite a few to sort through), or there's additional code that I need to ensure that changing an itemRenderer at runtime actually does a replace, rather than an add. The code to swap them is pretty simple (column0 refers to a ColumnSeries), but here it is anyway: column0.clearStyle(itemRenderer); if (chkbox.selected) column0.setStyle(itemRenderer, new ClassFactory(Renderer1)); else column0.setStyle(itemRenderer, new ClassFactory(Renderer2)); Can anyone clue me in here? I've written a very basic sample to demonstrate this problem if it's needed, but the above code pretty much says it all. Thanks, Eddie
[flexcoders] Stacked Charts - Series[0].items.length not accurate at certain times. Bug or ?
I've got a ColumnChart with its type set to stacked. I also have a BackgroundElement extended from CartesianDataCanvas, which I'll call myDataCanvas. There are times, particularly when the myDataCanvas updateDisplayList() is called, where it's not possible to get the items of Series[0]. I can get the items of Series[1] and above, but not Series[0]. Series[0].items.length will show as 0 (yet you can see the entire series items array in the debugger's Variables pane!). This isn't a problem when it's clustered, only when stacked. I can reproduce this easily in sample apps, and can include code if need be, but I was curious if perhaps anyone else has experienced this problem, and/or can offer some guidance towards a solution. Thanks in advance.
[flexcoders] Charts - how do I draw on a Background Element and NOT cause a refresh?
I've got a column chart with 2 BackgroundElements. One is extended from GridLines and the other, which sits between the grid and the columns (in the z-order) is extended from the CartesianDataCanvas class. Each ColumnSeries has an itemRenderer. I need to be able to draw on the my CartesianDataCanvas object WITHOUT it causing a redrawing of the series objects. Is this at all possible? Thanks in advance.
[flexcoders] Need info about my CartesianDataCanvas updating problem.
08/07/2008 05:29:00 AM New Messages Reply | Quote | Top | Bottom | Edit I've got a ColumnChart. In it I've extended the grid to add code to its updateDisplayList(). At the end of that method I want to notify another custom BackgroundElement that it should draw itself as well. This other custom BackgroundElement, which is extended from CartesianDataCanvas, is in front of the grid in the z-order. I'm initially looking to learn why my custom Background element (extended from CartesianDataCanvas) doesn't have its updateDisplayList() called by default. Is there a property that I'm not aware of that would force the layout code to call its updateDisplayList()? I was surprised that it wasn't being called. If the above can't be made to happen, I'm looking for ideas on how I can have the grid notify the CartesianDataCanvas to draw itself, but WITHOUT that action then causing the grid to be invalidated, forcing it to then redraw itself, in an unending cycle. Any info or pointers to information would be most appreciated. -Eddie Mark this message as the answer. Print this message Report this to a Moderator
[flexcoders] Re: Chart: pass info about series1 to series2 lineSegmentRenderer callback?
I don't believe you can pass params. An alternative would be to have your lineRenderer query upwards for the data. I do something similar and added the following code in my updateDisplayList(); (I don't know how important the initial LineSeries check is) override protected function updateDisplayList(wd:Number,ht:Number) { var lc:LineChart; if (parent is UIComponent) { var myParent:String = String(UIComponent(parent).className); if (myParent !=LineSeries) return; var ls:LineSeries = parent as LineSeries; lc = ls.owner as LineChart; var salesInfo:Number = lc.getSalesInfo(); // talk to lineChart here -Eddie --- In flexcoders@yahoogroups.com, chigwell23 [EMAIL PROTECTED] wrote: First question is whether I can pass actual parameters to a callback in the first place? This is what I need to do: mx:ColumnSeries id=salesSeries yField=sales /mx:ColumnSeries mx:LineSeries id=percSeries yField=percent lineSegmentRenderer=PercentLineRenderer(orig callback params, new callback params) /mx:LineSeries Conventionally of course the lineSegmentRenderer gets no params as a callback. But in this instance I need to manipulate the position of the percent line series lines through the renderer based on sales series data so that the lines are positioned exactly over the columns of the sales series. I have code in the renderer that positions the lines, but different underlying data for the column series (2 side by side cols for each data point), changes the width and horizontal position of the columns and then the percent line fragments above no longer line up. If I could get the sales series info to the percent series renderer I think I stand a chance of coding interacting series A big thank you in advance, Mic.
[flexcoders] 3D Column Chart - Is there a way to set the item update order?
I'm building a 3D column chart and am finding that I need to draw the columns in a specific order other than the default, which appears to be by series. Things go just fine until the z-order depth is greater than the distance between the series. Once that occurs, the potential exists for things to go south. Images of the problem are here: http://picasaweb.google.com/eddieberman/Flex/photo#5225608935449236386 and the preferred result here: http://picasaweb.google.com/eddieberman/Flex/photo#5225608932592265602 My question is - Is there a way to define, or otherwise take over the drawing order of the ColumnSeriesItems? I want to draw the columns in the order they appear from left to right, but Flex seems to want to draw by order of series - first Series1, then Series2, then Series3, etc. In looking through the Adobe source code, I haven't found a way around this - yet. Thanks in advance for anyone who might have clues to share.
[flexcoders] Re: Flex Debugger Ignoring all breakpoints/Errors
I noticed the same problem after installing Firefox 3. I'm now using IE until I learn of a way to have it work again. --- In flexcoders@yahoogroups.com, aut0poietic_us [EMAIL PROTECTED] wrote: Minor update: I FINALLY have the debugger working in IE. Not entirely sure what the solution was, however, it dawns on me the other thing done to this system recently was install Firefox 3. I remember some problems with RC versions, but I thought that was all resolved. Either way, would be nice if FF would cooperate with the debugger, but my level of panic has dropped some.
[flexcoders] Re: Customizing the label's frequency (adding sub-divisions)
I've got to run out for a bit, but here's at least one area to look into for #1, and perhaps #2. Play with the interval and minorInterval properties to try to get the result you need. Here's an example - it's close, but not exactly what you want (I've inserted three lines below your /mx:verticalAxisRenderer) : Good luck, Eddie !-- vertical axis renderer -- mx:verticalAxisRenderer mx:AxisRenderer labelRotation=45 / /mx:verticalAxisRenderer mx:horizontalAxis mx:LinearAxis interval = .01 / /mx:horizontalAxis !-- horizontal axis renderer -- --- In flexcoders@yahoogroups.com, Joy [EMAIL PROTECTED] wrote: Hi Can anyone please help me regarding: 1. I want the divisions of the horizontal-axis labels (bar-chart) to be more, eg. in the example, I want the labels to come as 0.1, 0.2, 0.3 ... rather than the default 0.2, 0.4, 0.6 ... 2. I want the vertical-axis-labels to appear next to the tickmark, and the bars as 'absolute-middle' to the tickmarks. Thanks in advance mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical verticalAlign=middle backgroundColor=white mx:Style /mx:Style mx:ArrayCollection id=arrColl mx:source mx:Array mx:Object name=R Winn obp=.353 slg=.445 avg=.300 / mx:Object name=P Feliz obp=.290 slg=.418 avg=.253 / mx:Object name=O Vizquel obp=.305 slg=.316 avg=.246 / mx:Object name=B Molina obp=.298 slg=.433 avg=.276 / mx:Object name=R Durham obp=.295 slg=.343 avg=.218 / /mx:Array /mx:source /mx:ArrayCollection mx:BarChart id=barChart showDataTips=true dataProvider={arrColl} width=100% height=100% !-- vertical axis -- mx:verticalAxis mx:CategoryAxis categoryField=name/ /mx:verticalAxis !-- vertical axis renderer -- mx:verticalAxisRenderer mx:AxisRenderer labelRotation=45 / /mx:verticalAxisRenderer !-- horizontal axis renderer -- mx:horizontalAxisRenderer mx:AxisRenderer labelRotation=45 / /mx:horizontalAxisRenderer !-- series -- mx:series mx:BarSeries id=avgSeries yField=name xField=avg displayName=avg / /mx:series /mx:BarChart /mx:Application
[flexcoders] How do I debug a flex app that's sitting in an IE wrapper within a Java app?
Our flex 3 app is running in an IE wrapper which is sitting within our Java application. Can anyone give me any hint as to how to go about debugging the flex app? Thanks in advance.
[flexcoders] Re: Stack Chart ItemClick detail?
I couldn't find that info either. The solution I'm using, until I learn of a more direct way, is to assign a number to the ColumnSeries Name property when I create each ColumnSeries (I happen to use Series0, Series1, Series2, etc). Here's the relevant code fragmants for creating, and then accessing the column number. // Creating the columns private const SeriesName:String = Series; for (var c:int = 1; c seriesCount; c++) { var cs:ColumnSeries = new ColumnSeries(); cs.name = SeriesName + id; // Series0, Series1, Series2,etc etc... } // Accessing the clicked column's data public function chartItemSelected (e:ChartItemEvent):void { // extract the number after Series var str:String = e.hitData.chartItem.element.name.substr(SeriesName.length, e.hitData.chartItem.element.name.length); var colNum:Number = parseInt(str); } Hope that helps, and/or we learn of a better way. -Eddie --- In flexcoders@yahoogroups.com, securenetfreedom [EMAIL PROTECTED] wrote: Is there a way to click on a stacked ColumnChart and receive data about the specific segment of ColumnChart stack that was clicked? I am using mx.charts.events.ChartItemEvent but I can't find anything in the event object that identifies the exact slice that was clicked. Thanks. Jeff
[flexcoders] How can a Line Chart pass data to a custom LineRenderer?
I've got a Line Chart, and I've written a custom Line Renderer. I have some chart data to share with the Renderer (apart from the chart value data that's available in the Renderer by default), but I can't figure out how to either have the Line Chart pass it to the Line Renderer, or have the Line Renderer ask the Line Chart for it. This is a new area for me and I'd appreciate any help here, even just pointing me to any existing reference material or discussion that so far as eluded my searches. Thanks in advance.
[flexcoders] How do I access the ClassFactory property from my chart's custom LineRenderer?
I've created a custom LineSegmentRenderer class for my Line Chart. It works fine using a hard-coded color value for the line it draws. However, I want this color value to be dynamic. I've passed a color value property to this class (extended from LineRenderer), but am not understanding how to access this property from within my LineRenderer class. From the LineChart, I'm setting the property this way: var factory:ClassFactory = new ClassFactory(MyLineRenderer); factory.properties = { lineColor: 0xFF }; The questin is, how do I go about accessing my property from inside MyLineRenderer? Or even better - where can I read more about this. I've done quite a bit of searching, but haven't found much info. Thanks in advance.
[flexcoders] Charts - Problem accessing dynamically created Axis. How do I.....
I'm changing my code to create my column chart entirely via AS3, rather than using MXML tags. Everything works fine except I can't figure out how to access my linear and category axis at runtime. When built using mxml tags, these have id's that I can use to, for example, change the labelFunction: AS3: ca1.labelFunction=myNewLabelFunction; MXML: mx:horizontalAxis mx:CategoryAxis id=ca1 labelFunction=myFirstLabelFunction/ /mx:horizontalAxis However, when creating the Axis objects in AS3, you can't set id's to the Category (or linear, etc) Axis. So, once they're created, I'm not seeing how to then access these objects. Probably simple, but I can't seem to find anything helpful in the docs (I'm using Flex 3 Beta 3). Can anyone point me to the correct method? Thanks in advance, Ed
[flexcoders] Re: ColumnChart - creating multiple Linear Axis via ActionScript - Help!
I see the step I missed. Much appreciated Sunil. -Eddie --- In flexcoders@yahoogroups.com, Sunil Bannur [EMAIL PROTECTED] wrote: Just use the following, p is the panel and h1 is the horizontal Axis, I'm using the same axis created by your code snippet, also changed the width, height of the other chart to 50% to make some room for this chart. private function init():void { var c:ColumnChart = new ColumnChart(); c.dataProvider = expensesAC; c.width = linechart.width; c.height = linechart.height; c.horizontalAxis = h1; c.verticalAxis = v1; var s1:ColumnSeries = new ColumnSeries(); s1.yField = Profit; var s2:ColumnSeries = new ColumnSeries(); s2.yField = Expenses; s2.verticalAxis = v2; c.series = [s1,s2]; var ar1:AxisRenderer = new AxisRenderer(); ar1.axis = v1; var ar2:AxisRenderer = new AxisRenderer(); ar2.axis = s2.verticalAxis; var ar3:AxisRenderer = new AxisRenderer(); ar3.axis = h1; c.horizontalAxisRenderers = [ar3]; c.verticalAxisRenderers = [ar1,ar2]; p.addChild(c); } From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of EddieBerman Sent: Thursday, February 07, 2008 6:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ColumnChart - creating multiple Linear Axis via ActionScript - Help! I'm having difficulty understanding how to create, via AS3, a ColumnChart that contains multiple verticalAxis. I'm familiar with the sample program MultipleAxis provided by Adobe, but can't correctly translate this to AS3 code. All is good until I need to create and set the multiple AxisRenderer objects. Can anyone more familiar give me a suggestion, or point to any reference material for doing this in AS3? Thanks. I've pasted the Adobe MXML sample code below that I'd like to replicate: mx:ColumnChart id=linechart height=100% width=100% paddingLeft=5 paddingRight=5 showDataTips=true dataProvider={expensesAC} mx:horizontalAxis mx:CategoryAxis categoryField=Month/ /mx:horizontalAxis mx:verticalAxis mx:LinearAxis id= v1/ /mx:verticalAxis mx:verticalAxisRenderers mx:AxisRenderer axis = {v1}/ mx:AxisRenderer axis = {v2}/ /mx:verticalAxisRenderers mx:series mx:ColumnSeries yField=Profit displayName=Profit itemRenderer=mx.charts.renderers.CircleItemRenderer /mx:ColumnSeries mx:ColumnSeries yField=Expenses displayName=Expenses itemRenderer=mx.charts.renderers.CircleItemRenderer mx:verticalAxis mx:LinearAxis id = v2 / /mx:verticalAxis /mx:ColumnSeries /mx:series /mx:ColumnChart
[flexcoders] ColumnChart - creating multiple Linear Axis via ActionScript - Help!
I'm having difficulty understanding how to create, via AS3, a ColumnChart that contains multiple verticalAxis. I'm familiar with the sample program MultipleAxis provided by Adobe, but can't correctly translate this to AS3 code. All is good until I need to create and set the multiple AxisRenderer objects. Can anyone more familiar give me a suggestion, or point to any reference material for doing this in AS3? Thanks. I've pasted the Adobe MXML sample code below that I'd like to replicate: mx:ColumnChart id=linechart height=100% width=100% paddingLeft=5 paddingRight=5 showDataTips=true dataProvider={expensesAC} mx:horizontalAxis mx:CategoryAxis categoryField=Month/ /mx:horizontalAxis mx:verticalAxis mx:LinearAxis id= v1/ /mx:verticalAxis mx:verticalAxisRenderers mx:AxisRenderer axis = {v1}/ mx:AxisRenderer axis = {v2}/ /mx:verticalAxisRenderers mx:series mx:ColumnSeries yField=Profit displayName=Profit itemRenderer=mx.charts.renderers.CircleItemRenderer /mx:ColumnSeries mx:ColumnSeries yField=Expenses displayName=Expenses itemRenderer=mx.charts.renderers.CircleItemRenderer mx:verticalAxis mx:LinearAxis id = v2 / /mx:verticalAxis /mx:ColumnSeries /mx:series /mx:ColumnChart
[flexcoders] Re: Chart Bug? Setting a backgroundElement bitmap at runtime
Let me just clarify the specific bit of code that I assumed would work, but isn't. At runtime, way after creationComplete(), I create an mx:Image object, load a .jpg into it from my local file system, and then push it onto the backgroundElements array. I've also tried simply setting it as the sole member of that backgroundElements array. The only thing I know for certain is that when I test the .jpg loading by adding that mx:Image to the canvas, it displays correctly. Since I'm not having success, I'm wondering if this is a chart bug. Or - if there's another (or rather, a correct) way to accomplish this goal. I couldn't find any mention of this method in the Flex LiveDocs. Thanks again. --- In flexcoders@yahoogroups.com, EddieBerman [EMAIL PROTECTED] wrote: Flex 3 newbie here with a problem I can't seem to solve by myself. I've been unable to set a backgroundElement bitmap with an image loaded at runtime. I can accomplish it without problem using either: 1) an mx:Image with a predefined @Embed source property within mx:backgroundElements tags (as is well documented) and/or 2) AS3 code to explicitly push an Embed'd image (also well documented). But - I can't seem to set an image that I load at runtime. I load the image and (to test it) display it in an mx:Image object that I create at the same time. Then, either I don't know exactly what type of object to push into the backgroundElements array, or Flex doesn't support this. I've tried using bitmaps, images, etc, but nothing seems to work. I also can't find any documentation for this method. Can anyone point me to either a reference, or suggest a way to accomplish this? Much appreciated. -Eddie
[flexcoders] Chart Bug? Setting a backgroundElement bitmap at runtime
Flex 3 newbie here with a problem I can't seem to solve by myself. I've been unable to set a backgroundElement bitmap with an image loaded at runtime. I can accomplish it without problem using either: 1) an mx:Image with a predefined @Embed source property within mx:backgroundElements tags (as is well documented) and/or 2) AS3 code to explicitly push an Embed'd image (also well documented). But - I can't seem to set an image that I load at runtime. I load the image and (to test it) display it in an mx:Image object that I create at the same time. Then, either I don't know exactly what type of object to push into the backgroundElements array, or Flex doesn't support this. I've tried using bitmaps, images, etc, but nothing seems to work. I also can't find any documentation for this method. Can anyone point me to either a reference, or suggest a way to accomplish this? Much appreciated. -Eddie
[flexcoders] How can I have my chart's FillFunction return the default fill color?
In my bar (and column) chart, I'm using a fillFunction to change only certain bar colors under certain conditions. For those bars that don't require a change, I'd like return the default fill color. The problem is I can't determine how to access that original color to return. Nor can I figure out how to return a value that tells flex to use the default. Anyone have any useful info here? Thanks in advance.