27
Views
5
Comments
Solved
[OutSystems Charts] Donut Chart - Display Full Legend
Forge component by OutSystems R&D
14
Published on 07 Sep 2020
Application Type
Reactive

Is it possible to fully expand the legend of a donut chart vertically?  So that all the elements of the legend are displayed, rather than having to use the default method of using the arrows to page through the different values, if there is a large number?

donutlegend.png

Rank: #129
Solution

Hi Jeff,

this is automatic behaviour of the highcharts component to deal with the available space.  So if you tinker with this, it should be well tested with different data sets and devices, to make sure there's no unexpected behaviour.

You can augment the available vertical space with the height property of the chart, and you can also disable the option of the legend adjusting.  Only disabling is not the answer, as it might push up your chart out of view.

see attaced oml for some experimenting.

this is my attempt at tailoring the height of the chart to the number of legend items, you'd have to finetune exact calculation.  The reason I do this is to avoid an excessively high empty chart in case there are less options.

this is how you disable the mechanism of automatic pagination :

Good luck,

Dorine

rwDemoLegendNavigation.oml

Rank: #3799

Thanks Dorine, works great!

Champion
Rank: #105

Clean implementation, Dorine.

Rank: #129


Dank voor het compliment Swatantra,

dat doet deugd

Hi Jeff,

This might be the issue because of height size.

Please try by increasing the height value.


Hope this helps you !!

Regards,

LK

Rank: #129
Solution

Hi Jeff,

this is automatic behaviour of the highcharts component to deal with the available space.  So if you tinker with this, it should be well tested with different data sets and devices, to make sure there's no unexpected behaviour.

You can augment the available vertical space with the height property of the chart, and you can also disable the option of the legend adjusting.  Only disabling is not the answer, as it might push up your chart out of view.

see attaced oml for some experimenting.

this is my attempt at tailoring the height of the chart to the number of legend items, you'd have to finetune exact calculation.  The reason I do this is to avoid an excessively high empty chart in case there are less options.

this is how you disable the mechanism of automatic pagination :

Good luck,

Dorine

rwDemoLegendNavigation.oml

Rank: #3799

Thanks Dorine, works great!

Champion
Rank: #105

Clean implementation, Dorine.

Rank: #129


Dank voor het compliment Swatantra,

dat doet deugd