@{
    var fitTypes = new[] { "Linear", "Exponential", "Logarithmic", "Power", "Fourier", "Polynomial", "MinX", "MinY", "MaxX", "MaxY", "AverageX", "AverageY" };
}

<h1>
    Trend Lines
</h1>
<p>
    The TrendLine class extends the regular Series class to provide
    a calculated series based on the data and parameters you
    select.
</p>
<p>
    To add trend lines to a chart, follow these steps:
</p>
<ol>
    <li>
        Create one or more TrendLine objects,
    </li>
    <li>
        Configure the TrendLine objects as you would a regular series,
        setting their <b>binding</b>, <b>chartType</b>, and <b>style</b>
        properties for example, and
    </li>
    <li>
        Set the TrendLine's <b>fitType</b> and <b>order</b> properties
        to determine the type of trend line you want to create.
    </li>
</ol>

<div class="demo-settings">
    <label for="fitType">Trendline Type: </label>
    @Html.C1().ComboBox().Id("fitType").Bind(fitTypes).IsRequired(false).Placeholder("None").Text("")
    <br />
    <label for="order">Order: </label>
    @Html.C1().InputNumber().Id("order").Value(2).Step(1).Min(1).Max(6).IsDisabled(true)
    <br />
    <label>Equation: </label>
    <div id="equation" class="equation"></div><br />
    <label for="btnRandomize">Randomize Data</label>
    <button id="btnRandomize" class="btn btn-default">
        Go
    </button>
</div>

@(Html.C1().FlexChart().Id("theChart")
    .ChartType(C1.Web.Mvc.Chart.ChartType.Scatter)
    .AxisY(y => y.AxisLine(true))
    .BindingX("x")
    .Series(sb => sb.Add().Binding("y").Name("Raw Data"))
)