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 to partially provide bar/line charts x-axis #13794

Open
alexfauquette opened this issue Jul 10, 2024 · 0 comments
Open

[charts] Allow to partially provide bar/line charts x-axis #13794

alexfauquette opened this issue Jul 10, 2024 · 0 comments
Labels
component: charts This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature

Comments

@alexfauquette
Copy link
Member

alexfauquette commented Jul 10, 2024

The bar chart has a good default x-axis that automatically set the scale type to band, and populate data with needed array to display the y-values.

But those default are only applied if there is no axis provided:

xAxis:
xAxis ??
(hasHorizontalSeries ? undefined : [{ id: DEFAULT_X_AXIS_KEY, ...defaultAxisConfig }]),
yAxis:
yAxis ??
(hasHorizontalSeries ? [{ id: DEFAULT_Y_AXIS_KEY, ...defaultAxisConfig }] : undefined),

It should:

  1. Always defaultised the scale type to band
  2. defaultized the data if neither data nor dataKey are provided

The idea is to allow xAxis={[{ zomm: true }]} to work with bar chart

Search keywords:

@alexfauquette alexfauquette 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 Jul 10, 2024
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! enhancement This is not a bug, nor a new feature
Projects
None yet
Development

No branches or pull requests

1 participant