Greetings.
I want to draw a area + line type graph like the attached picture file.
I tried to draw line + area series, but i couldn't. Only line-type graphs were drawn on the chart.
I'd be grateful if you could tell me how.
many thanks.
How to draw line and area types on a same chart ??
-
- Newbie
- Posts: 2
- Joined: Thu Mar 02, 2023 12:00 am
- Contact:
How to draw line and area types on a same chart ??
- Attachments
-
- line_and_area.png (8.98 KiB) Viewed 9610 times
ISP
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: How to draw line and area types on a same chart ??
Hello,
for drawing the area under a curve, you can use the SeriesRegion tool like this:
for drawing the area under a curve, you can use the SeriesRegion tool like this:
Code: Select all
public Form1()
{
InitializeComponent();
var line = new Line(tChart1.Chart);
line.FillSampleValues(1000);
tChart1.Axes.Bottom.SetMinMax(600, 1000);
_ = new SeriesRegionTool(tChart1.Chart)
{
AutoBound = false,
LowerBound = 820,
UpperBound = 870,
Series = line,
DrawBehindSeries = true,
Color = System.Drawing.Color.AliceBlue,
};
_ = new SeriesRegionTool(tChart1.Chart)
{
AutoBound = false,
LowerBound = 920,
UpperBound = 970,
Series = line,
DrawBehindSeries = true,
Color = System.Drawing.Color.PowderBlue,
};
}
Best Regards,
Christopher Ireland / 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 |