This is a migrated thread and some comments may be shown as answers.

AxisSmartLabelsMode.SmartStep causes duplicate axis value of DateTimeContinuousAxis

3 Answers 147 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Nighting
Top achievements
Rank 1
Nighting asked on 07 Aug 2015, 04:35 AM

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!​

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 07 Aug 2015, 07:41 AM
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
0
Nighting
Top achievements
Rank 1
answered on 07 Aug 2015, 09:13 AM

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

0
Petar Marchev
Telerik team
answered on 07 Aug 2015, 10:09 AM
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
Tags
ChartView
Asked by
Nighting
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Nighting
Top achievements
Rank 1
Share this question
or