Misaligned TimeTick labels

2 posts, 0 answers
  1. Martin
    Martin avatar
    34 posts
    Member since:
    Oct 2012

    Posted 26 Mar 2015 Link to this post

    Hi there, 

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

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

    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: 


    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: 


    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!

  2. Peshito
    Peshito avatar
    522 posts

    Posted 27 Mar 2015 Link to this post

    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.

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


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

Back to Top