"Charts" are in the Toolbox in the C# tutorial that uses Forms => www.youtube.com/watch?v=DqQlNoQW00w. I do not see "Charts" in the WPF Toolbox.
<Canvas x:Name="gCanvasPlot0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="0,0,0,0"
Width="500"
Height="150" />
//------------------------------
private void AddPlot()
{
double dPI = Math.PI;
Polyline poXY = new Polyline {
Stroke = Brushes.Red
};
int iNumOfCycles = 3;
double dDeltaX = 0.01;
int iNumOfPoints0 = (int)(iNumOfCycles / dDeltaX);
for (int ii = 0; ii < iNumOfPoints0; ii++) {
double dX = ii * dDeltaX;
double dY = Math.Sin(2 * dPI * dX);
poXY.Points.Add(CorrespondingPoint(new Point(dX, dY), iNumOfCycles));
}
gCanvasPlot0.Children.Add(poXY);
}//AddPlot...
for (int ii = 1; ii < 99; ii++) {
myLine.X1 = (double)ii;
myLine.Y1 = (double)ii;
myLine.X2 = (double)ii + 1;
myLine.Y2 = (double)ii + 1;
gCVPlot.Children.Add(myLine);
}
PolyLineSegment
to the Path
.See link that you said you've already visited. Go about 2/3rd of the way down the page where aI've been there. As far as I can tell, those are predefined shapes. Where do I find a way to plot a sequence of numbers?
PolyLineSegment
is demonstrated.