v 3.5.3225.32185 / VS 2008 / .NET 2.0
Hi,
First, I'm trying to have a series which draws a flat lineshowing the max value of a series. Easy: Use the high function. Data source = the series. Function period = 0. Works fine.
Now, I want the same (one) flat line to show the max value of all points in 2 series -> I add the 2nd series to the data source.
Unfortunately, it doesn't behave the same way: My High series receives a point for each XValue of the 2 other series. Such as if Period = 1.
How can I solve this?
TIA,
Serge.
function high/low with multiple series
-
- Newbie
- Posts: 22
- Joined: Tue Dec 16, 2008 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Serge,
In that case you can do this:
In that case you can do this:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
Steema.TeeChart.Styles.Bar bar2 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar2.FillSampleValues();
double tmpMax = tChart1[0].MaxYValue();
double tmpMin = tChart1[0].MinYValue();
for (int i = 1; i < tChart1.Series.Count; i++)
{
tmpMax = Math.Max(tmpMax, tChart1[i].MaxYValue());
tmpMin = Math.Min(tmpMax, tChart1[i].MinYValue());
}
Steema.TeeChart.Styles.Line maxLine = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Steema.TeeChart.Styles.Line minLine = new Steema.TeeChart.Styles.Line(tChart1.Chart);
maxLine.Add(tChart1[0].MinXValue(), tmpMax);
maxLine.Add(tChart1[0].MaxXValue(), tmpMax);
minLine.Add(tChart1[0].MinXValue(), tmpMin);
minLine.Add(tChart1[0].MaxXValue(), tmpMin);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 22
- Joined: Tue Dec 16, 2008 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Serge,
I have added your request to the wish-list to be considered for inclusion in future releases.
I have added your request to the wish-list to be considered for inclusion in future releases.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |