Skip to content

[docs][charts] Document line mark size customization - #23370

Merged
JCQuintas merged 2 commits into
mui:masterfrom
JCQuintas:docs/charts-marker-size
Aug 19, 2026
Merged

[docs][charts] Document line mark size customization#23370
JCQuintas merged 2 commits into
mui:masterfrom
JCQuintas:docs/charts-marker-size

Conversation

@JCQuintas

Copy link
Copy Markdown
Member

Closes #20742.

The Lines page never explained how to resize the marks. Follow-up to the discussion in #20721, where the suggested markElementClasses.root selector does not work for the default 'circle' shape.

Verified against the source and in a browser test:

  • There is no size property on the line series (markerSize only exists on scatter series) and no usable one on the mark slot: CircleMarkElement hardcodes r={5} after the prop spread, and MarkElement builds its d attribute from a fixed-size d3 symbol, so slotProps.mark cannot change either.
  • CSS on lineClasses.mark does work: r for the default 'circle' shape, and scale for the path-based shapes, which keeps the mark centered on its data point. r has no effect on paths, and scale shifts circles off their data point, so the two are not interchangeable.

Adds a Mark size subsection to the CSS section, plus a playground demo that switches between shapes and prints the matching sx snippet.

Line marks have no size property on the series or the mark slot, so the
size is set with CSS on lineClasses.mark: the r property for the default
circle shape, and scale for the path-based shapes.

Adds a playground demo that switches between shapes and shows the
matching sx snippet.
@JCQuintas JCQuintas self-assigned this Aug 18, 2026
@JCQuintas JCQuintas added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. docs Improvements or additions to the documentation. scope: charts Changes related to the charts. labels Aug 18, 2026
@code-infra-dashboard

code-infra-dashboard Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-scheduler 0B(0.00%) 0B(0.00%)
@mui/x-scheduler-premium 0B(0.00%) 0B(0.00%)
@mui/x-chat 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

Comment thread docs/data/charts/lines/MarkSize.js Outdated
Comment thread docs/data/charts/lines/MarkSize.tsx Outdated
Co-authored-by: Jose C Quintas Jr <juniorquintas@gmail.com>
Signed-off-by: Jose C Quintas Jr <juniorquintas@gmail.com>
@JCQuintas
JCQuintas requested a review from noraleonte August 19, 2026 07:52

@noraleonte noraleonte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👌

@JCQuintas
JCQuintas merged commit 82d478d into mui:master Aug 19, 2026
22 checks passed
@JCQuintas
JCQuintas deleted the docs/charts-marker-size branch August 19, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. scope: charts Changes related to the charts. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Document marker size customization

2 participants