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

Misaligned TimeTick labels

2 Answers 112 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, 02:25 PM
Hi there, 

we are currently working on a wrapper control of your RadChartView RadCartesianChart that contains a DateTimeContinuousAxis. Out clients should be able to modify the FontSize of it, so we bond it to our DependencyProperty AxisFontSize:

<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 the client changes the AxisFontSize on design or run time something strange happens: https://dl.dropboxusercontent.com/u/55589036/Pictures/Animated%20Screenshots/20150326_1440.gif

Now we experimented a bit to get rid of this problem. In the Changed-Event of the AxisFontSize we tried to re-add entirely new Series with entirely new data plots in a different time range than before. Nothing changes, because your control seems to keep the old labels for resource purposes. We even tried to call UpdateLayout() and InvalidateVisual() in our Update() method that will be called in the Changed-Event.

Now to up the stakes even more we got two other DependencyProperties on our control:
- TimeRange: This enum value (seconds) defines the time range of the DateTimeContinuousAxis. When this is changed we call our Update() method, too, to re-add all Series with new dummy or live plot data in the Changed-Event.
- TimeTickCount: This defines the number of time ticks on the X axis. When changed we calculate the new MajorStep of the X axis and set it to the DateTimeContinuousAxis MajorStep property.

When we change the AxisFontSize and finally change one of the other DependencyProperties it's getting even more weird: https://dl.dropboxusercontent.com/u/55589036/Pictures/Animated%20Screenshots/20150326_1441.gif


How can we fix this problem or bypass the bug? Is there at least a way to force your control to remove and re-add the labels to get rid of this problem?

2 Answers, 1 is accepted

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

I tried to reproduce your issue but to no avail. With our latest release we made improvements in scenarios related with runtime font size change in our controls. Please make sure you are using the latest version of our suite. I have attached the sample project I worked on in order to reproduce your issue and a video showing the result.

If the issue is still reproducible on your side with our latest version, I would ask you to modify the project attached in a way pointing out the issue or simply provide a runnable copy of yours. Note that this is a forum post and you will need to use a third party website for files sharing.

I also noticed you have started two separated threads for the same topic and would suggest to keep the conversation in a single thread so it is easier for both sides to follow.

Regards,
Peshito
Telerik
 

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

 
0
Martin
Top achievements
Rank 1
answered on 30 Mar 2015, 08:31 AM
Hi Peshito,

I forgot to check the threads after your forum told me there was an error when sending my first post. So I rewrote everything, this was a time waste. Simply delete the other thread then.

Back to concern. Thank you for the example project and your video proof. In Q3 2014 the problem existed. Updating from Q3 2014 to Q1 2015 solved this issue!


Yours faithfully,

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