Formatting tooltips

This post has 4 Replies | 2 Followers

ayuda
Points 110
Replied On: Mon, Dec 15 2008 11:44 AM

Hi,

I want to change the font size of my tooltip, they are really small for some reason, how would I do that?

Is it possible to apply some kind of template so I can had images in the tooltips as well?

 Thanks,

 Pyt

  • Post Points: 20
Replied On: Fri, Dec 19 2008 7:47 AM

You can specify tooltips with:

<igCA:XamChart Name="xamChart1">

<igCA:XamChart.Series>

<igCA:Series ChartType="Column">

<igCA:Series.DataPoints>

<igCA:DataPoint Value="20">

<igCA:DataPoint.ToolTip>

<TextBlock Text="Tooltip" FontSize="40"/>

</igCA:DataPoint.ToolTip>

</igCA:DataPoint>

<igCA:DataPoint Value="30">

<igCA:DataPoint.ToolTip>

<Image Source="image.png" />

</igCA:DataPoint.ToolTip>

</igCA:DataPoint>

<igCA:DataPoint Value="15" Fill="White" />

</igCA:Series.DataPoints>

</igCA:Series>

</igCA:XamChart.Series>

</igCA:XamChart>

Best regards, Teodor Taushanov

  • Post Points: 20
ayuda
Points 110
Replied On: Fri, Dec 19 2008 10:52 AM

Is there a way to apply a global template to all tooltips? I get my datapoints from a data source and I don't understand how I would apply the tooltip formatting to every single one of them.

  • Post Points: 20
Replied On: Sat, Dec 20 2008 4:31 AM

In this case you can use:

<Grid.Resources>

<Style TargetType="ToolTip">

<Setter Property="FontSize" Value="40" />

<Setter Property="Template">

<Setter.Value>

<ControlTemplate TargetType="ToolTip">

<Border BorderBrush="Black" BorderThickness="2">

<ContentPresenter Content="{TemplateBinding Content}" />

</Border>

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

</Grid.Resources>

<igCA:XamChart Name="xamChart1">

...

Best regards, Teodor Taushanov

  • Post Points: 20
Christian Sandoy
Points 2,290
Replied On: Tue, Oct 11 2011 4:08 AM

How do you change the font size of tooltip in code?

 

 

For

 

 

M As Integer = 1 To 12
series.DataPoints.Add(
New DataPoint() With {.Label = Maaned(M), .Value = Data_Fravær(i, M), ToolTip = String.Format("{0:N2}", Data_Fravær(i, M))})
Next

  • Post Points: 5
Page 1 of 1 (5 items) | RSS