WebUI - Chart - Legend

35 views
Skip to first unread message

Mohsen Reisi

unread,
May 10, 2019, 1:26:25 PM5/10/19
to AIMMS - The Modeling System
Hi there,

Is it possible to add a legend to a chart? Should we use CSS and/or JavaScript? If so, would you please provide a sample code.

Best regards,
Mohsen 

Mohan

unread,
May 10, 2019, 2:41:58 PM5/10/19
to AIMMS - The Modeling System
Hello Mohsen,

You can add a legend using a type of the selection widget. See this documentation. https://documentation.aimms.com/webui/selection-widgets.html?highlight=legend

I added a legend to the example project in this post: https://bit.ly/30adTjk

You have to create a set with elements being what you want the legend to state and also declare an element parameter in there. You also should add the color annotations to this set.

Note that I edited the CSS file to have background and stroke elements as well and I remove the .tag-mapv2 filter.
PopulationMap.zip
Reply all
Reply to author
Forward
0 new messages