Hi I tried to bind the ChartModifer to a property in the VM. But though it build successful, and there is no warning or errors when I run the application , but the ChartModifier does not work.
Here is my code
<sci:SciChartSurface Grid.Row="1"
YAxes="{sci:AxesBinding YAxes}"
XAxes="{sci:AxesBinding XAxes}"
RenderableSeries="{sci:SeriesBinding RenderableSeries}"
Background="{Binding ChartBackBrush}"
Foreground="{Binding ChartForeBrush}"
ViewportManager="{Binding ViewportManager}"
ChartModifier="{Binding ChartModifiers}">
</sci:SciChartSurface>
In ViewModel, I created all the child for the ChartModifiers. But it does not work.
ChartModifiers = new ObservableCollection<IChartModifier>();
//ModifierGroup.ChildModifiers
ChartModifiers.Add(rubberBandXyZoomModifier);
ChartModifiers.Add(new ZoomPanModifier()
{
ExecuteOn = ExecuteOn.MouseRightButton,
ClipModeX = SciChart.Charting.ClipMode.None
});
ChartModifiers.Add(new ZoomExtentsModifier());
ChartModifiers.Add(new MouseWheelZoomModifier());
rolloverModifer = new RolloverModifier()
{
ExecuteOn = ExecuteOn.MouseMove,
ShowTooltipOn = RolloverVisible
};
ChartModifiers.Add(rolloverModifer);
xAxisDrag = new XAxisDragModifier()
{
IsEnabled = true,
ClipModeX = SciChart.Charting.ClipMode.None,
DragMode = SciChart.Charting.AxisDragModes.Pan
};
yAxisDrag = new YAxisDragModifier()
{
IsEnabled = true,
DragMode = SciChart.Charting.AxisDragModes.Pan
};
ChartModifiers.Add(xAxisDrag);
ChartModifiers.Add(yAxisDrag);
- Chris Chen asked 4 years ago
-
Hi zhiyu, I asked you before to activate your SciChart license to receive tech support. Could you do this please? Else we will have to disregard questions you ask. Instructions are here: http://www.scichart.com/activating-scichart. Thank you!
-
I think, to get access to the ChartModifiers in your viewModel you have to bind your ObservableCollection to the ChildModifiers of the ModifierGroup.
- You must login to post comments