I have an array of fastline series which display some sine waves. I like to know how i can optionally (user triggered) fill the peaks and through of the fastline series's sine wave.
Any help in this regard is greatly appreciated.
Fill Peaks of sine wave
Re: Fill Peaks of sine wave
Hi asupriya,
I'm not sure to understand what are you exactly trying to draw here. Maybe a picture would help us to understand it better.
Anyway, have you seen the SeriesBand Tool and the SeriesRegion Tool?
- SeriesBandTool (All Features\Welcome !\Tools\SeriesBand Tool). Giving a line series to it, the are under the line until zero, will be painted.
- SeriesRegionTool (All Features\Welcome !\Tools\Area under the curve). With this, you'll be able to paint the area under a line but here you'll be able to set an XValue to start painting (the peak begin), an XValue to end painting (the peak finish) and an YValue (origin) to limit the drawing area under the line.
I'm not sure to understand what are you exactly trying to draw here. Maybe a picture would help us to understand it better.
Anyway, have you seen the SeriesBand Tool and the SeriesRegion Tool?
- SeriesBandTool (All Features\Welcome !\Tools\SeriesBand Tool). Giving a line series to it, the are under the line until zero, will be painted.
- SeriesRegionTool (All Features\Welcome !\Tools\Area under the curve). With this, you'll be able to paint the area under a line but here you'll be able to set an XValue to start painting (the peak begin), an XValue to end painting (the peak finish) and an YValue (origin) to limit the drawing area under the line.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Fill Peaks of sine wave
I am looking for something of effect shown in the image attached.
Thanks.
Thanks.
Re: Fill Peaks of sine wave
Hi asupriya,
If you have those sin waves horizontal, you'll be able to use SeriesRegionTool. Note that you should create a SeriesRegionTool for each zone to mark.
And note that I've added the possibility to use this tool with Horizontal Line series in the wish list to be implemented in a further release (TF02014442).
If you have those sin waves horizontal, you'll be able to use SeriesRegionTool. Note that you should create a SeriesRegionTool for each zone to mark.
And note that I've added the possibility to use this tool with Horizontal Line series in the wish list to be implemented in a further release (TF02014442).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Fill Peaks of sine wave
SeriesBandTool, SeriesRegionTool are not the ones i am looking for. Is there anything that can draw as shown in the attached image?
Thanks
Thanks
Re: Fill Peaks of sine wave
Hi asupriya,
You can use SeriesRegionTool to obtain a chart like in your picture with the following code:
You can use SeriesRegionTool to obtain a chart like in your picture with the following code:
Code: Select all
tChart1.Aspect.View3D = false;
int nSeries = 4;
int [] YPos = new int[nSeries];
Steema.TeeChart.Styles.FastLine[] fast = new Steema.TeeChart.Styles.FastLine[nSeries];
Steema.TeeChart.Tools.SeriesRegionTool[] region = new Steema.TeeChart.Tools.SeriesRegionTool[nSeries];
for (int i = 0; i < nSeries; i++)
{
YPos[i] = i * 5;
fast[i] = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
if (i % 2 == 0)
{
for (int j = 0; j < 200; j++) fast[i].Add(Math.Sin((double)j / 10) + YPos[i]);
}
else
{
for (int j = 0; j < 200; j++) fast[i].Add(Math.Cos((double)j / 10) + YPos[i]);
}
region[i] = new Steema.TeeChart.Tools.SeriesRegionTool(tChart1.Chart);
region[i].Series = fast[i];
region[i].Origin = YPos[i];
region[i].UseOrigin = true;
region[i].Brush.Style = System.Drawing.Drawing2D.HatchStyle.Vertical;
region[i].Brush.Transparency = 100;
region[i].Pen.Visible = false;
region[i].Brush.ForegroundColor = fast[i].Color;
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Fill Peaks of sine wave
Great. Thanks alot. This is exactly what I needed.
Appreciate your help.
Appreciate your help.