Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
640
MinorGridlines only show when Label has special value?
posted

Hi,
is it possible to show the Gridlines only if the x-axis-label has a special value?? For example I have a datetime-x-axis. When the chart contains more than 20 years I set the labels only on every 5. year. (this I can do with a special class which implements IRenderLabel)
Is it possible? Perhaps it is possible to set this option in my Render-Class...?!?!
Thank you so much!

Parents
  • 26458
    Offline posted

    if you don't want to show the gridlines at all, you'll have to first see if your data spans over 20 years. After that it's simple:
    ultraChart1.Axis.X.MajorGridLines.Visible = false;
    ultraChart1.Axis.X.MinorGridLines.Visible = false;

    Normally hiding only certain gridlines requires the use of a custom layer (or handling FillSceneGraph event), but if you have a time axis, you can simply set TickmarkStyle to DataInterval, TickmarkIntervalType to something like Weeks or Months and set TickmarkInterval to the number of units. This should automatically adjust the labels and tickmarks for the charts that use Time axis.

Reply Children