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

Integration: Data Visualization #2697

Open
Tracked by #2353
endigo9740 opened this issue May 29, 2024 · 3 comments
Open
Tracked by #2353

Integration: Data Visualization #2697

endigo9740 opened this issue May 29, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation feature request Request a feature or introduce and update to the project.

Comments

@endigo9740
Copy link
Contributor

endigo9740 commented May 29, 2024

Describe the feature in detail (code, mocks, or screenshots encouraged)

Now the radial and conic gradients are handled as Tailwind features, rather than a dedicated component, we should still aim to provide support for data visualization elements. At least to replace the way conic gradient was used in v2 and prior.

This might include:

  • Pie Charts
  • Bar Charts
  • Line Charts
  • etc

In order to handle the variety of options and configurations folks might need, my recommendation is we push folks towards a third-party solution, but pair it with Skeleton styles (Skeleton colors). For this we could use:

As such, we should aim to make an opinionated choice and showcase how it can be integrated (ala Lucide for icons). In most cases, it should be as simple as passing the appropriate CSS Custom Properties to define the colors.

Provide relevant links or additional information.

For Chart.css, setting colors might work like this:

#my-chart .column {
  --color-1: rgb(var(--color-primary-500));
  --color-2: rgb(var(--color-secondary-500));
  --color-3: rgb(var(--color-tertiary-500));
  --color-4: rgb(var(--color-success-500));
  --color-5: rgb(var(--color-warning-500));
  --color-6: rgb(var(--color-error-500));
  --color-7: rgb(var(--color-surface-500));
  /* ... */
}

Technology

The three standard options typically revolve around these three types of tech:

  • CSS: typically the simplest to use, but has the least amount of options
  • SVG: typically a good balance of capability and ease of use (thinking of Tailwind fill- colors here)
  • Canvas: typically the most performant but also the hardest to configure (likely won't support light/dark mode)
@endigo9740 endigo9740 added feature request Request a feature or introduce and update to the project. documentation Improvements or additions to documentation labels May 29, 2024
@endigo9740 endigo9740 added this to the v3.0 (Next) milestone May 29, 2024
@kmalloy24
Copy link
Contributor

Throwing ECharts (Apache 2.0 License) out there.

Evidence.dev built their charting library with ECharts and Svelte - it's open source (MIT).

@endigo9740
Copy link
Contributor Author

endigo9740 commented Jul 19, 2024

@kmalloy24 sounds great on paper!

Per the themes, I think we'll run into the situation where they're almost always SVG or Canvas based, which means they expect the styles to be passes via JS, JSON, etc.

Given the new Theme Generator is a standalone tool, we can actually do some interesting stuff with it - such as have a way to export the color data in multiple formats. Might be able to do a JSON format that can be parsed by tools like this.

Note our focus is on v3 components right now, but I do plan to circle back to this in the future. This may be an additional feature we can implement.

@endigo9740
Copy link
Contributor Author

endigo9740 commented Nov 8, 2024

Adding this to the list of options to review:
https://echarts.apache.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature request Request a feature or introduce and update to the project.
Projects
None yet
Development

No branches or pull requests

2 participants