Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net
 Real-Time Graphics Tools for .Net (VB and C#)
 Color shading/filling area under a curve
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

BarryRobertson

USA
21 Posts

Posted - 04 May 2012 :  16:11:06  Show Profile  Reply with Quote
Building from your Treadmill example, if you wanted to fill the area under the curve for Heart ECG, how would you approach it?

I see examples in the QChart2D for shading as the plot is set-up. However, filling the area is not obvious to me for QCRTGraph.

I have some calculations of area under a curve and it'd be a nice touch to be able to fill the area being calculated. My data is coming in real-time as it plots.

Thank you for any clues, tips, or examples.

Edited by - BarryRobertson on 04 May 2012 16:12:18

quinncurtis

1586 Posts

Posted - 05 May 2012 :  13:25:49  Show Profile  Reply with Quote
In a real-time plot, filling under a line plot is handled exactly the same as in the QCChart2D software. You set the fill flag of the ChartAttribute controlling the objects color. In the example below the fill flag is set because the fourth parameter in the ChartAttribute constructor specifies a fill color (Green, same as the line color, in this case). You must also specify a Fill base value, 0.0 in the example below.

ChartAttribute attrib2 = new ChartAttribute(Color.Green, 3, DashStyle.Solid, Color.Green);
SimpleLinePlot lineplot2 = new SimpleLinePlot(pTransform2, null, attrib2);
lineplot2.FillBaseValue = 0;
lineplot2.SetFastClipMode(ChartObj.FASTCLIP_X);
rtPlot2 = new RTSimpleSingleValuePlot(pTransform2, lineplot2, NASDAQChannel);
chartVu.AddChartObject(rtPlot2);
Go to Top of Page

BarryRobertson

USA
21 Posts

Posted - 07 May 2012 :  10:24:58  Show Profile  Reply with Quote
As always, thank you for your responsiveness.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07