Hi !
I couldn't get tick marks on a horizontal axis (using MigraDoc w/ PdfSharp), after comparing HorizontalXAvisRenderer and VerticalYAxisRenderer, here's the trick :
Changes in PDFsharp\Charting\Charting\PdfSharp.Charting.Renderers\HorizontalXAxisRenderer.cs
inside Draw(), at line 160 after
Code:
LineFormatRenderer lineFormatRenderer = new LineFormatRenderer(gfx, xari.LineFormat);
add the following
Code:
LineFormatRenderer minorTickMarkLineFormat = new LineFormatRenderer(gfx, xari.MinorTickMarkLineFormat);
LineFormatRenderer majorTickMarkLineFormat = new LineFormatRenderer(gfx, xari.MajorTickMarkLineFormat);
then at line 176 replace
Code:
lineFormatRenderer.DrawLine(points[0], points[1]);
with
Code:
minorTickMarkLineFormat.DrawLine(points[0], points[1]);
and at line 194 replace
Code:
lineFormatRenderer.DrawLine(points[0], points[1]);
with
Code:
majorTickMarkLineFormat.DrawLine(points[0], points[1]);
This work it out for me
Have a nice day !