In case anyone else is looking for a quick way to add XY Plotting I've attached some patch files for version 1.32 here.
Its an unofficial quick fix but it might be all you need.
In MigraDoc and PDFSharp I've implemented a 'PointX' class and added support for it Series and Series Element.
In PDFSharp I've modified some renderers to recognize these and draw them.
In the patch files I've added a method Series.Add( double x, double y )
Here is a pseudocode example below of how to use it.
Assuming you have some an array of point structures having properties x and y
Thanks PDFSharp Team for sharing this codebase.
Good luck.
Code:
Chart chart = new Chart();
chart.Left = 0;
chart.Width = Unit.FromCentimeter(16);
chart.Height = Unit.FromCentimeter(12);
chart.XAxis.MinimumScale = 0;
chart.XAxis.MaximumScale = YOUR_MAX_X;
chart.XAxis.MajorTickMark = TickMarkType.None;
chart.XAxis.Title.Caption = "X_AXIS";
chart.XAxis.MajorTick = 100; // your interval
chart.YAxis.MajorTickMark = TickMarkType.Outside;
chart.YAxis.HasMajorGridlines = true;
chart.PlotArea.LineFormat.Color = Colors.DarkGray;
chart.PlotArea.LineFormat.Width = 1;
Series series = chart.SeriesCollection.AddSeries();
series.ChartType = ChartType.Line;
series.MarkerStyle = MarkerStyle.None;
foreach( MyDataPoint pt in MyPoints)
{
series.Add(pt.X, pt.Y );
}
document.LastSection.Add(chart);