@using C1.Web.Mvc.Chart

<div>
    <div class="copy">
        <h3>
            FlexChart ParametricFunctionSeries
        </h3>
        <p>
            This view shows Parametric Function Series in FlexChart.
        </p>
    </div>
    <div>
        <script type="text/javascript">
            var xParam = 5, yParam = 7;
            function xFunc(value) {
                return Math.cos(value * xParam);
            }
            function yFunc(value) {
                return Math.sin(value * yParam);
            }
        </script>
        @(Html.C1().FlexChart().Legend(Position.Right)
            .Series(ses => {
                ses.AddParametricFunctionSeries("ParametricFunctionSeries")
                    .Max(2 * Math.PI)
                    .SampleCount(1000)
                    .XFunc("xFunc")
                    .YFunc("yFunc");
            }))
    </div>
</div>