SeriesView.ToolTipPointPattern Property
In This Article
Gets or sets a string pattern that formats text in series point tooltips.
Namespace: DevExpress.WinUI.Charts
Assembly: DevExpress.WinUI.Charts.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
[DP("{A}: {V}", Handler = "UpdateActualStyleSettings")]
public string ToolTipPointPattern { get; set; }
#Property Value
Type | Description |
---|---|
String | A string that specifies the tooltip pattern. |
#Remarks
Patterns can comprise plain text and placeholders with specifiers that format numeric and date-time values (for example, “Value: {V:F0}”). The following table lists available placeholders:
Pattern | Description |
---|---|
{A} | Displays a series point argument. |
{V} | Displays series point values. |
{VP} | Displays series point values as percentages (for a Pie series). |
{S} | Displays the name of the series. The series name should be specified. |
Note: In XAML, insert empty brackets at the beginning of a pattern if it starts with a placeholder. For more information, refer to Escape Sequence
#Example
This example customizes the appearance and content of tooltips that are shown when a user clicks a bar.
<Page.Resources>
<ResourceDictionary>
<DataTemplate
x:Key="toolTipTemplate">
<Grid x:Name="Tooltip"
HorizontalAlignment="Center"
VerticalAlignment="Center"
UseLayoutRounding="True">
<Grid x:Name="Shadow"
Margin="0,4,0,-4"
Opacity="0.1">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="12" />
</Grid.RowDefinitions>
<Path x:Name="Arrow"
Stretch="Fill"
Fill="Black"
Data="F1 M 461,303L 474,316L 487,303L 461,303 Z "
HorizontalAlignment="Center"
Height="13"
Grid.Row="1"
Width="26"
Margin="0,-1,0,0" />
<Border x:Name="ContentBack"
Background="Black" />
</Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="12" />
</Grid.RowDefinitions>
<Path x:Name="Arrow1"
Stretch="Fill"
Fill="Gray"
Data="F1 M 461,303L 474,316L 487,303L 461,303 Z "
HorizontalAlignment="Center"
Height="13"
Grid.Row="1"
Width="26"
Margin="0,-1,0,0" />
<Border x:Name="ContentBack1"
Background="Gray" />
<TextBlock x:Name="Content1"
TextWrapping="Wrap"
Text="{Binding ToolTipText}"
Margin="10, 7.5, 10, 9"
FontSize="16"
Foreground="White" />
</Grid>
</Grid>
</DataTemplate>
</ResourceDictionary>
</Page.Resources>
<Grid>
<Charts:CartesianChart ToolTipEnabled="True">
<Charts:CartesianChart.Series>
<Charts:Series>
<Charts:Series.View>
<Charts:BarSeriesView
ToolTipPointPattern="{}{A}:{V:f2}"
ToolTipPointTemplate="{StaticResource toolTipTemplate}"/>
</Charts:Series.View>
<!-...-->
</Charts:Series>
</Charts:CartesianChart.Series>
</Charts:CartesianChart>
</Grid>
See Also