Pre loader

Hide axis + numbers but show title

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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

  • You must to post comments
0
0

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

  • EJansen
    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...
  • Andrew Burnett-Thompson
    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
  • EJansen
    Hi Andrew, I used the BorderThickness and it works great. Thanks...
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies