Jump to content
Software FX Community

Serie tooltip sensitivity


KRO
 Share

Recommended Posts

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

It would be something like this



<cfx:Chart.AllSeries>

  <cfx:AllSeriesAttributes>

  <cfx:AllSeriesAttributes.Template>

  <DataTemplate>

  <Canvas>

  <Polyline
Points="{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>

  <DataTrigger
Binding="{Binding Path=Dimmed}">

  <DataTrigger.Value>

  <sys:Boolean>True</sys:Boolean>

  </DataTrigger.Value>

  <Setter
Property="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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...