Mixing Series Types in Flex 2 Charts

Written on April 17, 2006 – 11:28 pm | by John |

Becareful when you mix series types in the Flex 2 (BETA 2) Charting Components. All of the documentation says that any chart that extends the CartesianChart can use other series types. This is true but you run into issues beacuse the chart tries to format the series data based on its chart type (makes sense, except we now what to combine series types).

For example if you had an <mx:ColumnChart> with a <mx:ColumnSeries> and <mx:LineSeries> , the chart would result in something like the following:
seriesTypes_column.jpg
Notice how the line doesn’t quite line up with the column chart.

If we change the <mx:ColumnChart> to an <mx:CartesianChart>, problem solved. The CartesianChart takes the data for what it is and doesn’t try to shoehorn the series in to a specific display. Now check out the ColumnChart, the line series lines up with the column chart.

seriesTypes_cartesian.jpg

Update: It should be becareful what type of chart you use. Basically if you are mixing series types, then use the CartesianChart and you won’t run into this problem. Basically what happened below is we tried to force data displayed as a line into a ColumnChart because we used the ColumnChart control. If you use the CartesianChart you won’t have this problem. Thank you Ely!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • description
  • ThisNext
  • MisterWong
  • Wists
  • Facebook
  • StumbleUpon
  • Technorati
  • YahooMyWeb

Related Posts

Put your related posts code here
discussion by DISQUS
Add New Comment
Find entries :

Want to subscribe?

  Subscribe in a reader or,
Subscribe via email:

About me

I'm a senior developer at RealEyes Media, Adobe Certified Instructor and Adobe Certified Professional. Here you'll get my ideas and experience Flex, Flash, ColdFusion and related technologies as well as some generally off the wall stuff.