I have two lines in a graph. I'd like to colorize the area between these lines, but I don't mange this. Please let me know how this is done.
Thank you!
Colorize area between lines in graph
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi,
One suggestion would be to use a HighLow series, e.g.I have two lines in a graph. I'd like to colorize the area between these lines, but I don't mange this. Please let me know how this is done.
Code: Select all
Steema.TeeChart.Styles.HighLow highLow1 = new Steema.TeeChart.Styles.HighLow(tChart1.Chart);
Random rnd = new Random();
for(double i=0; i<10; ++i) {
highLow1.Add(i,rnd.Next(100),rnd.Next(10),"");
}
highLow1.Pen.Visible = false;
highLow1.HighBrush.Visible = true;
highLow1.LowBrush.Visible = true;
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi,
You could try adding in dummy series like this:I'm made the HighPen and LowPen visible. Can I have the them in the legend instead of the little box? I want two lines (high and low pen) instead of the little box respresenting the HighLow area.
Code: Select all
Steema.TeeChart.Styles.HighLow highLow1 = new Steema.TeeChart.Styles.HighLow(tChart1.Chart);
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Steema.TeeChart.Styles.Line line2 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
Random rnd = new Random();
tChart1.Legend.Symbol.Squared = false;
tChart1.Legend.Symbol.WidthUnits = Steema.TeeChart.LegendSymbolSize.Pixels;
tChart1.Legend.Symbol.Width = 5;
tChart1.Aspect.View3D = false;
for(double i=0; i<10; ++i) {
highLow1.Add(i,rnd.Next(100),rnd.Next(10),"");
}
highLow1.Pen.Visible = false;
highLow1.HighBrush.Visible = true;
highLow1.LowBrush.Visible = true;
highLow1.HighPen.Color = Color.Green;
highLow1.LowPen.Color = Color.Blue;
highLow1.ShowInLegend = false;
line1.Title = "High";
line2.Title = "Low";
line1.Color = Color.Green;
line2.Color = Color.Blue;
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/