I am trying to draw graph using MigraDoc.DocumentObjectModel.Shapes.Charts
.
I want to avoid to get y axis label generated automatically.
Do you anybody how to set custom Y axis label using MigraDoc?
Thanks in advance
Asked
Active
Viewed 1,233 times
0

Mong Zhu
- 23,309
- 10
- 44
- 76

user3289230
- 431
- 2
- 6
- 19
2 Answers
0
I only know how to set Y axis label formatted as percents:
chart.YAxis.TickLabels.Format = "#0%";
I don't know if there is some other ways of changing Y axis label neither if there is other TickLabels.Format
formats since I can't find any documentation on the topic.
EDIT: I'm not sure about it, but it looks like the format used for TickLabels.Format
follows the rules described here: https://msdn.microsoft.com/en-us/library/0c899ak8.aspx .
Again, this is only helpful if you only want to change the format of Y axis label.

sharkad
- 1
- 3
0
I did it like this:
Chart plotter = new Chart();
// add your series and datapoints here...
// Format Y - Axis
plotter.YAxis.MinimumScale = -100;
plotter.YAxis.MaximumScale = 100;
plotter.YAxis.MajorTick = 50;
plotter.YAxis.MajorTickMark = TickMarkType.Outside;
The result looks like this:

Mong Zhu
- 23,309
- 10
- 44
- 76