New to Telerik UI for ASP.NET Core? Download free 30-day trial

ASP.NET Core Line Charts Remote Data Binding

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Telerik REPL
HtmlHelper
TagHelper
Files:
remote_data_binding.cshtml
Remote_Data_BindingController.cs
ElectricityProduction.cs
Remote_Data_Binding_TagHelper.cshtml
ChartDataRepository.cs

Also available for:

CLIENT-SIDE API HTML HELPER API

Description

The Telerik UI for ASP.NET Core Chart offers two ways of data-binding:

  • Server - the chart will bind to a supplied model
  • Ajax - the chart will perform Ajax requests to populate its series

For remote data binding you need to specify a remote endpoint or web service returning data in JSON/JSONP format and utilize the DataSource as a mediator between the chart and the underlying data. To make the connection to the remote endpoint and process the data properly, the data source needs information about the web service URL(s), the request type, the response data type, and the structure (schema) of the response, in case it is more complex than a plain array of objects.

In this example the chart fetches its data from a MVC controller assigned via the DataSource read configuration.

Additional Apps

This Line Charts example is part of unique collection of hundreds of ASP.NET Core demos, with which you can see all Telerik ASP.NET Core components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for ASP.NET Core or ThemeBuilder.

Support & Learning Resources

Additional Resources