How to add custom legends based on canvas painting

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
aaron
Newbie
Newbie
Posts: 30
Joined: Mon Apr 17, 2023 12:00 am

How to add custom legends based on canvas painting

Post by aaron » Tue May 09, 2023 5:17 am

Hello team,
I would like to display legends based on my custom canvas painting like rectangles and all.
How could I achieve this ?

Marc
Site Admin
Site Admin
Posts: 1274
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Re: How to add custom legends based on canvas painting

Post by Marc » Tue May 09, 2023 4:10 pm

Hello,

You can draw it via rectangles, index positioning the rectangles and use the fillbrush from each Series (or point) to which the legend item is related. I recommend using Chart relative positions not absolute positions, to locate the Legend. There are some examples (without the coloured rectangles) in the demo linked via this thread:

https://www.steema.com/support/viewtopi ... 891#p79550

Regards,
Marc
Steema Support

Post Reply