I’ve been playing with the Flex 2 Charting components quite a bit latley.
The charting components include Bar, Column, Line, Area, Pie, Plot, HLOC (High/Low/Open/Close) & Candlesitck charts. That is quite a set of charts that allow you to visualize your data right out of the box.
Some of the cool features:
- You can link up data to your charts and change the data at runtime based on user input, live data feeds etc.
- Its pretty easty to create drag and drop charts with multiple data series for your chart.
- Styling your chart is a no-braininer with CSS and inline in the MXML .
- You can also extend the charts for your own custom charts.
Setting up the data is fairly straight forward using a HTTPService, RemoteObject or WebService tags with a Model tag.
I was working on a sample for label rotation and it turned out to be just a good general sample. So, I’ve posted it here.
FYI: In the current BETA release there is a little bug with label rotation. You have to embed a font to rotate the labels and when you do that, the ends of the label are cliped off. Adobe knows about the bug and hopefully it will be fixed.
This sample uses an to get an external XML file. Then I break the data into different models for the different charts. I’ve set up the bar chart to accept a click to update the selected ‘company’ and update the charts on the bottom (the ComboBox will do the same thing).