Hi,
I’m using the following code for showing/hiding the axis:
/// <summary>
/// Show/hide all axis and labels
/// </summary>
/// <param name="visibility">The visibility status</param>
public void ShowHideAllAxis(Visibility visibility)
{
if (this.RenderableSeries != null)
{
for (int seriesCnt = 0; seriesCnt < this.RenderableSeries.Count; seriesCnt++)
{
var renderSeries = this.RenderableSeries.ElementAt(seriesCnt);
var axis = this.YAxes.GetAxisById(renderSeries.YAxisId);
if (axis != null)
{
((AxisBase)axis).Visibility = visibility;
}
}
}
}
This will hide everything.
Is there a way for only showing the axis title and hide the rest of the axis stuff?
Thanks,
Egbert
- EJansen asked 11 years ago
- You must login to post comments
Hi Egbert,
The following properties on the Axis allow you to show or hide various parts of this component:
- AxisBase.DrawLabels
- AxisBase.DrawMajorTicks
- AxisBase.DrawMinorTicks
- AxisBase.DrawMajorGridLines
- AxisBase.DrawMinorGridLines
You can test these properties out in the demo Modify Axis Properties
Hope this helps!
Andrew
- Andrew Burnett-Thompson answered 11 years ago
-
Hi Andrew, Thanks for this info, but when disabling all the draw stuff, the axis title is displayed (that's good) but also the axis line (no tickmarks, no numbers, only the line). It doesn't look good this way. It there another way the display this info? Legends? Thanks...
-
Hi Egbert, I think you can set the Axis Border to Transparent, or BorderThickess to 0 to hide the line. Can you try this and let me know what happens? Best regards, Andrew
-
Hi Andrew, I used the BorderThickness and it works great. Thanks...
- You must login to post comments
Please login first to submit.