dotnet Highcharts 3D Scatter Plot

时间:2016-10-14 06:35:41

标签: highcharts dotnethighcharts

我正在使用Codeplex提供的dotnet库在asp.net网络表单上绘制Highcharts图。虽然我成功地绘制了几种类型的图表,但我很难绘制三维散点图。它具有一些通过跟踪鼠标旋转绘图的附加功能。

之前有人在.Net平台上尝试过这个3D散点图吗?你如何使用无法放在var chart = new Highcharts.Chart(...)块中的js代码?

1 个答案:

答案 0 :(得分:0)

在项目网站上a package with samples。在这些演示中,您可以找到3d列。在编辑它的代码以更改系列类型和数据格式后,我得到了一个可用的三维散点图。我使用的代码:

SELECT TOP(1) VhrNum, *
FROM Average
WHERE EmptyOrNot = 1
ORDER BY VhrNum ASC

该项目的public ActionResult ThreeDColumn() { Highcharts chart = new Highcharts("chart") .InitChart(new Chart { Type = ChartTypes.Scatter, Margin = new[] { 75 }, Options3d = new ChartOptions3d { Enabled = true, Alpha = 15, Beta = 15, Depth = 50, ViewDistance = 25 } }) .SetTitle(new Title { Text = "Chart rotation demo" }) .SetSubtitle(new Subtitle { Text = "Test options by dragging the sliders below" }) .SetLegend(new Legend { Enabled = false }) .SetSeries(new Series { Data = new Data(new object[,] { { 0, 0, 0 }, { 1, 1, 1 }, { 2, 2, 2 } }) }); return View(chart); } 目录中的文件为DemoController.cs

如果您需要在Highcharts演示页面中创建相同的Highcharts图表,您可能会遇到一些问题。 DotNet.Highcharts中的代码是从2014年开始的,并在旧的Highcharts版本上运行。较新的代码用于不相关的official Highcharts product且仍在开发中http://dotnet.highcharts.com/,因此您可以尝试使用。

相关问题