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

<h1>
    Legend Series Toggle
</h1>

<p>
    Set the chart's <b>legendToggle</b> property to true to
    enable toggling the visibility of series when users
    click the chart legend:
</p>

<div class="demo-settings">
    <label for="legendToggle">Legend Toggle: </label>
    <input id="legendToggle" type="checkbox" checked="checked">
</div>

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