Skip to content

Commit 5e77493

Browse files
Update README.md
1 parent fe2905c commit 5e77493

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
11
# How-to-add-crosshair-lines-in-.NET-MAUI-SfCartesianChart
2-
Learn how to enhance your MAUI Cartesian Chart by adding crosshair functionality for precise data interaction.
2+
This repository demonstrates how to add crosshair lines to a .NET MAUI Cartesian Chart, making it easier for users to analyze data. The crosshair lines are dynamically updated based on user touch interaction with the chart. Two methods are provided for implementing this feature: using GraphicsView with ChartInteractiveBehavior and using Annotations with ChartInteractiveBehavior.
3+
## Methods to Add Crosshair Lines
4+
### 1. Using GraphicsView with ChartInteractiveBehavior
5+
In this approach, we use a combination of GraphicsView and ChartInteractiveBehavior to render the crosshair lines based on the user's touch position.
6+
### 2. Using Annotations with ChartInteractiveBehavior
7+
In this method, Annotations are used alongside ChartInteractiveBehavior to dynamically position the crosshair lines on the chart, updating them as the user interacts.
8+
## Output
9+
Both methods dynamically render crosshair lines that follow the user's touch, improving the chart's interactivity and making it easier to analyze data points on the chart.
10+
11+
[CrossHair in .NET MAUI SfCartesianChart](https://github.com/user-attachments/assets/49c574ff-dae7-499e-a13b-c47e80b6d353)
12+
13+
14+

0 commit comments

Comments
 (0)