Skip to content

Custom Legend Marker #4852

Answered by Muhammad-bK
Muhammad-bK asked this question in Q&A
Discussion options

You must be logged in to vote

I just realized you can pass an array of customHTMLs as follows

customHTML: [html for seriesIndex 1, html for seriesIndex 2, ....]

legend: { position: 'bottom', markers: { customHTML: [ () => { return <div style=" width: 20px; height: 8px; border-radius: 20px; display: inline-block; background-color: ${ColorBaseAmber400}; "></div>; }, () => { return <div style=" width: 20px; height: 8px; border-radius: 20px; display: inline-block; background-color: ${ColorBaseViolet600}; "></div>; }, ], }, },

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Muhammad-bK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant