Reputation: 979
How to decrease distance between chart label and axis labels?
Upvotes: 1
Views: 1645
Reputation: 15971
You can use the TitleGap
property of the GraphPane
and the Scale.LabelGap
property of the axis of interest.
For example:
zedGraphControl1.GraphPane.TitleGap = 0f;
zedGraphControl1.GraphPane.XAxis.Scale.LabelGap = 0f;
zedGraphControl1.GraphPane.YAxisList[0].Scale.LabelGap = 0f;
will produce the following graph, where the gaps to the title and scale labels are reduced to zero:
The gaps are given in fractions of the graph pane (I think). You may want to experiment with this...
Furthermore, you can change the Margin
property of the GraphPane
to control the margin of the pane to the parent control, for example:
zedGraphControl1.GraphPane.Margin.Top = 0f;
Upvotes: 4