This project is read-only.

How to fill area under the curve in a graph!

Nov 20, 2012 at 3:27 PM

I have a program that creates a chart with dynamicdatadisplay. I need to fill the specified area under the curve (not the whole curve, just a part, for example if i have a sinus from 0 to 1 in x axis, just the area under the curve that corresponds between 0.2 and 0.5 in the x-axis).

Does anyone has any idea how to do this? I have been thinking, maybe I could do a Bezier curve with the Y values that corresponds to this segment of the sinus curve and fill in it, but it does not work like i want and/plus I cannot bind data to the give the points to draw! (or at least I didn't have success with it, maybe you?

<d3:ViewportPolyBezierCurve x:Name="vpbc" Points="{Binding listOfPoints}" BuildBezierPoints="True" Fill="BurlyWood" Visibility="Visible" ></d3:ViewportPolyBezierCurve >



My listOfPoints would have the points of the graph where it has to be filled.

So can someone help me with the binding of the beziercurve or can someone give me another alternative to fill the area under the curve?

Any help would be appreciated! Thanks.