Skip to content
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] Allow dataset to be used with ScatterChart #14875

Closed
lgnbhl opened this issue Oct 8, 2024 · 5 comments
Closed

[charts] Allow dataset to be used with ScatterChart #14875

lgnbhl opened this issue Oct 8, 2024 · 5 comments
Labels
component: charts This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@lgnbhl
Copy link

lgnbhl commented Oct 8, 2024

Related page

https://mui.com/x/react-charts/scatter/

Kind of issue

Missing information

Issue description

There is no minimal reproducible examples using the 'dataset' parameter for ScatterChart and PieChart (like the basic example using BarChart). Learning how to use MUI X, I was not able to use the 'dataset' argument with ScatterChart and PieChart.

Would it be possible to add an minimal example for ScatterChart and PieChart using the 'dataset' argument (similar to the basic example in the BarChart documentation)?

Context

As a beginner in React, I tried to use the 'dataset' parameter with ScatterChart without success. Is it possible to fix this minimal example which is not working?

URL: https://codesandbox.io/p/sandbox/infallible-frost-67fcrp

<ScatterChart
    width={500}
    height={300}
    dataset={[
      { xVar: 1, yVar: 32 },
      { xVar: 2, yVar: 41 },
    ]}
    xAxis={[{ dataKey: "xVar" }]}
    series={[{ dataKey: "yVar", label: "Test" }]}
  />
);

Search keywords: ScatterChart using dataset parameter

@lgnbhl lgnbhl added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: docs-feedback Feedback from documentation page labels Oct 8, 2024
@michelengelen
Copy link
Member

@JCQuintas one for you? :P

@michelengelen michelengelen added enhancement This is not a bug, nor a new feature component: charts This is the name of the generic UI component, not the React module! labels Oct 8, 2024
@michelengelen michelengelen changed the title [docs] minimal example ScatterChart with dataset parameter [docs] Minimal example for ScatterChart with dataset parameter Oct 8, 2024
@JCQuintas
Copy link
Member

Both ScatterChart and PieChart don't support datasets at the moment. We have an idea to add something like xDataKey|yDataKey to the scatter series in the near future, but pie charts are more complicated.

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 8, 2024
@lgnbhl
Copy link
Author

lgnbhl commented Oct 8, 2024

Thanks for your quick answer. Looking forward to be able to use the dataset parameter with the Scatter and Pie Charts.

@JCQuintas JCQuintas added new feature New feature or request and removed support: docs-feedback Feedback from documentation page enhancement This is not a bug, nor a new feature labels Oct 9, 2024
@JCQuintas JCQuintas changed the title [docs] Minimal example for ScatterChart with dataset parameter [charts] Allow dataset to be used with ScatterChart Oct 9, 2024
@alexfauquette
Copy link
Member

Fixed by #14915

Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@lgnbhl 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants