@using Highsoft.Web.Mvc.Stocks
@using Highsoft.Web.Mvc.Stocks.Rendering
<script src="https://code.highcharts.com/stock/highstock.js"></script>
@*The highchart-more.js file contains definitions for additional chart types not available
in the main highcharts.js file such as "arearange". You need to include this file if you
are using these types of charts*@
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
@{ var chartOptions =
new Highstock
{
Chart = new Highsoft.Web.Mvc.Stocks.Chart
{
Type = ChartType.Areasplinerange
},
RangeSelector = new RangeSelector
{
Selected = 2
},
Title = new Title
{
Text = "Temperature variation by day"
},
Series = new List<Series>
{
new AreasplinerangeSeries
{
Data = ViewBag.AppleData as List<AreasplinerangeSeriesData>,
Name = "Temperatures",
TurboThreshold = 10000,
Tooltip = new AreasplinerangeSeriesTooltip
{
ValueSuffix = "°C"
}
}
},
Navigator = new Navigator()
{
Series = new LineSeries()
{
Data = ViewBag.NavigatorData as List<LineSeriesData>
}
}
};
chartOptions.ID = "chart";
var renderer = new HighstockRenderer(chartOptions);
}
@Html.Raw(renderer.RenderHtml())