Skip to content

Refactor chart imports #11090

@dlabrecq

Description

@dlabrecq

In order to support Victory and Apache ECharts, I'd like make Victory a peer dependency.
That way, users can choose which library they want to use.

If devs don't want Sankey, they can omit the package from the install or vice versa.
ConsoleDot has already done this with their @redhat-cloud-services packages.
For example, react-core, react-icons, and react-table are peer dependencies for frontend-components.

I would also like our imports to be:
import { Chart } from '@patternfly/react-charts/victory';
import { Sankey } from '@patternfly/react-charts/echarts';

We could introduce this change separately, but thinking v6 would be a better time to make this type of change.
Peer dependencies would make it a lot easier to introduce new features, regardless of the library we choose.
And probably less disruptive if we do it now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions