-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[charts] Customising sparkline highlight point #14168
Comments
I'm not sure to fully get your expected behavior By reusing some hooks provided to create custom components I created an https://codesandbox.io/s/awesome-dust-vpcqkk?file=/src/Demo.tsx Does it solve your issue? |
Yes, this is what i need.. Thank you very much |
@Manikandasubramani: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Hey @alexfauquette , I am getting this error "export 'unstable_useLineSeries' (imported as 'unstable_useLineSeries') was not found in '@mui/x-charts/hooks' (possible exports: getValueToPositionMapper, useDrawingArea, useXScale, useYScale)"., is this because of a version mismatch ? My version is "@mui/x-charts: ^6.19.5" |
Two solutions:
|
#2 worked out great.. Thank you very much.. :) |
@Manikandasubramani: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
I have a sparkline chart from MUI for react as follows
Current behavior
If "showHighlight" is set to true, on hover of the sparkline chart, we can see a highlight coming on the chart on each xaxis point.
Expected behavior
Q1: Is there a way to have those highlighted points always shown ?
Q2: IS there a possibility to show the highlighted points in different colors based on the xaxis value of that exact point
Context
We are trying to have the highlighted datapoint always in the sparkline chart and as well to give a color different of each data point based on the data point value.. for ex., the highlighted data point in green is the y-axis value is >0 or in red if the value is <=0
Your environment
npx @mui/envinfo
Search keywords: DefaultChartsAxisTooltipContent
The text was updated successfully, but these errors were encountered: