AxisSmartLabelsMode.SmartStep causes duplicate axis value of DateTimeContinuousAxis

4 posts, 0 answers
  1. Nighting
    Nighting avatar
    2 posts
    Member since:
    Mar 2014

    Posted 06 Aug 2015 Link to this post

    AxisSmartLabelsMode.SmartStep causes duplicate axis value of DateTimeContinuousAxis

     

    When the values' count of HorizontalAxis are is less than the fit count of chart width, the axis labels duplicate. Is it a bug or by design? It seems not good for the stacked chart.

    if (CartesianChart.VerticalAxis != null)
      CartesianChart.VerticalAxis.SmartLabelsMode = AxisSmartLabelsMode.SmartStep;
    if (CartesianChart.HorizontalAxis != null)
      CartesianChart.HorizontalAxis.SmartLabelsMode = AxisSmartLabelsMode.SmartStep;


    Please help me out, thanks!​

  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 07 Aug 2015 Link to this post

    Hello Nighting,

    I was not able to understand the circumstances under which these duplicate labels manifest. Can you create a small project that reproduces the observed behavior and send us the code snippets and imagest of the result so that we can investigate this? Thank you.

    Regards,
    Petar Marchev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Nighting
    Nighting avatar
    2 posts
    Member since:
    Mar 2014

    Posted 07 Aug 2015 in reply to Petar Marchev Link to this post

    Hi Petar,

     Please refer to the attached image file and code project.  The only difference of the top two charts is the left chart has the "HorizontalAxis.SmartLabelsMode" set "AxisSmartLabelsMode.SmartStep". And the top two charts looks the same. However, when i enlarge the container, the left chart has duplicate labels come out.

    "DateTimeAxes.zip.jpg" : please unzip this file.

    Best Regards,

    Nighting

  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 07 Aug 2015 Link to this post

    Hello Nighting,

    The labels do not actually repeat. The two labels that say "11/16/2011" are actually for different hours, one is for 0:00, the other is for 12:00. The reason they do not show the hour is the LabelFormat setting of the axis, which is "d". If you were to set the label format to show more detailed information, it would be clear that the labels do not repeat. Note that this has nothing to do with the smart labels mode, it has to do only with the axis step and label format.

    Regards,
    Petar Marchev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top