Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

More Series on one chart..

I wish to draw simple line series on one chart...
So one metod woul'd be to create 100 series by hand for every of the 4 chart forms. But how can i do it so that the series will be created during data collection (Series1 till series100 would be created doring collection proces,when neaded). The scales for all series will be the same(this mean that x and y values will stay the same...). I allready readed the TeeChart help files but dident find anything..

Hope somebody can help me,
Regards,
Bostjan

Comments

  • zibadianzibadian Member Posts: 6,349
    : I wish to draw simple line series on one chart...
    : So one metod woul'd be to create 100 series by hand for every of the 4 chart forms. But how can i do it so that the series will be created during data collection (Series1 till series100 would be created doring collection proces,when neaded). The scales for all series will be the same(this mean that x and y values will stay the same...). I allready readed the TeeChart help files but dident find anything..
    :
    : Hope somebody can help me,
    : Regards,
    : Bostjan
    :
    First you need to create a TLineSeries object:
    [code]
    MySeries[1] := TLineSeries.Create;
    [/code]
    Then you need to include the data-values for that line to the series:
    [code]
    for i := 0 to High(SomeXValues) do
    MySeries[1].AddXY(SomeXValues[i], SomeYValues[i], SomeLabels[i], SomeColor);
    [/code]
    Lastly you need to add the series to the chart:
    [code]
    MyChart1.AddSeries(MySeries[1]);
    [/code]
    I've used example variable names and variable types (SomeXValues = array of double). The SomeLabels array can be completely empty or even replaced by a simple string, if you don't want to include labels in the graphs. You need to change the code to suit your own program. Also I've taken MySeries as an array of TChartSeries.

    I hope this helps you to show the graphs to your liking.
Sign In or Register to comment.