PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

PDFSharp - multiple time-based series on line chart
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3581
Page 1 of 1

Author:  pitersmx [ Sun Apr 30, 2017 5:05 pm ]
Post subject:  PDFSharp - multiple time-based series on line chart

Hello,
I need to plot a several time-based series on line chart and I must provide proper time-shift between each series.

The problem with PDFSharp charting is that for line chart X values are ignored and series use Y values only - for each Y value we have an X index value auto-incremented.
Because of that it is impossible to correctly draw multiple line data series where Xvalues are specific OADateTime values for example.

Let's say that we have 2 series: S1 and S2:
data for S1 starts from 01/01/2017, data for S2 starts from 01/04/2017 - despite the fact that for both series start with different XValues (OADateTime) and on XAxis there should be some shift, the chart mechanisms will plot both series starting from the same X-point = 0 so there will be no shift.

Is there any way to change this behaviour?
If not, what else can be used instead of PDFSharp?

Best regards!

Author:  staviloglu [ Thu Oct 05, 2017 8:54 am ]
Post subject:  Re: PDFSharp - multiple time-based series on line chart

You can call
Code:
series.AddBlank()
method to add empty values, and set DisplayBlanksAs property like
Code:
chart.DisplayBlanksAs = BlankType.NotPlotted;

but it will still draw the graph with all values as if you set
Code:
chart.DisplayBlanksAs = BlankType.Zero;
and generates the chart bleow, I think ther is a abug
Image

Attachments:
graph.JPG
graph.JPG [ 37.14 KiB | Viewed 5171 times ]

Author:  Thomas Hoevel [ Thu Oct 05, 2017 9:45 am ]
Post subject:  Re: PDFSharp - multiple time-based series on line chart

Yes, I think there is a bug with blank values.
Not my area of expertise, never tried to tackle it.
Any volunteers trying to fix it?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/