When setting the sync channel across charts, for some reason every chart but the targeted chart begin zooming in and out on mouse-scroll.
How do you prevent this? It has to be some sort of bug.
Hello Mark,
Thank you for your post.
I have been looking into it. I created a sample application based on your scenario and I could not managed to reproduce the behavior that you have described. In the sample I created two XamDataChart and synchronized them in one Channel Vertically and Horizontally by setting SyncSettings and using SynchronizeVertically and SynchronizeHorizontally properties of Synchronization in XamDataChart. You can read more details about it from our online documentation from this link: http://help.infragistics.com/doc/WPF/2014.2/CLR4.0/?page=DataChart_Chart_Synchronization.html Please let me know if I am missing something from your scenario.
If you are not able to reproduce the issue with the attached sample application, would you please modify it with the functionality, that you are using, so it reproduces the issue. This way I would be able to further investigate this for you and provide you with more detailed information on this matter.
Looking forward to hearing from you.
Thanks for the reply.
Modify your chart xaml as follows and you will see the bug. Essentially, our end users only want the ability to show crosshairs to line up data points and that's all. Zooming is very cumbersome as we have many charts on screen (think dashboard).
<igChart:XamDataChart x:Name="dataChart"
Grid.Column="0" HorizontalZoomable="False" VerticalZoomable="False" CrosshairVisibility="Visible" >
Mark,
Could you clarify why you are setting sync channel if you don't want the chart's to zoom? Are you using it solely to sync the crosshairs or the annotation layers?
-Graham
Ultimately, i want the ability to sync cross hairs and preferably show tooltips on each chart. Zooming must be off because we are using the mouse-scroll wheel for other functionality thus it mus be disabled.
Attached is a screenshot of the desired result.
Bottom line, if you use the original code sample you provided, disable horizontal and vertical zooming (as per my first response), you will encounter the bug where if you focus one of the two charts, use your mouse-wheel to zoom, the other chart does this odd zooming in and out. Zooming is never fully disabled.
Per the code sample in the other thread: http://ko.infragistics.com/community/forums/t/95695.aspx attached is the best I can come up with regarding the desired result.
<UserControl.Resources> <ResourceDictionary> <StackPanel TextBlock.FontSize="10" TextBlock.FontWeight="Normal" x:Key="Tooltip"> <StackPanel Orientation="Horizontal"> <TextBlock MinWidth="50" Text="Pnl" Margin="0,0,4,0" FontWeight="Bold"/> <TextBlock Text="{Binding Item.CumulativePnl, StringFormat={}{0:0,,.00;-0,,.00;0}}" /> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock MinWidth="50" Text="Industry" Margin="0,0,4,0" FontWeight="Bold"/> <TextBlock Text="{Binding Item.CumulativePnlIndustry, StringFormat={}{0:0,,.00;-0,,.00;0}}" /> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock MinWidth="50" Text="Market" Margin="0,0,4,0" FontWeight="Bold"/> <TextBlock Text="{Binding Item.CumulativePnlMarket, StringFormat={}{0:0,,.00;-0,,.00;0}}" /> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock MinWidth="50" Text="Style" Margin="0,0,4,0" FontWeight="Bold"/> <TextBlock Text="{Binding Item.CumulativePnlStyle, StringFormat={}{0:0,,.00;-0,,.00;0}}" /> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock MinWidth="50" Text="Alpha" Margin="0,0,4,0" FontWeight="Bold"/> <TextBlock Text="{Binding Item.CumulativePnlBarraAlpha, StringFormat={}{0:0,,.00;-0,,.00;0}}" /> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock MinWidth="50" Text="Alpha+" Margin="0,0,4,0" FontWeight="Bold"/> <TextBlock Text="{Binding Item.CumulativePnlBarraAlphaPlus, StringFormat={}{0:0,,.00;-0,,.00;0}}" /> </StackPanel> <TextBlock Text="{Binding Item.TradeDate, StringFormat='MM-dd-yyyy'}" /> </StackPanel> </ResourceDictionary> </UserControl.Resources>
<HeaderedContentControl HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Style="{StaticResource Tile}" > <HeaderedContentControl.Header> <StackPanel HorizontalAlignment="Center"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <TextBlock Text="{Binding Display}" TextTrimming="CharacterEllipsis" MaxWidth="150" Style="{StaticResource TileHeader}" /> <TextBlock Text=" vs. Barra Benchmark" Style="{StaticResource TileHeader}" /> </StackPanel> <ig:Legend x:Name="Legend1" Orientation="Horizontal" HorizontalAlignment="Center"/> </StackPanel> </HeaderedContentControl.Header>
<Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions>
<ig:XamDataChart Margin="2,2,50,0" ToolTipStyle="{DynamicResource ToolTipStyle}" Legend="{Binding ElementName=Legend1}" HorizontalZoomable="True" VerticalZoomable="True" ig:SyncManager.SyncSettings="{StaticResource SYNCChannel}" CrosshairVisibility="{Binding Source={x:Static Models:Settings.Current}, Path=ShowCrosshairs, Converter={StaticResource BTV}}" CrosshairLineStyle="{DynamicResource ABCrosshairLineStyle}" > <ig:XamDataChart.Axes> <!--<ig:CategoryDateTimeXAxis MinimumValue="{Binding Filters.StartDate}" MaximumValue="{Binding Filters.EndDate}" DateTimeMemberPath="TradeDate" x:Name="XAxis2" ItemsSource="{Binding PositionTimeseries}" Label="{}{TradeDate:dd MMM}" />--> <ig:CategoryXAxis x:Name="XAxis2" ItemsSource="{Binding PositionTimeseries}" Label="{}{TradeDate:M/d/yy}" LabelSettings="{DynamicResource LabelSettingsBottom}"/> <ig:NumericYAxis x:Name="YAxis2" Label="{}{0:0,,.00;-0,,.00;0}" Title="(MM)" LabelSettings="{DynamicResource LabelSettingsLeft}"/> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <ig:AreaSeries ToolTip="{StaticResource Tooltip}" LegendItemTemplate="{DynamicResource CenteredLegendItemTemplate}" IsHighlightingEnabled="False" XAxis="{Binding ElementName=XAxis2}" YAxis="{Binding ElementName=YAxis2}" ItemsSource="{Binding PositionTimeseries}" Title="PnL" ValueMemberPath="CumulativePnl" Brush="{DynamicResource Risk_PnLTotalArea}" Outline="#CECECE" Thickness="1" BorderThickness="1" UnknownValuePlotting="LinearInterpolate" /> <ig:ValueOverlay Axis="{Binding ElementName=YAxis2}" Style="{DynamicResource ZeroValueOveraly}" /> <ig:LineSeries ToolTip="{StaticResource Tooltip}" LegendItemTemplate="{DynamicResource CenteredLegendItemTemplate}" XAxis="{Binding ElementName=XAxis2}" YAxis="{Binding ElementName=YAxis2}" ItemsSource="{Binding PositionTimeseries}" Title="Industry" ValueMemberPath="CumulativePnlIndustry" MarkerType="None" Brush="{DynamicResource Risk_PnLIndustryLine}" UnknownValuePlotting="LinearInterpolate" /> <ig:LineSeries ToolTip="{StaticResource Tooltip}" LegendItemTemplate="{DynamicResource CenteredLegendItemTemplate}" XAxis="{Binding ElementName=XAxis2}" YAxis="{Binding ElementName=YAxis2}" ItemsSource="{Binding PositionTimeseries}" Title="Market" ValueMemberPath="CumulativePnlMarket" MarkerType="None" Brush="{DynamicResource Risk_PnLMarketLine}" UnknownValuePlotting="LinearInterpolate" /> <ig:LineSeries ToolTip="{StaticResource Tooltip}" LegendItemTemplate="{DynamicResource CenteredLegendItemTemplate}" XAxis="{Binding ElementName=XAxis2}" YAxis="{Binding ElementName=YAxis2}" ItemsSource="{Binding PositionTimeseries}" Title="Style" ValueMemberPath="CumulativePnlStyle" MarkerType="None" Brush="{DynamicResource Risk_PnLStyleLine}" UnknownValuePlotting="LinearInterpolate" /> <ig:LineSeries ToolTip="{StaticResource Tooltip}" LegendItemTemplate="{DynamicResource CenteredLegendItemTemplate}" XAxis="{Binding ElementName=XAxis2}" YAxis="{Binding ElementName=YAxis2}" ItemsSource="{Binding PositionTimeseries}" Title="Alpha" ValueMemberPath="CumulativePnlBarraAlpha" MarkerType="None" Brush="{DynamicResource Risk_PnlAlphaLine}" UnknownValuePlotting="LinearInterpolate" /> <ig:LineSeries ToolTip="{StaticResource Tooltip}" LegendItemTemplate="{DynamicResource CenteredLegendItemTemplate}" XAxis="{Binding ElementName=XAxis2}" YAxis="{Binding ElementName=YAxis2}" ItemsSource="{Binding PositionTimeseries}" Title="Alpha+" ValueMemberPath="CumulativePnlBarraAlphaPlus" MarkerType="None" Brush="{DynamicResource Risk_PnlAlphaPlusLine}" DashArray="1,1" UnknownValuePlotting="LinearInterpolate"> <ig:LineSeries.LegendItemBadgeTemplate> <DataTemplate> <Line X1="0" Y1="0" X2="18" Y2="0" Stroke="{DynamicResource Risk_PnlAlphaPlusLine}" StrokeThickness="2" Margin="0,0,4,0" SnapsToDevicePixels="True" StrokeDashArray="1, 1" /> </DataTemplate> </ig:LineSeries.LegendItemBadgeTemplate> </ig:LineSeries> <ig:CrosshairLayer HorizontalLineVisibility="Collapsed" /> <ig:ItemToolTipLayer UseInterpolation="True" /> </ig:XamDataChart.Series> </ig:XamDataChart>
<Border HorizontalAlignment="Center" Grid.Row="1" Opacity=".7" Margin="-4,0,0,8"> <DockPanel TextBlock.FontSize="9" > <TextBlock Text="Pnl: " DockPanel.Dock="Left" FontWeight="Bold" /> <TextBlock Text="{Binding LastPosition.CumulativePnl, StringFormat={}{0:0,,.00;(0,,.00);0}}" DockPanel.Dock="Left" Behaviors:TextBlockBehaviors.RedIfNegative="True"/> <TextBlock Text=" Industry: " DockPanel.Dock="Left" FontWeight="Bold"/> <TextBlock Text="{Binding LastPosition.CumulativePnlIndustry, StringFormat={}{0:0,,.00;(0,,.00);0}}" DockPanel.Dock="Left" Behaviors:TextBlockBehaviors.RedIfNegative="True"/> <TextBlock Text=" Market: " DockPanel.Dock="Left" FontWeight="Bold"/> <TextBlock Text="{Binding LastPosition.CumulativePnlMarket, StringFormat={}{0:0,,.00;(0,,.00);0}}" DockPanel.Dock="Left" Behaviors:TextBlockBehaviors.RedIfNegative="True"/> <TextBlock Text=" Style: " DockPanel.Dock="Left" FontWeight="Bold"/> <TextBlock Text="{Binding LastPosition.CumulativePnlStyle, StringFormat={}{0:0,,.00;(0,,.00);0}}" DockPanel.Dock="Left" Behaviors:TextBlockBehaviors.RedIfNegative="True"/> <TextBlock Text=" Alpha: " DockPanel.Dock="Left" FontWeight="Bold"/> <TextBlock Text="{Binding LastPosition.CumulativePnlBarraAlpha, StringFormat={}{0:0,,.00;(0,,.00);0}}" DockPanel.Dock="Left" Behaviors:TextBlockBehaviors.RedIfNegative="True"/> <TextBlock Text=" Alpha+: " DockPanel.Dock="Left" FontWeight="Bold"/> <TextBlock Text="{Binding LastPosition.CumulativePnlBarraAlphaPlus, StringFormat={}{0:0,,.00;(0,,.00);0}}" DockPanel.Dock="Left" Behaviors:TextBlockBehaviors.RedIfNegative="True"/> </DockPanel> </Border>
</Grid>
</HeaderedContentControl>
FWIW: If i handle the PreviewMouseWheel event, at least I can stop the bug.
Hello,
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account\My Keys and Downloads.
Thank you for your posts.
I have logged the behavior for zooming with our developers in our tracking system, with an issue ID of 192270. I have also created a support ticket on your behalf with number CAS-153628-D1D1H5 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download. Please let me know if you require any further assistance on the matter.
Ha!
That being said, on to the second part.
My users wanted a consolidated tooltip so I created a tooltip resource and each series references this tooltip. Looks Great (see my first pickture). Once I drop in the ItemToolTipLayer however; it appears that the last series in the collection gets my custom aggregate tooltip but all the others are showing the default tooltip container.
Is there anyway to prevent this?
lol, I think you slipped that one in as I was typing!