Jump to content
Software FX Community

Collapse the AxisPainter, but keep Axis.CustomGridLines visible.


Recommended Posts

To hide the axis labels (and reduce space occupied by it) you can try the following code

  chart1.PlotArea.Margin = new Thickness(0, 0, 0, 0);
  chart1.AxisY.Labels.Visibility = AxisLabelVisibility.Collapsed;
  chart1.AxisY.Grids.Major.TickMark = TickMark.None;
  chart1.AxisY.Grids.Major.TickSize = 0;
  chart1.AxisY.Grids.Minor.TickMark = TickMark.None;
  chart1.AxisY.Grids.Minor.TickSize = 0;
  chart1.AxisY.Separation = 0;

Note that there will be a small space (about 2-3 pixels). In our next 8.1 build this should be reduced. If you are also hiding the X axis you could remove the chart's outside border so that you do not get the "double border" effect.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...