Crosshair
Since 0.1.0-alpha.22Lines at the item under the pointer and at its nearest value, with both in badges on the axes, to read values off the axes exactly.
A crosshair
Crosshair draws a line at the item under the pointer and one at the value nearest it, with the item's argument and that value in badges on the axes, so a reader can read a line's value off the axis exactly.
Static
Preview
60°F65°F70°F75°F80°F85°F90°F95°F
12 AM3 AM6 AM9 AM12 PM3 PM6 PM9 PM
12 AM
Temperature
74°F
Dew point
66°F
1 AM
Temperature
73°F
Dew point
66°F
2 AM
Temperature
72°F
Dew point
65°F
3 AM
Temperature
71°F
Dew point
65°F
4 AM
Temperature
71°F
Dew point
65°F
5 AM
Temperature
70°F
Dew point
64°F
6 AM
Temperature
71°F
Dew point
65°F
7 AM
Temperature
74°F
Dew point
66°F
8 AM
Temperature
77°F
Dew point
67°F
9 AM
Temperature
80°F
Dew point
67°F
10 AM
Temperature
83°F
Dew point
68°F
11 AM
Temperature
86°F
Dew point
68°F
12 PM
Temperature
88°F
Dew point
67°F
1 PM
Temperature
90°F
Dew point
67°F
2 PM
Temperature
91°F
Dew point
66°F
3 PM
Temperature
92°F
Dew point
66°F
4 PM
Temperature
91°F
Dew point
66°F
5 PM
Temperature
89°F
Dew point
67°F
6 PM
Temperature
87°F
Dew point
67°F
7 PM
Temperature
84°F
Dew point
68°F
8 PM
Temperature
81°F
Dew point
68°F
9 PM
Temperature
79°F
Dew point
67°F
10 PM
Temperature
77°F
Dew point
67°F
11 PM
Temperature
76°F
Dew point
66°F
Temperature and dew point, July 14, 2026
| Hour | Temperature | Dew point |
|---|---|---|
| 12 AM | 74°F | 66°F |
| 1 AM | 73°F | 66°F |
| 2 AM | 72°F | 65°F |
| 3 AM | 71°F | 65°F |
| 4 AM | 71°F | 65°F |
| 5 AM | 70°F | 64°F |
| 6 AM | 71°F | 65°F |
| 7 AM | 74°F | 66°F |
| 8 AM | 77°F | 67°F |
| 9 AM | 80°F | 67°F |
| 10 AM | 83°F | 68°F |
| 11 AM | 86°F | 68°F |
| 12 PM | 88°F | 67°F |
| 1 PM | 90°F | 67°F |
| 2 PM | 91°F | 66°F |
| 3 PM | 92°F | 66°F |
| 4 PM | 91°F | 66°F |
| 5 PM | 89°F | 67°F |
| 6 PM | 87°F | 67°F |
| 7 PM | 84°F | 68°F |
| 8 PM | 81°F | 68°F |
| 9 PM | 79°F | 67°F |
| 10 PM | 77°F | 67°F |
| 11 PM | 76°F | 66°F |
Code
@* A summer day's temperature and dew point by the hour, read off the axes with a crosshair. *@
<Chart Items="_hours" Argument="h => h.Hour" Title="Temperature and dew point, July 14, 2026" Crosshair>
<ChartArgumentAxis Format="h tt" />
<ChartValueAxis Format="0°F" />
<ChartLineSeries Value="h => h.Temperature" Name="Temperature" EndLabel />
<ChartLineSeries Value="h => h.DewPoint" Name="Dew point" EndLabel />
</Chart>
{
private record HourReading(DateTime Hour, double Temperature, double DewPoint);
private static readonly double[] Temperatures = [74, 73, 72, 71, 71, 70, 71, 74, 77, 80, 83, 86, 88, 90, 91, 92, 91, 89, 87, 84, 81, 79, 77, 76];
private static readonly double[] DewPoints = [66, 66, 65, 65, 65, 64, 65, 66, 67, 67, 68, 68, 67, 67, 66, 66, 66, 67, 67, 68, 68, 67, 67, 66];
private readonly HourReading[] _hours = Enumerable.Range(0, 24)
.Select(h => new HourReading(new DateTime(2026, 7, 14, h, 0, 0), Temperatures[h], DewPoints[h]))
.ToArray();
}The value line snaps to the series nearest the pointer; from the keyboard it stays on the series it was on.
On a scatter or bubble chart, both lines run through the nearest point. The crosshair goes with the tooltip, so with Tooltip false there's none, and it's left out of downloads.