Dynamically / Programmically create chart ColumnSeries

Posted: 07-19-2005, 04:47 PM
Hi, I want to dynamically create the chart column series in a column chart. If
example, according to the selection in a ComboBox, I need to populate chart
with one column or two columns of information per category. Also, I want to
dynamically assign a color to each column. Is it doable?

Thanks,
Derek

Reply With Quote

Responses to "Dynamically / Programmically create chart ColumnSeries"

peterent
Guest
Posts: n/a
 
Re: Dynamically / Programmically create chartColumnSeries
Posted: 07-20-2005, 06:15 PM
Each chart has a series property which is an Array of all of the series
(surprise). You can add new series dynamically using addItem:

var column = new ColumnSeries();
column.yField = "population"; // assuming that is the field in the
dataProvider you want to graph
// set other ColumnSeries values, see the Flex documentation
column.setStyle("fill", new SolidColor(0xFF0000,100)); // bright red
column.setStyle("renderer", new SimpleBoxRenderer); // only if you don't want
a ShadowBoxRenderer which is the default
myChart.series.addItem(column);

For the fill, you can also use a Gradient - see the Flex documentation for
details.

Reply With Quote
drkshih
Guest
Posts: n/a
 
Re: Dynamically / Programmically create chartColumnSeries
Posted: 07-20-2005, 10:50 PM
Great. That's what I want. So for CatesianChart, I can add both ColumnSeries
and LineSeries to myChart.seriers, right?
Ok, now if I want to add a horizontal line across the chart, say like 'y=100'.
I need to apply this kind of line to indicate a 'target' or in a control chart.
Is it doable?

Thanks,
Derek

Reply With Quote
 
LinkBack Thread Tools Search this Thread Display Modes
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dreamweaver Extension to create Chart big_old_bird Macromedia Exchange Dreamweaver Extensions 0 07-18-2005 08:03 PM
Create and dynamically load into textField problem! BHenderson2003 webforumsuser@macromedia.com Macromedia Flash Actionscript 0 01-20-2004 10:16 PM
Create and show an Excel pie chart in an ASP page Dan Williams ASP Components 3 10-14-2003 03:15 PM
components for dynamically displaying data chart or graph in ASP Jane ASP Components 3 09-15-2003 10:22 PM
How do I dynamically create user controls? David J. Berman ASP.NET Building Controls 2 06-30-2003 07:24 PM