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

Chart, Binding to remote data

2 Answers 88 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 08 Feb 2016, 04:19 PM

Hello,

tried a simple chart with remote data, but theres no POST to PPM_Read on page load/refresh ...

everything else is working fine, grids, dropdownlist, etc ...

Maybe anyone knows what i'm doin wrong here ?

 

Greetings, Oliver

 

Controller:

public ActionResult PPM_Read()

 

 

{

 

var data = db.viewPointCipWqsScrapPartsMonthPPM;

return Json(data, JsonRequestBehavior.AllowGet);

 

 

}

 

 

View:

@(Html.Kendo().Chart<MapsMvc.Areas.mPointCip.Models.viewPointCipWqsScrapPartsMonthPPM>().Name("chart2")

.Title("WQS")

.Legend(legend => legend

.Position(ChartLegendPosition.Top))

.DataSource(dataSource => dataSource.Read(read => read.Action("PPM_Read", "WQS")))

.Series(series =>

{

series.Column(model => model.PPM).Name("PPM");

})

.CategoryAxis(axis => axis

.Categories(model => model.LastProcess)

.Labels(labels => labels.Rotation(0))

.MajorGridLines(lines => lines.Visible(false))

)

.ValueAxis(axis => axis.Numeric()

.Labels(labels => labels.Format("{0:N0}"))

.MajorUnit(1000)

.Line(line => line.Visible(true))

.Max(10000)

)

.Tooltip(tooltip => tooltip

.Visible(true)

.Format("{0:N0}")

)

)

 

 

2 Answers, 1 is accepted

Sort by
0
Oliver
Top achievements
Rank 1
answered on 11 Feb 2016, 10:38 AM

Hello again,

well, looks like it was a route problem, works now.

 

Thank you,

Oliver

0
T. Tsonev
Telerik team
answered on 11 Feb 2016, 12:46 PM
Hi,

Great to hear its working now. I think MVC will simply render a blank URL if the route info is not correct - not very helpful, really.

Sorry we couldn't get back to you earlier.

Regards,
T. Tsonev
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
Oliver
Top achievements
Rank 1
Answers by
Oliver
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or