@Html.Highcharts4Net().SplineChart(settings =>
{
settings.Name = "SplineWithSymbols";
settings.SetTitle(s => { s.Text = "Monthly Average Temperature"; });
settings.SetTitle(s => { s.Text = "Source: WorldClimate.com"; });
settings.AddXAxis(s => { s.Categories = new[] {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; });
settings.AddYAxis(s =>
{
s.Title = new YAxisTitle
{
Text = "Temperature"
};
s.Labels = new YAxisLabels
{
Formatter = @"function () {
return this.value + '°';
}"
};
});
settings.SetTooltip(s =>
{
s.Crosshairs = new Crosshairs(true);
s.Shared = true;
});
settings.SetPlotOptions(s =>
{
s.Spline = new PlotOptionsSpline
{
Marker = new PlotOptionsSplineMarker
{
Radius = 4,
LineColor = "#666666",
LineWidth = 1
}
};
});
settings.AddSeries(s =>
{
s.Name = "Tokyo";
s.Marker = new PlotOptionsSplineMarker
{
Symbol = "square"
};
s.Data = new Data(new object[]
{
7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, new Point
{
Y = 26.5,
Marker = new PlotOptionsSeriesMarker
{
Symbol = "url(http://www.highcharts.com/demo/gfx/sun.png)"
}
},
23.3, 18.3, 13.9, 9.6
});
});
settings.AddSeries(s =>
{
s.Name = "London";
s.Marker = new PlotOptionsSplineMarker
{
Symbol = "diamond"
};
s.Data = new Data(new object[]
{
new Point
{
Y = 3.9,
Marker = new PlotOptionsSeriesMarker
{
Symbol = "url(http://www.highcharts.com/demo/gfx/snow.png)"
}
}, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8
});
});
}).Render()