-
-
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] Feedback/issues found while migrating the Toolpad chart component to x-charts #10140
Comments
Quick answersFor full-width/full-height you can use About missing dots in composed line charts, it's because line charts have 3 sub-components: TODO
|
Thanks, those solved it! |
This comment was marked as outdated.
This comment was marked as outdated.
hey @apedroferreira ticknumber works only if you have a time serie, meaning your xAxis data is an array of "Date" objects |
I see, thanks for pointing that out! |
Effectively, There are two aspects: ticks and ticks label
|
Ok, thanks for the answer! So I guess the text fixes should solve the issue. :) |
With #10648 The axis ticks should be solved since label overflow is automatically avoided |
I just tried with the latest version in the PR and it looks perfect!! Thanks! |
Duplicates
Latest version
Steps to reproduce 🕹
PR in Toolpad, just for context: mui/toolpad#2500
Current behavior 😯
Most of the implementation went great, just found a few issues along the way and some things that I wasn't sure how to do.
Many of them might be just me missing something or lacking context, so I'm really just listing everything I thought could be worth mentioning to provide as much feedback as possible.
Expected behavior 🤔
Features
How can I make the chart full-width or even full-height? Both would be useful for Toolpad, at least full-width would be. The current height and width props seem to only take numbers.solvedI was using a combined chart with thesolved<ChartContainer />
component, and noticed that in the line charts there are no dots along the lines as there are in https://mui.com/x/react-charts/lines/. Is this intentional? Not very important and might make sense for them not to show in some cases, but just making sure.Errors
I ran into a few errors sometimes that didn't really help me towards figuring out what was wrong:
<ChartsTooltip />
component inside theChartContainer
, but if no chart is plotted, because for example the axis properties do not match the series data being passed, hovering the chart shows the errorCannot read properties of undefined (reading 'toLocaleString')
. I expected the Tooltip not to show any errors in this scenario even though no chart is being shown.Update: this is because I was using
linear
scaleType for a line chart, and the x-axis had string values. Usingpoint
fixed it, so this isn't an issue anymore. I can try to provide a repro if you decide to look into this though.yAxis
prop toChartContainer
, we get an error that says it cannot get.scale
of undefined. This specific error seems to show in many similar cases where some chart configuration is wrong, maybe the error messages could be more useful somehow? ThisyAxis
prop is also marked as optional in the types, so maybe I did not expect it to cause an error.Minor issues
--ChartsLegend-rootSpacing
to a bigger value (25px). Not sure it could/should be more responsive either instead of just manual spacing? -> Shuld be solved by [charts] Improve the management of the text (legend only) #10138Docs
'--ChartsLegend-itemMarkSize': 20px,
, for example, I guess it should be'--ChartsLegend-itemMarkSize': '20px',
? -> [charts] Improve the management of the text (legend only) #10138 may lead to a new interface without CSS varsContext 🔦
None of the remaining issues are blocking, so nothing too important anymore!
Your environment 🌎
Google Chrome
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: