Silverlight图表 - 使用DataPointStyle时转换不起作用

时间:2011-04-23 14:33:18

标签: silverlight silverlight-4.0 charts silverlight-toolkit

我遇到以下问题 - 当我应用自定义DataPointStyle时,默认转换不起作用。 我试过明确添加过渡但没有成功? 我正在使用Silverlight 4 + Silverlight 4 Toolkit(2010年4月)。

   <toolkit:Chart Name="sampleColumnChart" Title="Sample chart" Width="600" Height="450">
                    <toolkit:Chart.Series>
                        <toolkit:ColumnSeries Name="sampleChartSeries" 
                                              Title="Areas" 
                                              ItemsSource="{Binding Areas}" 
                                              IndependentValueBinding="{Binding Name}" 
                                              DependentValueBinding="{Binding Complete}"
                                              DataPointStyle="{StaticResource ColumnDataPointStyle}"                                                  
                                              TransitionDuration="0:0:0.8" >
                            <toolkit:ColumnSeries.TransitionEasingFunction>
                                <QuadraticEase EasingMode="EaseInOut"/>
                            </toolkit:ColumnSeries.TransitionEasingFunction>                              
                            <toolkit:ColumnSeries.IndependentAxis>
                                <toolkit:CategoryAxis Orientation="X">                                        
                                    <toolkit:CategoryAxis.AxisLabelStyle>
                                        <Style TargetType="toolkit:AxisLabel">
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="toolkit:AxisLabel">
                                                        <layout:LayoutTransformer>
                                                            <layout:LayoutTransformer.LayoutTransform>
                                                                <RotateTransform Angle="-60"/>
                                                            </layout:LayoutTransformer.LayoutTransform>
                                                            <TextBlock Text="{TemplateBinding FormattedContent}"/>
                                                        </layout:LayoutTransformer>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </toolkit:CategoryAxis.AxisLabelStyle>
                                </toolkit:CategoryAxis>
                            </toolkit:ColumnSeries.IndependentAxis>
                        </toolkit:ColumnSeries>
                    </toolkit:Chart.Series>
                </toolkit:Chart>

0 个答案:

没有答案