我在scichart dll的StackedColumnRenderableSeries
呈现方面遇到了一些问题。我在这样的UserControl中有两个系列的图表。
<s:SciChartSurface Grid.Row="0"
s:ThemeManager.Theme="{Binding SciChartTheme}"
BorderThickness="0"
VerticalAlignment="Stretch"
Margin="3"
ChartTitle="{Binding TitleBar}"
ViewportManager="{Binding ViewportManager}"
MouseLeftButtonUp="SciChartSurfaceMouseLeftButtonUp">
<s:SciChartSurface.XAxis>
<s:NumericAxis AxisTitle="x-Axis" DrawMajorBands="False" GrowBy="0.05, 0.05"/>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis GrowBy="0, 0.1" VisibleRange="0, 1.1" VisibleRangeLimit="0, 1.1" AxisTitle="y-Axis" AxisAlignment="Left"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.RenderableSeries>
<s:StackedColumnRenderableSeries DataPointWidth="0.8" Fill="#831414" Stroke="Transparent" DataSeries="{Binding BarData2, Mode=OneWay}" StackedGroupId="MV"/>
<s:StackedColumnRenderableSeries DataPointWidth="0.8" Fill="#2f98d4" Stroke="Transparent" DataSeries="{Binding BarData1, Mode=OneWay}" StackedGroupId="OI"/>
</s:SciChartSurface.RenderableSeries>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:RubberBandXyZoomModifier/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
我的ViewModel包含如下系列:
public IDataSeries<double, double> BarData1 { get { return _BarData1; } set { _BarData1 = value; OnPropertyChanged(); } }
public IDataSeries<double, double> BarData2 { get { return _BarData2; } set { _BarData2 = value; OnPropertyChanged(); } }
我这样向他们添加数据:
BarData1 = new XyDataSeries<double, double>(_XGridVector.Length) { SeriesName = name1 };
dSLocal.InsertRange(0, _XGridVector, _DataVector1);
BarData2 = new XyDataSeries<double, double>(_XGridVector.Length) { SeriesName = name1 };
dSLocal.InsertRange(0, _XGridVector, _DataVector2);
当我现在向它们添加一些数据点时,一切工作都按预期进行,但是如果我开始向它们添加几千个(比如说2000个)值,则条形图会变得很小,以至于它们只会在UI中消失。如果我放大,它们会在某个时候重新出现。
Zoomed in until the bars show up again
当我放大(动画)时,这些条形会周期性地重新闪烁,并以闪烁的方式消失(200ms缩放内的几个tiems),然后在缩放完成时再次消失。
我该怎么做才能正确渲染系列?
谢谢