Customize legend styles in Doughnut series.

Thread is closed for posting
2 posts, 0 answers
  1. Lokesh
    Lokesh avatar
    2 posts
    Member since:
    May 2016

    Posted 24 May 2016 Link to this post

    Can you please provide an example to demonstrate how to  customize legend styles and also how to make these legend items clickable ?
  2. Victor
    Victor avatar
    1358 posts

    Posted 26 May 2016 Link to this post

    Hi Lokesh,

    Thanks for writing.
    You can inherit from RadLegendView and override its setLegendProvider() method. Inside the method you can create a custom adapter for the underlying list view. This adapter is responsible for creating the legend items so you will have full control. The base implementation looks like this:
    public void setLegendProvider(LegendInfoProvider value) {
        if (this.legendProvider == value) {
        if (this.legendProvider != null) {
        this.legendProvider = value;
        if (this.legendProvider != null) {
            this.adapter = new LegendItemListAdapter(this.context, this.legendProvider.getLegendInfos(), this);
    Feel free to modify it as you require.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top