ChartCrosshairBehavior Label Format in RadCartesianChart

2 posts, 0 answers
  1. Alessandro
    Alessandro avatar
    1 posts
    Member since:
    Feb 2014

    Posted 04 Nov 2015 Link to this post


    I'm actually plotting different kind of series (StepLine, Line, Point etc) on a unique rad cartesian chart, where the X axis is a DateTimeContinuousAxis and the Y axis is a LinearAxis. I added to the Chart behavior a ChartCrosshairBehavior control to let the user see both the Y and X values of the points he is pointing to with the mouse.

    Since the date time format of the vertical label of the ChartCrosshairBehavior control is not the same of the x axis one (the one of the x axis is "HH:mm", defined by me, while the label one is "dd/mm/yyyy hh:mm", which I suppose was inherited) I was trying to change it, without success. 

    How could I change it to "HH:mm"? Is it correct to set the VerticalLineLabelDefinition property format of the ChartCrosshairBehavior control? If yes, how?

    Many thanks

  2. Peshito
    Peshito avatar
    493 posts

    Posted 05 Nov 2015 Link to this post

    Hi Alessandro,

    You can change the label format of both Horizontal or Vertical crosshair behavior's lines by using the ChartAnnotationLabelDeifinition. See the example below:
                <telerik:ChartAnnotationLabelDefinition HorizontalAlignment="Right"
    Hope this helps.

    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
Back to Top