【问题标题】:Highcharts DotNet: Would it be at all possible to label PlotlinesHighcharts DotNet:是否有可能标记情节线
【发布时间】:2013-05-09 15:35:38
【问题描述】:

我想知道是否有可能给 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
}

谢谢!如果问题有任何误解,请告诉我。

编辑
截图

【问题讨论】:

    标签: c# highcharts dotnethighcharts


    【解决方案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

    【讨论】:

      【解决方案2】:

      试试这个:

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

      【讨论】:

      • 感谢您的回复,但这并不是我想要的。那是 XAxis 上的标题,但我想要绘制线旁边的标题。我将更新屏幕截图。
      猜你喜欢
      • 1970-01-01
      • 2018-04-07
      • 1970-01-01
      • 2010-11-17
      • 1970-01-01
      • 2021-12-03
      • 2012-11-23
      • 2016-10-12
      • 1970-01-01
      相关资源
      最近更新 更多