KRO Posted May 10, 2011 Report Posted May 10, 2011 Hello Is it possible to increase the area around the serie where the tooltip pops up?Is it possible to specify a margin where the cursor enter within that area triggers the serie tooltip?Our series are thin so it is very hard to hit the serie, to display the tooltip. It is not possible to increase the thickness of the serie because there are multible series and it would make it impossible to distinguish the series.We set the tooltip in code. localChart.AllSeries.ToolTips.ConnectedStyle = TooltipConnectedStyle.Closest;DataTemplate dTemplate = (DataTemplate) FindResource("RichContentToolTipWithDay");localChart.AllSeries.ToolTips.Template = dTemplate;<DataTemplate x:Key="RichContentToolTipWithDay"><Grid><Grid.ColumnDefinitions><ColumnDefinition Width="Auto" /></Grid.ColumnDefinitions><Grid.RowDefinitions><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /><RowDefinition Height="Auto" /></Grid.RowDefinitions><TextBlock Grid.Row="0" Grid.Column="0" x:Name="SeriesText" Text="{Binding Path=Content}"></TextBlock><TextBlock Grid.Row="1" Grid.Column="0" x:Name="DateText" Text="{Binding Path=DataItem.TimeStamp, Converter={StaticResource defaultToStringConverter}, ConverterParameter='\{0:dd/MM HH:mm\}'}" /><StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal"><TextBlock x:Name="ValText" Text="{Binding Path=DataItem.Value, Converter={StaticResource defaultToStringConverter}, ConverterParameter='\{0:0.00\}'}"/> </StackPanel></Grid></DataTemplate> Regards, KRO Quote
JuanC Posted May 13, 2011 Report Posted May 13, 2011 Which gallery type are you using? Are you using a specific motif/style? We do not have an API that would increase the tooltip area but this is something that could be achieved by providing your own gallery template that adds some trasparent shape around the visuals that represent the data. JuanC Quote
KRO Posted May 16, 2011 Author Report Posted May 16, 2011 Hi JuanC Thank you for your reply.We are using line serie as gallery type. Do you have an example of an custom gallery template? Yes we are using the, Motifs:Simple.ChartTemplate How can you make a shape around a serie? /KRO Quote
JuanC Posted May 18, 2011 Report Posted May 18, 2011 It would be something like this <cfx:Chart.AllSeries> <cfx:AllSeriesAttributes> <cfx:AllSeriesAttributes.Template> <DataTemplate> <Canvas> <PolylinePoints="{Binding Path=Points}"Stroke="Transparent" StrokeThickness="10"StrokeMiterLimit="1"/> <Polyline x:Name="points"Points="{Binding Path=Points}"Stroke="{Binding Path=Stroke}"StrokeThickness="{Binding Path=StrokeThickness}"StrokeDashArray="{Binding Path=StrokeDashArray}"Opacity="{Binding Path=Opacity}"StrokeMiterLimit="1"/> </Canvas> <DataTemplate.Triggers> <DataTriggerBinding="{Binding Path=Dimmed}"> <DataTrigger.Value> <sys:Boolean>True</sys:Boolean> </DataTrigger.Value> <SetterProperty="Opacity" Value="0.25"/> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </cfx:AllSeriesAttributes.Template> </cfx:AllSeriesAttributes> </cfx:Chart.AllSeries> This is a copy of our simple line template but I added a transparent PolyLine that increases the tooltip area of the line. JuanC Quote
KRO Posted May 19, 2011 Author Report Posted May 19, 2011 Hi Thanks a lot for the help. It worked perfectly. I moved the datatemplate to a separate resource and used it on my SeriesAttributes template. Regards, KRO Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.