Hi I am trying to apply custom Bubble Series Style through BubbleSeriesDefinition, using ItemStyle property. However, when I apply default (Blend generated) bubble template, bubble data points are not visible at all. The visual tree contains the series and the Bubble with my custom style however the bubble points are not visible on the chart area. I tried to apply the template declarative (XAML) as well as in code behind - no success.
My team and I are using WPF Telerik Controls Versioin 2011.1.419.35
XAML
My team and I are using WPF Telerik Controls Versioin 2011.1.419.35
XAML
<
UserControl
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
>
<
UserControl.Resources
>
<
Style
x:Key
=
"CustomBubbleStyle"
TargetType
=
"{x:Type telerik:Bubble}"
>
<
Setter
Property
=
"Diameter"
Value
=
"80"
/>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"{x:Type telerik:Bubble}"
>
<
Canvas
x:Name
=
"PART_MainContainer"
RenderTransformOrigin
=
"{TemplateBinding RelativeCenterPoint}"
>
<
Canvas.RenderTransform
>
<
ScaleTransform
ScaleY
=
"0"
ScaleX
=
"0"
/>
</
Canvas.RenderTransform
>
<
Path
x:Name
=
"PART_BubbleElement"
Fill
=
"Green"
Data
=
"{TemplateBinding ItemGeometry}"
/>
<
Path
Data
=
"M108.5,54.25C108.5,84.211448 84.211448,108.5 54.25,108.5 24.288552,108.5 0,84.211448 0,54.25 0,24.288552 24.288552,0 54.25,0 84.211448,0 108.5,24.288552 108.5,54.25z"
Height
=
"{TemplateBinding Diameter}"
Canvas.Left
=
"{TemplateBinding Left}"
Stretch
=
"Fill"
SnapsToDevicePixels
=
"True"
Stroke
=
"Transparent"
StrokeThickness
=
"0"
Canvas.Top
=
"{TemplateBinding Top}"
Width
=
"{TemplateBinding Diameter}"
>
<
Path.Fill
>
<
RadialGradientBrush
GradientOrigin
=
"0.5,0.5"
>
<
GradientStop
Color
=
"#66FFFFFF"
Offset
=
"0.86"
/>
<
GradientStop
Color
=
"Transparent"
Offset
=
"0.85"
/>
<
GradientStop
Color
=
"#26FFFFFF"
/>
</
RadialGradientBrush
>
</
Path.Fill
>
</
Path
>
</
Canvas
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
UserControl.Resources
>
<
telerik:RadChart
SnapsToDevicePixels
=
"True"
FontSize
=
"9"
Height
=
"200"
Width
=
"400"
ItemsSource
=
"{Binding Source={StaticResource SampleDataSource}, Path=Collection}"
>
<
telerik:RadChart.DefaultView
>
<
telerik:ChartDefaultView
>
<
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartArea
NoDataString
=
"Isufficient Information"
Style
=
"{StaticResource ChartAreaStyle}"
>
<
telerik:ChartArea.AxisY
>
<
telerik:AxisY
TextBlock.Foreground
=
"LightGray"
MinorTickPointMultiplier
=
"5"
ExtendDirection
=
"Up"
MajorGridLinesVisibility
=
"Visible"
MinorTicksVisibility
=
"Hidden"
DefaultLabelFormat
=
"0"
>
</
telerik:AxisY
>
</
telerik:ChartArea.AxisY
>
<
telerik:ChartArea.AxisX
>
<
telerik:AxisX
MinValue
=
"0"
TextBlock.Foreground
=
"LightGray"
IsZeroBased
=
"True"
LayoutMode
=
"Auto"
TextBlock.FontSize
=
"5"
MajorGridLinesVisibility
=
"Visible"
MinorTicksVisibility
=
"Hidden"
>
</
telerik:AxisX
>
</
telerik:ChartArea.AxisX
>
</
telerik:ChartArea
>
</
telerik:ChartDefaultView.ChartArea
>
</
telerik:ChartDefaultView
>
</
telerik:RadChart.DefaultView
>
<
telerik:RadChart.SeriesMappings
>
<
telerik:SeriesMapping
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:BubbleSeriesDefinition
BubbleSizeRelative
=
"False"
ItemStyle
=
"{StaticResource CustomBubbleStyle}"
/>
</
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:SeriesMapping.ItemMappings
>
<
telerik:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"XValue"
/>
<
telerik:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"YValue"
/>
<
telerik:ItemMapping
DataPointMember
=
"Label"
FieldName
=
"ID"
/>
</
telerik:SeriesMapping.ItemMappings
>
</
telerik:SeriesMapping
>
<!-- Regression Line -->
<
telerik:SeriesMapping
ItemsSource
=
"{Binding Source={StaticResource RegressionLine}, Path=Collection}"
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:LineSeriesDefinition
/>
</
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"Property1"
/>
<
telerik:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"Property2"
/>
</
telerik:SeriesMapping
>
</
telerik:RadChart.SeriesMappings
>
</
telerik:RadChart
>
</
UserControl
>