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] Create Demo page #16587

Open
oliviertassinari opened this issue Feb 14, 2025 · 2 comments
Open

[charts] Create Demo page #16587

oliviertassinari opened this issue Feb 14, 2025 · 2 comments
Labels
component: charts This is the name of the generic UI component, not the React module! new feature New feature or request

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 14, 2025

Summary

This issue proposes the creation of a "Demo" page for the charts. "Demo" in the sense used in #16586.

In practice, it feels like having something like:

would be amazing.

https://www.chartjs.org/ doesn't have this, and it feels like they are truly missing out. It seems to have been a popular request in chartjs/Chart.js#2366, and in IMHO, the solution they came up with (chartjs/Chart.js#4043) missed the whole point of the problem.

Now, I still have a major complaint about the examples I shared just above: those demos are completely disconnected from the rest of the docs. When I was using recharts's docs, I really hated it, I was effectively picking the demo the closest to my use case, and then reverse engineering that demo. I felt like a monkey coder.

Instead, it feels like a great solution for us is to:

  1. Create a https://mui.com/x/react-charts/demo/ page (like we have for https://mui.com/x/react-data-grid/demo/)
  2. Have the content visually organized like https://echarts.apache.org/examples/en/index.html (great execution there).
  3. The actual demos used for the demo page has to be mostly cherry-picked demos from the existing docs. If there is a need for a new demo for the demo page, then we first try hard to add it to fill a gap in the docs. I suspected that it's possible for 100% of the demos. But maybe with a 90% hard limit, it's good enough?
  4. When you click on one of the examples to expand it, you are moved to the docs, where that demo is shown.

For comparison:

Search keywords: -

@oliviertassinari oliviertassinari added new feature New feature or request status: waiting for maintainer These issues haven't been looked at yet by a maintainer component: charts This is the name of the generic UI component, not the React module! labels Feb 14, 2025
@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 14, 2025
@JCQuintas
Copy link
Member

@oliviertassinari the https://echarts.apache.org/examples/en/index.html page is quite visual, I quite like it as well. I think https://airbnb.io/visx/gallery does it quite well too.

How would you handle a "demo" page for all charts types? Wouldn't we need to have a different sidebar somehow?

Have all the content be demos from the existing docs.

Not sure all, as some are quite similar, but most would be good

When you click on one of the examples to expand it, you are moved to the docs, where that demo is shown.

That would be amazing to have

@oliviertassinari
Copy link
Member Author

Not sure all, as some are quite similar, but most would be good

Ah right, ok, I wasn't clear enough. I have updated the issue description to clarity the idea.

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

3 participants