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

[Solved] Pie and a DataTable

0 Answers 167 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Arek
Top achievements
Rank 1
Arek asked on 30 Nov 2011, 08:22 AM
I'm trying to use the new Pie chart. The source for the pie would be untyped DataTable. I was trying different ways but I cannot force it to work. 
The Model.Data is a DataTable that consist of 3 columns "Name" : string, "Surname" : string, "Sale" : int
How can I configure Chart to show a Pie ?

The code bellow shows some lines and the legent but it doesn't show the pie itself. Any ideas how can I force it to work? Where am I doing sth wrong.
@(
    Html.Telerik().Chart(Model.Data.Rows.OfType<DataRow>()).Name("chart")
    .Title("Sale")
        .Series(series => series.Pie(value => value["Sale"], x => x["Name"].ToString(), x => x["Name"].ToString()))
    
)


Regards,
Tags
Chart
Asked by
Arek
Top achievements
Rank 1
Share this question
or