2013-05-09 107 views
1

我想知道是否有可能如何标签PlotLines。直接标记线条或将项目添加到图例。我一直在试图找到一种方式,但还没有找到。Highcharts DotNet:是否可以标出Plotlines

new XAxisPlotLines 
{ 
    Value = upperspec, 
    Color = System.Drawing.Color.Red, 
    DashStyle = DotNet.Highcharts.Enums.DashStyles.ShortDash, 
    Width = 2, 
    Label = new XAxisLabels { Text = "Label Here" } // This does not work, but I want something with this functionality 
} 

谢谢!请让我知道,如果在这个问题上有任何误解。

编辑
截图 enter image description here

回答

0

试试这个:

Title = new XAxisTitle { Text = "Label here" }, 
... 
*PlotLines = new[] 
{ 
    new XAxisPlotLines 
    { 
     ... 
    } 
}* 
... 
+0

谢谢你的回复,但那不完全是我想要的。这是XAxis的标题,但我希望标题行旁边有一个标题。我将用屏幕截图更新。 – AustinT 2013-05-09 17:31:44

1

随着最新版本2.0 DotNet.Highcharts库有可能在地块线添加文本。 例如:

new YAxisPlotLines 
{ 
    Value = 932, 
    Color = Color.FromName("red"), 
    Width = 1, 
    Label = new YAxisPlotLinesLabel 
     { 
      Text = "Theoretical mean: 932", 
      Align = HorizontalAligns.Center, 
      Style = "color: 'gray'" 
     } 
} 

你也可以看到如何在示例项目中使用。从这里下载:http://dotnethighcharts.codeplex.com/releases

相关问题