Skip to content

[charts] Drop legacy class-name prefixes in v10 #22675

@JCQuintas

Description

@JCQuintas

Summary

Two charts class-name prefixes were historically misnamed and shipped to users:

  • PiecewiseColorLegend emitted MuiPiecewiseColorLegendClasses-* instead of MuiPiecewiseColorLegend-* (the interface name leaked into the prefix).
  • ChartsAxisZoomSliderThumb emitted MuiChartAxisZoomSliderThumb-* instead of MuiChartsAxisZoomSliderThumb-* (missing the s in Charts).

#22674 makes both components render the correct and legacy prefixes on the DOM so existing CSS keeps working while new code can target the right name.

v10 follow-up

Remove the legacy emission:

  • packages/x-charts/src/ChartsLegend/piecewiseColorLegendClasses.ts — drop the LEGACY_PREFIX constant and emit only MuiPiecewiseColorLegend-*.
  • packages/x-charts-pro/src/ChartsZoomSlider/internals/chartsAxisZoomSliderThumbClasses.ts — drop the LEGACY_PREFIX constant and emit only MuiChartsAxisZoomSliderThumb-*.

Mention the change in the v10 migration notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeIntroduces changes that are not backward compatible.scope: chartsChanges related to the charts.v10.x
    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