FlexChart
FlexChart
ヘッダーとフッター
機能
サンプル
説明
チャートのヘッダーとフッター
このビューは、チャートにヘッダーとフッターを追加する方法を示します。
Header プロパティと Footer プロパティはコンテンツを決定し、 HeaderStyle プロパティと FooterStyle プロパティは ヘッダーとフッターの外観を決定します。
ソース
HeaderFooterController.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using MvcExplorer.Models; using C1.Web.Mvc; using C1.Web.Mvc.Serialization; namespace MvcExplorer.Controllers { public partial class FlexChartController : Controller { public ActionResult HeaderFooter() { return View(_apple.Sales); } } }
HeaderFooter.cshtml
@model IEnumerable<FruitSale> @(Html.C1().FlexChart().Bind("Date", Model) .ChartType(C1.Web.Mvc.Chart.ChartType.LineSymbols) .Series(sers => { sers.Add("Sales").Binding("SalesInChina"); }) .Header(Resources.FlexChart.HeaderFooter_Header).Footer(Resources.FlexChart.HeaderFooter_Footer).FooterStyle(hs => hs.Halign("right"))) @section Description{ <h3> @Html.Raw(Resources.FlexChart.HeaderFooter_ChartHeaderAndFooter) </h3> <p>@Html.Raw(Resources.FlexChart.HeaderFooter_Text0)</p> <p>@Html.Raw(Resources.FlexChart.HeaderFooter_Text1)</p> }
マニュアル