Page 1 of 1
Colorize area between lines in graph
Posted: Thu Aug 19, 2004 9:39 am
by 6923391
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!
Posted: Thu Aug 19, 2004 10:42 am
by Chris
Hi,
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.
One suggestion would be to use a HighLow series, e.g.
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;
Posted: Thu Aug 19, 2004 2:22 pm
by 6923391
Thanks! Worked fine!
But a new question popped up:
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.
Posted: Fri Aug 20, 2004 11:04 am
by Chris
Hi,
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.
You could try adding in dummy series like this:
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;
Posted: Fri Aug 20, 2004 12:38 pm
by 6923391
Great! That's one way to do it! It looks perfect! Thank you.