Skip to content

[charts-pro] Add series-wide parameters for sampling #22713

@JCQuintas

Description

@JCQuintas

From a DX point of view, it coudl be nice to add an extra parametter to pick the algorithm at the pluggin level according to the series type.

UseChartProSamplingParameters<SereiesType> {
sampling?: SeriesType extneds keyof SamplingAlgo ? SamplingAlgo[SereiesType] : never
}

It's imperfect because when mixing a line and bar, some algo might not be available for both (lttb and m4) but it will enable

<LineChart
  sampling='m4'
  {/* ... */}
/>

which is easier than having to pass the `sampling property to each series

Originally posted by @alexfauquette in #22671 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: chartsChanges related to the charts.status: waiting for maintainerThese issues haven't been looked at yet by a maintainer.
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions