This question is locked. New answers and comments are not allowed.
Hello,
I have a small problem left on a bar chart. The 2D bar chart is working fine exept is is not using it's full height potentional.
(version Q2 2011)
See attached image.
XAML
VB code
How can I let the bar char use it's full height?
Regards,
Erik
I have a small problem left on a bar chart. The 2D bar chart is working fine exept is is not using it's full height potentional.
(version Q2 2011)
See attached image.
XAML
<
telerik:RadChart
x:Name
=
"xxxxxxxxxx"
Margin
=
"0,0,1,14"
HorizontalAlignment
=
"Left"
HorizontalContentAlignment
=
"Left"
VerticalAlignment
=
"Top"
VerticalContentAlignment
=
"Top"
Width
=
"165"
BorderBrush
=
"Black"
Background
=
"Black"
Height
=
"132"
>
<
telerik:RadChart.Resources
>
<
Style
x:Key
=
"AxisXStyle"
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Foreground"
Value
=
"WhiteSmoke"
/>
<
Setter
Property
=
"FontSize"
Value
=
"9"
/>
<
Setter
Property
=
"Height"
Value
=
"15"
/>
<
Setter
Property
=
"VerticalAlignment"
Value
=
"Top"
/>
</
Style
>
<
Style
x:Key
=
"AxisXLineStyle"
TargetType
=
"Line"
>
<
Setter
Property
=
"Stroke"
Value
=
"Silver"
/>
<
Setter
Property
=
"Margin"
Value
=
"0,6,0,0"
/>
</
Style
>
<
Style
x:Key
=
"LegendItemStyle"
TargetType
=
"telerik:ChartLegendItem"
>
<
Setter
Property
=
"Foreground"
Value
=
"WhiteSmoke"
/>
<
Setter
Property
=
"FontSize"
Value
=
"8"
/>
<
Setter
Property
=
"MarkerShape"
Value
=
"Square"
/>
</
Style
>
<
Style
x:Key
=
"TopItemLabelStyle"
TargetType
=
"telerik:SeriesItemLabel"
>
<
Setter
Property
=
"FontSize"
Value
=
"7"
/>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
<
Setter
Property
=
"Fill"
Value
=
"Black"
/>
</
Style
>
<
Style
x:Key
=
"TopItemLabelStyle_XX"
TargetType
=
"telerik:SeriesItemLabel"
>
<
Setter
Property
=
"FontSize"
Value
=
"7"
/>
<
Setter
Property
=
"Background"
Value
=
"Black"
/>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
</
Style
>
</
telerik:RadChart.Resources
>
<
telerik:RadChart.DefaultSeriesDefinition
>
<
telerik:BarSeriesDefinition
>
</
telerik:BarSeriesDefinition
>
</
telerik:RadChart.DefaultSeriesDefinition
>
<
telerik:RadChart.AnimationSettings
>
<
telerik:AnimationSettings
/>
</
telerik:RadChart.AnimationSettings
>
<
telerik:RadChart.DefaultView
>
<
telerik:ChartDefaultView
>
<
telerik:ChartDefaultView.ChartTitle
>
<
telerik:ChartTitle
Visibility
=
"Collapsed"
/>
</
telerik:ChartDefaultView.ChartTitle
>
<
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartArea
Padding
=
"5,0,6,0"
IsTabStop
=
"False"
SmartLabelsEnabled
=
"True"
>
<
telerik:ChartArea.Annotations
>
<
telerik:MarkedZone
Background
=
"Black"
/>
</
telerik:ChartArea.Annotations
>
<
telerik:ChartArea.AxisX
>
<
telerik:AxisX
Visibility
=
"Collapsed"
/>
</
telerik:ChartArea.AxisX
>
<
telerik:ChartArea.AxisY
>
<
telerik:AxisY
Visibility
=
"Collapsed"
/>
</
telerik:ChartArea.AxisY
>
</
telerik:ChartArea
>
</
telerik:ChartDefaultView.ChartArea
>
<
telerik:ChartDefaultView.ChartLegend
>
<
telerik:ChartLegend
Visibility
=
"Collapsed"
/>
</
telerik:ChartDefaultView.ChartLegend
>
</
telerik:ChartDefaultView
>
</
telerik:RadChart.DefaultView
>
</
telerik:RadChart
>
VB code
Dim
obj_Series
As
New
SeriesMappingCollection
xxxxxxxxxx.SeriesMappings.Clear()
xxxxxxxxxx.ItemsSource =
Nothing
For
i = 0
To
4
Dim
sm1
As
New
SeriesMapping()
Dim
d1
As
New
StackedBarSeriesDefinition()
d1.ShowItemToolTips =
True
d1.ItemToolTipFormat =
"#Y.Volume{#.00}"
d1.ShowItemLabels = (i = 4)
If
i = 4
Then
d1.SeriesItemLabelStyle = TryCast(
Me
.xxxxxxxxxx.Resources(
"TopItemLabelStyle"
), Style)
d1.ItemLabelFormat =
"#STSUM"
d1.LabelSettings.LabelDisplayMode = LabelDisplayMode.Outside
d1.LabelSettings.Distance = 10
d1.LabelSettings.ShowConnectors =
False
End
If
sm1.SeriesDefinition = d1
sm1.SeriesDefinition.Appearance.Fill =
New
SolidColorBrush(Utils.StringToColor(mobj_xxxxxx_Colors(i)))
sm1.LegendLabel =
String
.Empty
sm1.CollectionIndex = i
Dim
im1
As
ItemMapping =
New
ItemMapping
im1.DataPointMember = DataPointMember.YValue
sm1.ItemMappings.Add(im1)
obj_Series.Add(sm1)
Next
xxxxxxxxxx.SeriesMappings = obj_Series
How can I let the bar char use it's full height?
Regards,
Erik