【问题标题】:Show the difference of two consecutive vertical chart lines between the two lines显示两条连续的垂直图表线在两条线之间的差异
【发布时间】:2018-07-13 08:06:42
【问题描述】:

我在 WPF 中使用了 SciChartSurface 对象。该图表显示了指定范围内的许多水平和垂直线。现在,我想在两条垂直线之间显示附加数据。要显示的数据是两行值的差值(附图中的红色标签)。

【问题讨论】:

    标签: scichart


    【解决方案1】:

    SciChart 中没有显示两行轴的内容,但是您可以使用 Annotations API 在图表本身的底部显示任何内容。

    考虑使用带有 CoordinateMode.RelativeY 的 TextAnnotation,并设置 Y1=0.0。还将 VerticalAnchorPoint.Bottom 设置为底部对齐。

    <s:SciChartSurface>
     .. 
        <s:SciChartSurface.Annotations>
            <s:TextAnnotation HorizontalAnchorPoint="Center" VerticalAnchorPoint="Bottom"
                              CoordinateMode="RelativeY" Y1="0.0"
                              X1="123.4" 
                              Text="{Binding Path=X1, RelativeSource={RelativeSource Self}}"
        </s:SciChartSurface.Annotations>
    </s:SciChartSurface>
    

    这将在图表底部的 X=123.4 处显示一个文本注释,以该值为中心。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-03
      • 2016-11-14
      • 2014-06-08
      相关资源
      最近更新 更多