Skip to content

[charts] Charts Legend does not have ability to customize by individual legend item #15563

@MMShep97

Description

@MMShep97

The problem in depth

original issue with information: #15560

Hi there! Not sure if this is just a docs update for someone who couldn't figure out the advanced case, or actually a feature request. Thanks in advance!

Legend does not have the ability to customize individual legend items -- specific aim is to make the legend a dotted line just like the line on the graph. I know you can customize every item the same, like in these docs, but not individual pieces. See the image below for the expected/wanted functionality:

image

https://codesandbox.io/p/sandbox/flamboyant-pine-9249sn

Not a bug, just a reproduction of my current code!

Your environment

`npx @mui/envinfo`
  System:
    OS: macOS 15.1
  Binaries:
    Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
    npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
    pnpm: 9.11.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.86
    Edge: 131.0.2903.63
    Safari: 18.1
  npmPackages:
    typescript: 5.6.3 => 5.6.3 

Search keywords: legend itemMark mark series dotted strokeDasharray charts chart
Order ID: 0332927583

Metadata

Metadata

Assignees

Labels

scope: chartsChanges related to the charts.support: commercialSupport request from paid users.support: premium standardSupport request from a Premium standard plan user. https://mui.com/legal/technical-support-sla.type: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions