Description
Charting Control
LineChart
Package version
5.23.92
React version
19.0.0
Environment
https://codepen.io/abhranilnaha/pen/raVPmer
Current Behavior
When user hovers over a data point in a line chart, it shows all the data points for the vertical line, instead of showing showing the data point on which user hovered.
Expected Behavior
We should have capability to get the y-value for the selected data point in the line chart.
Reproduction
https://codepen.io/abhranilnaha/pen/raVPmer
Steps to reproduce
-
Try following link:
https://codepen.io/abhranilnaha/pen/raVPmer -
Hover over any data point and it shows the first data point in the tooltip.
-
onRenderCalloutPerDataPoint for Line Chart contains the following props:
x is the selected x-value and values contain all data point values for the vertical line. -
Need capability to get the y-value of the data point on which user hovered.
export interface ICustomizedCalloutData {
x: number | string | Date;
values: ICustomizedCalloutDataPoint[];
}
export interface ICustomizedCalloutDataPoint {
legend: string;
y: number;
color: string;
xAxisCalloutData?: string;
yAxisCalloutData?: string | {
[id: string]: number;
};
}
Are you reporting an Accessibility issue?
None
Suggested severity
Urgent - No workaround and Products/sites are affected
Products/sites affected
Fabric Real Time Intelligence
Are you willing to submit a PR to fix?
yes
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.