Page 1 of 1

Legendbox label size

Posted: Wed Sep 21, 2022 9:02 am
by cchrc
Hello,
Please consider the attached images of a horizontal-aligned legendbox.
It seems that each label gets its size from the larger label. This could be ok when label have the same size, more or less. In my case the result is not very nice.
Would it be possible to have each label allocating just the needed space for its content?
Thanks,

Re: Legendbox label size

Posted: Wed Sep 21, 2022 12:22 pm
by ArctionKestutis
Hello,
The length of text string in LegendBox is the same for all series. And it is based on longest series title. The shorter strings are padded with empty space. That was in original design, therefore, reworking Legendbox rendering will be a challenge.

There are some ways to manipulate layout, but it is not straightforward.
* You can try using legend.Layout setting ‘Vertical’.
* You can create multiple LegendBoxes and use offset property to arrange them (each Series has LegendBoxIndex, and after Chart is rendered you can read size LegendBoxes.GetRenderedRect()).

Re: Legendbox label size

Posted: Wed Sep 21, 2022 3:42 pm
by cchrc
Hi Kestutis,
thanks for your reply.

In this particular case I'm going to try to make the longer label smaller.
In any case, it would be nice if you would consider introducing an option to have labels with dynamic widths.

Re: Legendbox label size

Posted: Thu Sep 22, 2022 7:26 am
by ArctionKestutis
The request for feature has been recorded.

If you have more requests and would like to influence our development roadmap, you could visit our polls for the 'hot' features: Vote for the features 1-10 or Vote for the features 11-20.