-
-
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] Deprecate xAxisKey
/zAxisKey
in favor of xAxisId
/zAxisId
#13940
Conversation
xAxisKey
/zAxisKey
in favor of xAxisId
/zAxisId
Deploy preview: https://deploy-preview-13940--material-ui-x.netlify.app/ Updated pages: |
Oh, I see, this seems to work with <LineChart
xAxis={[{ data: sample }]}
yAxis={[
{ id: 'linearAxis', scaleType: 'linear' },
{ id: 'logAxis', scaleType: 'log' },
]}
series={[
{ yAxisKey: 'linearAxis', data: sample, label: 'linear' },
{ yAxisKey: 'logAxis', data: sample, label: 'log' },
]}
rightAxis={{
axisId: 'logAxis',
tickFontSize: 10,
}}
height={400}
/>
Having a string as a shorthand seems OK. It makes me think of https://youtu.be/g92XUzc1OHY?si=YBN3hHGUSTA3mdVG&t=103, at one point she goes into the argument of progressively exposing complexity to the users when needed, but to keep things simple otherwise. Actually, if we expand the though beyond this problem instance, our API strategy with MUI X Charts of having low primitives that Recharts that compose well together, and one higher level abstracting like charts.js fit perfectly into this talk. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Based on #13906 (comment)
I replace
series.axisKey
byseries.axisId
for consistency.The
leftAxis
prop is not replaced byleftAxisId
because it can also be an object with some props for the targeted axis.Btw not sure it's a good DX