ComponentOne
Web API Explorer ASP.NET Web API Explorer

Wijmo5FlexChart

YFunctionSeries

This sample demonstrates how to export a Wijmo 5 FlexChart YFunctionSeries to image file.

Features

YFunctionSeries-10-8-6-4-20246810-0.5000.50

Settings

Export
Export Format : Height :
Width :
Export Name :

Description

This sample demonstrates how to export a Wijmo 5 FlexChart YFunctionSeries to image file.
1
2
3
4
5
6
7
8
9
10
11
12
13
using System.Web.Mvc;
 
namespace WebApiExplorer.Controllers
{
    public partial class Wijmo5FlexChartController : Controller
    {
        public ActionResult YFunctionSeries()
        {
            ViewBag.Options = _flexChartModel;
            return View();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@using C1.Web.Mvc.Chart
@{
    ImageExportOptions optionsModel = ViewBag.Options;
    ViewBag.DemoSettings = true;
}
 
<script type="text/javascript">
function yFunc(value) {
    return Math.sin(4 * value) * Math.cos(3 * value);
}
</script>
@(Html.C1().FlexChart().Legend(Position.Right).Id(optionsModel.ControlId).Height(300)
.Series(ses =>
{
    ses.AddYFunctionSeries("YFunctionSeries").Min(-10).Max(10).SampleCount(300).Func("yFunc");
}))
 
@section Settings{
    @Html.Partial("_ImageExportOptions", optionsModel)
}
 
@section Description{
    @Html.Raw(Resources.Wijmo5FlexChart.YFunctionSeries_Text0)
}