This is a migrated thread and some comments may be shown as answers.

Display Chart Legend outside of plot area / Graph?

1 Answer 221 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 1
Grant asked on 07 Apr 2014, 04:15 AM
Hi,

Please see my chart attached. It is very long so I have made it's parent container overflow for scroll, however I need a way to identify to the user what each trend line is.

I can't seem to find the css class for the legend, I would like to absolutely position it outside of the graph perhaps. My other option would be to somehow attach some text to the end portion of the each trendline, but I'm not sure how this would be done. I could not figure out how to attach a note to the very last element in a series either.

Any help with any of these issues would be greatly appreciated!

Thanks!

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 08 Apr 2014, 03:15 PM
Hi Grant,

Moving the legend outside the plotArea is not supported by Kendo UI Chart. As a possible workaround I can suggest the following:
- Disable the default legend;
- Create an additional HTML element and configure it looking like a legend;
- Position the aforementioned HTML element outside the graph.
Regarding displaying text on end position - in order to achieve this outcome I would suggest displaying only the last series.label. For your convenience I prepared a simple jsBin example which demonstrates a possible implementation. 

Regards,
Iliana Nikolova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Charts
Asked by
Grant
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or