@using LearnMvcClient.Models

@{ 
    IEnumerable<FlexChartData.Point> points1 = ViewBag.Points1;
    IEnumerable<FlexChartData.Point> points2 = ViewBag.Points2;
    IEnumerable<FlexChartData.Point> points3 = ViewBag.Points3;
}

<h1>
    Data Sources
</h1>
<p>
    The FlexChart's <b>itemsSource</b> and <b>bindingX</b>
    properties apply to all series in the chart by default.
</p>
<p>
    Specific series may override those properties and use
    different data sources and bindings. This allows you to
    use multiple data sources on the same chart, and reduces
    the need to pre-process data for charting.
</p>
<p>
    This demo creates several data sets and plots each one
    as a different series:
</p>

<div class="demo-settings">
    <label for="axisOrigin">Set Axis Origin to Zero</label>
    <input id="axisOrigin" type="checkbox">
</div>

@(Html.C1().FlexChart().Id("theChart")
    .ChartType(C1.Web.Mvc.Chart.ChartType.Scatter)
    .AxisY(a=>a.AxisLine(true))
    .Series(sb=>
    {
        sb.Add().Bind("X", "Y", points1).Name("Experiment 1");
        sb.Add().Bind("X", "Y", points2).Name("Experiment 2");
        sb.Add().Bind("X", "Y", points3).Name("Experiment 3");
    })
)