FlexChart
FlexChart
Plot Areas
This view shows the FlexChart with several plot areas.
Features
Description
This view shows the FlexChart with several plot areas.
1 2 3 4 5 6 7 8 9 10 11 12 13 | using MvcExplorer.Models; using System.Web.Mvc; namespace MvcExplorer.Controllers { public partial class FlexChartController : Controller { public ActionResult PlotAreas() { return View(AVDRelation.getGata(20)); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | @model IEnumerable< AVDRelation > @ (Html.C1().FlexChart().Id( "flexChart" ).ChartType(C1.Web.Mvc.Chart.ChartType.Area) .CssClass( "chart" ).Bind(Model).BindingX( "T" ) .AxisX(axis => axis.Title( "time, s" )) .Series(sers => { sers.Add().Binding( "A" ).Name( "acceleration" ); sers.Add().Binding( "V" ).Name( "velocity" ).AxisY(axis => axis.Position(C1.Web.Mvc.Chart.Position.Left).MajorGrid( true ).PlotAreaIndex(2)); sers.Add().Binding( "D" ).Name( "distance" ).AxisY(axis => axis.Position(C1.Web.Mvc.Chart.Position.Left).MajorGrid( true ).PlotAreaIndex(4)); }) .PlotAreas(plotareas=> { plotareas.Add().Style(style => style.Fill( "rgba(136,189,230,0.2)" )); plotareas.Add().Row(1).Height( "20px" ); plotareas.Add().Row(2).Style(style => style.Fill( "rgba(136,189,230,0.2)" )); plotareas.Add().Row(3).Height( "20px" ); plotareas.Add().Row(4).Style(style => style.Fill( "rgba(136,189,230,0.2)" )); }) ) @section Description{ @Html .Raw(Resources.FlexChart.PlotAreas_Text0) } |