FlexChart
FlexChart
Remote Data Bind
This view shows how to bind FlexChart to a remote data.
Features
Description
This view shows how to bind FlexChart to a remote data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using MvcExplorer.Models; using C1.Web.Mvc; using C1.Web.Mvc.Serialization; namespace MvcExplorer.Controllers { public partial class FlexChartController : Controller { public ActionResult RemoteBind() { return View(); } public ActionResult RemoteBind_Read(CollectionViewRequest<CustomerOrder> requestData) { return this .C1Json(CollectionViewHelper.Read(requestData, CustomerOrder.GetCountryGroupOrderData())); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 | @ (Html.C1().FlexChart().Header( "Sales ( remote data )" ) .Bind( "Country" , Url.Action( "RemoteBind_Read" )) .Series(series => { series.Add().Binding( "Count" ).Name( "Count" ); series.Add().Binding( "Price" ).Name( "Price" ); }) .LegendToggle( true ) ) @section Description{ @Html .Raw(Resources.FlexChart.RemoteBind_Text0) } |