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

Misaligned TimeTick labels

1 Answer 43 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 26 Mar 2015, 01:57 PM
Hi there, 

we are currently developing a wrapper control of your RadChartView RadCartesianChart. In this control we are using a DateTimeContinuousAxis like this:

<telerik:RadCartesianChart.HorizontalAxis>
  <telerik:DateTimeContinuousAxis x:Name="dateTimeContinuousAxis" PlotMode="OnTicks" LabelFitMode="Rotate" MajorStepUnit="Second"  LabelFormat="HH:mm:ss" FontSize="{Binding AxisFontSize, FallbackValue=14}" />
 </telerik:RadCartesianChart.HorizontalAxis>

When changing the AxisFontSize we entirely re-add all Series with new loaded data to get rid of this problem without success. In that process it does not even matter the new data is in a different time range or not. This is happen in design time and in runtime after changing the AxisFontSize of our control: 

https://dl.dropboxusercontent.com/u/55589036/Pictures/Animated%20Screenshots/20150326_1440.gif

Besides the AxisFontSize we provide some other DependencyProperties:

· TimeRange to adjust the duration time. When changing the TimeRange we will also re-add everything and generate some empty data to get the desired time span on the X axis.
· TimeTickCount to change the number of time ticks on the X axis. When this is changed we only re-calculate the desired MajorStep value for the DateTimeContinuousAxis. 

Combining those three settings together results in strange behaviors with the X axis date time value labels when changing the AxisFontSize in the first place: 

https://dl.dropboxusercontent.com/u/55589036/Pictures/Animated%20Screenshots/20150326_1441.gif

Now how can we get rid of it? We already tried to re-add entirely new data in a different time scope. We also tried using UpdateLayout() and InvalidateVisual() in the end of our Update() method that re-adds the series. It seems this is a bug and we cannot find a way to bypass it. As I see you are keeping the old labels even on adding new data plots. This might be useful for resource management, but it disallows us to get rid of this display bug by simply redrawing those labels. 

How can we fix it? Or is there a way to force your control to really redraw the labels?


Thank you!

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 27 Mar 2015, 07:18 AM
Hello Martin,

You can find the answer to your question in the other thread you started. Below is a reference link to it so others could see it.
http://www.telerik.com/forums/misaligned-timetick-labels-160c92ea66de

Please keep the conversation in a single thread so it is easier to follow for both sides.

Regards,
Peshito
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
ChartView
Asked by
Martin
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or