Toggle navigation Highcharts
  • About Us
    • About Us
    • Job Openings
    • Contact Us
    • News
    • Resellers
  • Home
  • Products
    • Highcharts
    • Highstock
    • Highmaps
    • Mobile
    • Highcharts Cloud
    • Highcharts Editor
    • Wrappers
    • Plugins
  • Demo
    • Highcharts demos
    • Highstock demos
    • Highmaps demo
  • Docs
    • General Documentation
    • API Reference
    • Changelog
    • Roadmap
  • Support
    • Support
    • Download
  • Blog
  • Community
    • Project Showcase
    • Chart Code Showcase
    • Contribute
  • Buy
  • About Us
    • About Us
    • Job Openings
    • Contact Us
    • News
    • Resellers
Highstock.NET 
  • Highcharts.NET
  • Highstock.NET
Demos 
  • Demos
  • API
  • Docs
  • See on NuGet
  • Download 
  • Demo
  • API
  • Docs
  • See on NuGet
  • Download 
Highstock.NET
 Highcharts  Highstock
  • GENERAL
    • Single line series
    • Two panes, candlestick and volume
    • Compare multiple series
    • 52,000 points with data grouping
    • 1,7 million points with async loading
    • Intraday Area
    • Intraday with breaks
    • Intraday Candlestick
    • Flags marking events
    • Dynamically Updated Data
  • CHART TYPES
    • Line with markers and shadow
    • Spline
    • Step line
    • Area
    • Area spline
    • Area range
    • Area spline range
    • Candlestick
    • OHLC
    • Column
    • Column range
    • Point markers only
  • VARIOUS FEATURES
    • Plot lines on Y axis
    • Plot bands on Y axis
    • Reversed Y axis
    • Styled scrollbar
    • Disabled scrollbar
    • Disabled navigator
  • FLAGS
    • Flags placement
    • Flags shapes and colors
list

Controller Code 
using Highsoft.Web.Mvc.Stocks;
using MVC_Demo.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;

namespace MVC_Demo.Areas.Highstock.Controllers.Shared
{
    public partial class SharedController : Controller
    {
        public ActionResult Area()
        {   
            List<AreaSeriesData> appleData = new List<AreaSeriesData>();

            using (var db = new HighstockDataEntities())
            {
                foreach (AppleData data in db.AppleDatas)
                {
                    appleData.Add(new AreaSeriesData
                    {
                        X = Convert.ToDouble(data.Date),
                        Y = Convert.ToDouble(data.Value)
                    });
                }
            }

            ViewBag.AppleData = appleData.OrderBy(o => o.X).ToList();

            return View(ViewBag);
        }       

    }
}
View Code 
@using Highsoft.Web.Mvc.Stocks

<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<script type="text/javascript">

    function formatYAxis() {
        return (this.value > 0 ? ' + ' : '') + this.value + '%';
    }

</script>

@(Html.Highsoft().Highstock(
        new Highstock
        {
            RangeSelector = new RangeSelector
            {
                Selected = 1
            },
            Title = new Title
            {
                Text = "Apple Stock Price"
            },
            Series = new List<Series>
            {
                new AreaSeries
                {
                   Data = ViewBag.AppleData as List<AreaSeriesData>,
                   Name = "Apple Stock Price",
                   TurboThreshold = 10000,
                   Tooltip = new AreaSeriesTooltip
                   {
                       ValueDecimals = 2
                   },
                   FillColor = @ViewBag.fillColor                   
                }
            }
        },
        "chart"
    )
)
© 2016 Highcharts. All rights reserved.