Dynamically / Programmically create chart ColumnSeries

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default Dynamically / Programmically create chart ColumnSeries

    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

    drkshih Guest

  2. Similar Questions and Discussions

    1. Dynamically changing chart labels
      HI I'm after an how too really, point me in the right direction is possible. I have a new dashboard app, monitoring a server, last part is load...
    2. How do I dynamically add a series to a chart? flex 1.5
      I have a problem where I'm trying to add a series to a line chart and it just doesn't work correctly. Here's a test fiel that i created to test...
    3. dynamically creating pie chart
      I have a format that we use to create pie charts and i would like to create a tool to generate the chart in the format we want just by passing 3...
    4. GD::Graph - Can it create a stock chart
      I would like to know if GD::Graph can be used to create a "Stock Chart". This is a series of lines with three data points representing the...
    5. components for dynamically displaying data chart or graph in ASP
      Hello, I tried to find some components I can use to dynamically generate chart or graph from database in ASP. It seems to me that only some...
  3. #2

    Default Re: Dynamically / Programmically create chartColumnSeries

    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.

    peterent Guest

  4. #3

    Default Re: Dynamically / Programmically create chartColumnSeries

    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

    drkshih Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139