Skip to content

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

Open
@alexfauquette

Description

@alexfauquette

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:

Metadata

Metadata

Labels

component: chartsThis is the name of the generic UI component, not the React module!enhancementThis is not a bug, nor a new feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions