@using LearnMvcClient.Models
@model IEnumerable<FlexChartData.Sale>

<h1>
    FlexChart ItemFormatter
</h1>

<p>
    The FlexChart's <b>itemFormatter</b> property allows you
    to specify a callback invoked when chart items are rendered.
    The callback may customize the item or add new ones using the
    chart engine's properties and methods.
</p>
<p>
    In this example, the <b>itemFormatter</b> is used to
    add line segments over periods when the data is
    increasing:
</p>

@(Html.C1().FlexChart<FlexChartData.Sale>().Id("theChart")
    .Bind("Country", Model)
    .Series(sb =>
    {
        sb.Add().Binding("Sales").Name("Sales");
        sb.Add().Binding("Expenses").Name("Expenses");
        sb.Add().Binding("Downloads").Name("Downloads").ChartType(C1.Web.Mvc.Chart.ChartType.Line);
    })
)