R2 2018 Release is here – now with modern UI for chatbots and more! See what’s new!
Change Theme

SASS Themes

    LESS Themes

      SASS Theme Builder

      Create new or customize SASS themes
      Launch Theme Builder

      Sparklines / Binding to local data

      Year Compensation costs Annual change % Direct Pay Benefit components
      2011
      2010
      2009
      2008
      2007
      2006
      2005
      2004
      2003
      2002
      2001
      2000
      1999
      1998
      1997

      Description

      The Telerik Core Area chart can be instructed to display data from local data storage using its built-in data-binding capabilities.

      There are two ways to bind the chart:

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

      In this example you can see how to bind the chart using the server approach. You need to create an action method and pass the CompensationData list located in the \Models\Chart\ChartDataRepository.cs file as a model. After that you should configure the data bound fields for the Series, i.e. .ValueAxis(axis => axis.Numeric().Max(50)). Note that the view has to be strongly typed so that the chart is able to load its data.

      ASP.NET Core source

      Also available for:

      • local_data_binding.cshtml
      • Local_Data_BindingController.cs
      • CompensationStats.cs
      • ChartDataRepository.cs

      Support & learning resources

      Sparklines for other technologies