Pie Chart adding tool tip

4 posts, 0 answers
  1. Matthew
    Matthew avatar
    3 posts
    Member since:
    Jan 2014

    Posted 09 Jan 2014 Link to this post

    <Grid Grid.Row="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
     
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
         
         
        <telerik:RadPieChart x:Name="PieChart"
                             Palette="RainbowSelected"                                  
                                 Grid.Row="1">
            <telerik:RadPieChart.Behaviors>
                <telerik:ChartTooltipBehavior HorizontalOffset="-6" VerticalOffset="-49"/>
                </telerik:RadPieChart.Behaviors>
            <telerik:RadPieChart.TooltipTemplate>
                <DataTemplate>
                    <Grid>
                        <Path Data="M-1236,-441 L-1180,-441 -1180,-424 -1228,-424 -1230.5,-420 -1233,-424 -1236,-424 z"
    Stretch="Fill" Fill="White" Stroke="Gray" StrokeThickness="1" />
                        <TextBlock Text="{Binding Value, StringFormat='C'}" Margin="4,3,4,9" />
                    </Grid>
                </DataTemplate>
            </telerik:RadPieChart.TooltipTemplate>
            <telerik:PieSeries ValueBinding="YValue"
                                   ItemsSource="{Binding Data}"
                                   RadiusFactor="0.77" AllowSelect="True"
                <telerik:PieSeries.LabelDefinitions>
                    <telerik:ChartSeriesLabelDefinition Margin="-8,0,0,0" />
                </telerik:PieSeries.LabelDefinitions>
                <telerik:PieSeries.LegendSettings>
                    <telerik:DataPointLegendSettings TitleBinding="AxisXLabel" />
                </telerik:PieSeries.LegendSettings>
                
                <!--<telerik:PieSeries.AngleRange>
                    <telerik:AngleRange StartAngle="270"
                                            SweepAngle="360" />
                </telerik:PieSeries.AngleRange>-->
            </telerik:PieSeries>
        </telerik:RadPieChart>
        <telerik:RadLegend x:Name="PieLegend"
                               Items="{Binding LegendItems, ElementName=PieChart}"
                               Grid.Row="1"
                               Grid.Column="1"/>
         
         
         
     
    </Grid>


    I do not want to manually map the path data. How can i assign it where it just goes over each slice ?
  2. Matthew
    Matthew avatar
    3 posts
    Member since:
    Jan 2014

    Posted 09 Jan 2014 Link to this post

    i want to have the company and money. So two variables on it.
  3. DevCraft banner
  4. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 14 Jan 2014 Link to this post

    Hello Matthew,

    I am not sure what you have in mind. Could you please elaborate more on your requirements? Do you need to customize the tooltip of the control or you need to customize the labels? What you have in mind when you say: "map the path data"? Are you talking about binding the ItemsSource of the PieSeries?

    Sending some clarifying pictures will be helpful. Thank you for your cooperation.

    Regards,
    Pavel R. Pavlov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  5. Matthew
    Matthew avatar
    3 posts
    Member since:
    Jan 2014

    Posted 14 Jan 2014 Link to this post

    This has been solved with a support ticket. Thanks.
Back to Top