ASP.NET MVC コントロールヘルプ
損益分岐点チャート
コントロールの使用 > FlexChart > FlexChartの使用 > 系列 > 損益分岐点チャート

Break-even chart series is a graphical representation between cost, sales volume and profits. It shows the sales volume level at which total costs equal sales and helps in making profit planning. You can use this chart in the scenarios where you want to determine at what point your company, or a new product or service, will be profitable or say, the number of products/services your company needs to sell to at least cover your costs.

In FlexChart, the BreakEven class represents the Break-Even chart series. This series can be added to FlexChart controls using the AddBreakEven method to show the evolution of profits over time, and how long it takes to reach the break-even point where revenues surpass expenses.

The following example shows how you can create a BreakEven chart using the FlexChart control. In the example, based on the given data, the break-even point is 10,000 units sold. At this point, sales revenue and total cost, both are at 1,200,000 and cancel each other out. Also, the profit area is beyond this point.

Break-Even Chart using the FlexGrid control

Add Controller

BreakEvenController
コードのコピー
public ActionResult Index()
{
     return View();
}

Add View for the Controller

Index.cshtml
コードのコピー
@(Html.C1().FlexChart()
    .Series(ser =>
    {
        ser.AddBreakEven().FixedCost(1000000).VariableCost(20).SalesPrice(120)
        .Style(style => style.Fill("rgba(127,42,250,0.5)").StrokeWidth(0))
        .AltStyle(style => style.Fill("rgba(255,0,0,0.5)").StrokeWidth(0))
        .Styles(s =>
            s.SafetyMargin(sm => sm.Fill("lightgreen").StrokeWidth(0))
             .SalesRevenue(sr => sr.Stroke("rgba(127,42,250,1)").StrokeWidth(3))
             .FixedCost(fc => fc.Stroke("grey").StrokeWidth(3))
             .TotalCost(tc => tc.Stroke("red").StrokeWidth(3))
             .VariableCost(vc => vc.Stroke("black").StrokeWidth(3))
             .MarginalProfit(mp => mp.Stroke("green").StrokeWidth(3))
             .BreakEven(be => be.Stroke("rgba(69,171,235,1)").StrokeWidth(3))
             );
    })
)