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

Creating line chart with the model from Kendo UI line chart

1 Answer 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Natalia
Top achievements
Rank 1
Natalia asked on 30 Dec 2014, 10:46 AM
Hi!

I'm trying to create a line chart report using the same data model which I use in my Kendo UI line chart. The model looks like this:

public class ChartData
{
public DateTime Date { get; set; }
public int VisitsCount { get; set; }
public int IdeasCount { get; set; }
public int CommentsCount { get; set; }
...
}

The model used by Kendo UI chart has a list of ChartData object. To create a line chart using Kendo UI I have to do something like this:

@(Html.Kendo().Chart(Model)
...
        .Series(series =>
                {
                        series.Line(model => model.VisitsCount);
                        series.Line(model => model.IdeasCount);
                        series.Line(model => model.CommentsCount);
                })
        .CategoryAxis(axis => axis.Categories(model => model.Date))
        .ValueAxis(axis => axis.Numeric())
...

How can I add a line chart in the Telerik Reporting framework to achieve the same effect? I have problems with setting it up and the only tutorial with creating a line chart with Telerik Reporting uses different data source structure (http://www.telerik.com/help/reporting/graphhowtocreatelinechart.html).

I would really appreciate your help.
Best regards,
Natalia

1 Answer, 1 is accepted

Sort by
0
Natalia
Top achievements
Rank 1
answered on 30 Dec 2014, 01:38 PM
OK. I was able to solve this. Everything worked fine when I set the Category Group to Fields.Date, created a Series Group with no filters, no groupings and no sortings and added three line series with Visits, Ideas and Comments.
Tags
General Discussions
Asked by
Natalia
Top achievements
Rank 1
Answers by
Natalia
Top achievements
Rank 1
Share this question
or