Posted 13 December 2017, 5:29 am EST
Hi, is there a way of adding/setting a title to the legend? If not, can this feature be added to the future version? Thanks.
Forums Home / Wijmo / General Discussion
Posted by: Yifan_Zhang on 13 December 2017, 5:29 am EST
Posted 13 December 2017, 5:29 am EST
Hi, is there a way of adding/setting a title to the legend? If not, can this feature be added to the future version? Thanks.
Posted 13 December 2017, 11:00 pm EST
Hi,
Could you please elaborate your requirement? You may show tooltip for legends on mousehover.
~Manish
Posted 15 December 2017, 9:55 am EST
Thanks for the reply. Usually the series name is unclear or insufficient to represent the whole meaning. For example, we have two series with name “Yes” and “No”, it lacks the context in the legend. If we can have an option for displaying a title for the legend, then we can specify title like “Alcohol related?” in the legend as the screenshot in the attachment.
Posted 17 December 2017, 11:40 pm EST
Hi ,
We are investigating on this. We will update you soon.
~Manish
Posted 18 December 2017, 5:45 pm EST
Hi,
For this, you need to Add text SVG element within Legend SVG element. Please refer to the attached sample for the same.
~Manish
Posted 19 December 2017, 9:37 am EST
Thank you but I didn’t see the attached sample. Can you post that again?
Posted 19 December 2017, 3:21 pm EST
Hi,
We are sorry for the inconvenience.
Please find the attached sample here.
~Manish
Posted 20 December 2017, 6:25 am EST
Thanks for the sample. It works at the first sight, but then think about the legend can be placed at different position, this manual workaround seems to be insufficient/non-flexible. So is it possible to have this as a feature integrated into the wijmo framework? Thanks.
Posted 20 December 2017, 10:42 pm EST
Hi,
We have forwarded to the concerned team for further investigation with id 301916. We will let you know as we get any update on this.
~Manish
Posted 22 December 2017, 5:23 am EST
Hello Zhang
Thank you for the request/suggestion. In build 396, we have added two new properties to the legend class to address this: title and titleAlign.
If you are using earlier versions, this fiddle shows a simple way to add titles using a dummy series. This method works regardless of legend position:
http://jsfiddle.net/Wijmo5/fzafjquc/
Thanks again for the request/suggestion.
Posted 22 December 2017, 6:23 am EST
That’s so cool. Thank you so much!