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

Crosshair behavior

1 Answer 94 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Yipeng
Top achievements
Rank 1
Yipeng asked on 03 Apr 2018, 03:46 PM

I am trying to use Crosshair behavior on inverse axis on the right (see attached png), horizontal axis is on top.

But the result is that both crosshair labels is not rendered properly.

is there any trick on this?

It is good when i use axis at default locations

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 04 Apr 2018, 11:37 AM
Hello Yipeng,

The location of the crosshair labels is not automatically synced with the axes positions. To achieve your requirement you can manually define the locations of the labels. Here is an example in code:
<telerik:ChartCrosshairBehavior>
    <telerik:ChartCrosshairBehavior.HorizontalLineLabelDefinition>
        <telerik:ChartAnnotationLabelDefinition Location="Right"/>
    </telerik:ChartCrosshairBehavior.HorizontalLineLabelDefinition>
    <telerik:ChartCrosshairBehavior.VerticalLineLabelDefinition>
        <telerik:ChartAnnotationLabelDefinition Location="Top" VerticalAlignment="Bottom" />
    </telerik:ChartCrosshairBehavior.VerticalLineLabelDefinition>
</telerik:ChartCrosshairBehavior>
I hope that helps.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ChartView
Asked by
Yipeng
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or