I have what I believe should be a simple problem, my legend items are just showing up as item0 - item6. I need them to show up with the name of the object in my items from the database.
I'm using a dataset to link to SQL, my 2 fields in my dataset are "sales" and "productclass".
I'm not sure what I missed, I followed the examples from the legend section exactly I think.
thanks for any help you can provide.
steve
I'm using a dataset to link to SQL, my 2 fields in my dataset are "sales" and "productclass".
I'm not sure what I missed, I followed the examples from the legend section exactly I think.
thanks for any help you can provide.
steve
| <UserControl x:Class="UserControl2" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="300" Height="300" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> |
| <Grid> |
| <telerik:RadChart Name="RadChart1" > |
| </telerik:RadChart> |
| </Grid> |
| </UserControl> |
| Imports Telerik.Windows.Controls.Charting |
| Imports System.Data |
| Partial Public Class UserControl2 |
| Private Shared tacust As New DataSet1TableAdapters.pcSumTableAdapter |
| Private Shared dscust As New DataSet1 |
| Private Shared m_sales As DataTable |
| Public Shared ReadOnly Property Sales() As DataTable |
| Get |
| Return m_sales |
| End Get |
| End Property |
| Private Sub UserControl1_Initialized(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Initialized |
| RadChart1.DefaultSeriesDefinition = New PieSeriesDefinition() |
| RadChart1.DefaultView.ChartLegend.UseAutoGeneratedItems = True |
| RadChart1.DefaultView.ChartLegend.Header = "Top 10" |
| tacust.Fill(dscust.pcSum) |
| m_sales = dscust.Tables("pcSum") |
| RadChart1.ItemsSource = m_sales |
| End Sub |
| End Class |