This is a migrated thread and some comments may be shown as answers.
Displaying a legend in a line chart
1 Answer 46 Views
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 28 Jul 2015, 04:29 PM

How can I display a legend in a line chart using Telerik's UI for Xamarin?

Is it possible to accomplish this without creating a customer renderer?

Is this supported functionality, but there is something specific about the series / data that would trigger the legend to show or hide?

 

Thanks for the help,

Anthony

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 31 Jul 2015, 06:41 AM
Hi Anthony,

I am afraid legend is not supported out of the box. However, you can create your own, using our RadListView for Xamarin Forms. You may want to define your own ItemTemplate for the control, here is how to do it:

<telerikListView:RadListView x:Name="listView" ItemsSource="{Binding LegendSource}">
    <telerikListView:RadListView.ItemTemplate>
      <DataTemplate>
          <telerikListViewPrimitives:ListViewTemplateCell>
          <telerikListViewPrimitives:ListViewTemplateCell.View>
            <!-- Your elements go here -->
          </telerikListViewPrimitives:ListViewTemplateCell.View>
        </telerikListViewPrimitives:ListViewTemplateCell>
      </DataTemplate>
    </telerikListView:RadListView.ItemTemplate>
  </telerikListView:RadListView>


Best regards,
Ves
Telerik
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
Tags
Chart
Asked by
Anthony
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or