【问题标题】:Changing Legend in the Future of Dynamic Data Display wpf改变动态数据显示未来的图例 wpf
【发布时间】:2015-07-08 20:53:49
【问题描述】:

我一直在使用 Future d3,但不知道如何更改系列图例。在旧版本中,图例可以更改为:

    graf = plotter.AddLineGraph(new CompositeDataSource(xSrc, plot),
                 new Pen(brush, 4),
                 new PenDescription("myText" ));

但是这里对 AddLineGraph 的函数调用将一个对象作为参数,因此无法指定 pendescription... 请问有人知道怎么做吗?这个问题在here 之前被问过,但没有得到任何答案。任何帮助将不胜感激。我在这方面花了很多时间,不想仅仅因为这个小问题而改变到任何其他图书馆......

【问题讨论】:

    标签: wpf dynamic-data-display


    【解决方案1】:

    以上内容不适用于最近的 (2016) v0.4.0。

    v0.4.0 使用以下语法:

    // For access to the Legend class
    using Microsoft.Research.DynamicDataDisplay.Charts;
    
    ... snip ...
    LineGraph lineGraph = new LineGraph(dataSource);
    lineGraph.LinePen = new Pen(Brushed.Green, 1.0);
    Legend.SetDescription(lineGraph, "The line label");
    plotter.Children.Add(lineGraph);
    ... snip ...
    

    v0.3.0 使用以下语法:

    plotter.AddLineGraph(dataSource, pen, marker, new PenDescription("The line label"));
    

    参考:Changing and setting the Legend (LineGraph) Future of DynamicDataDisplay

    发布 http://d3future.codeplex.com/discussions/635917 提供了核心修复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多