使用 SciChart v5.1.0.11299,我试图以 TimeSpanAxis 作为 X 轴显示 VerticalLineAnnotations。我可以使用 NumericAxis 显示垂直线,但不能使用 TimeSpanAxis。
<s:SciChartSurface ChartTitle="Values vs Time">
<s:SciChartSurface.XAxis>
<s:TimeSpanAxis AxisTitle="Time">
<s:TimeSpanAxis.VisibleRange>
<s:TimeSpanRange Min="00" Max="00:10:00"/>
</s:TimeSpanAxis.VisibleRange>
</s:TimeSpanAxis>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisTitle="Values"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.Annotations>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="00:00:10"/>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="00:00:20"/>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="00:01:00"/>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="00:02:00"/>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="00:05:00"/>
</s:SciChartSurface.Annotations>
</s:SciChartSurface>
但是,作为 NumericAxis 的相应版本会呈现 VerticalLineAnnotations:
<s:SciChartSurface ChartTitle="Values vs Not Time">
<s:SciChartSurface.XAxis>
<s:NumericAxis AxisTitle="Not Time">
<s:NumericAxis.VisibleRange>
<s:DoubleRange Min="00" Max="1000"/>
</s:NumericAxis.VisibleRange>
</s:NumericAxis>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisTitle="Values"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.Annotations>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="0010"/>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="0020"/>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="0100"/>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="0200"/>
<s:VerticalLineAnnotation Stroke="Orange" StrokeThickness="1" X1="0500"/>
</s:SciChartSurface.Annotations>
</s:SciChartSurface>
这一定是可能的,但我找不到关于 NumericAxis 所需差异的示例?
提前致谢。