This is a migrated thread and some comments may be shown as answers.

HTML Pie Chart

3 Answers 111 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Petrescu
Top achievements
Rank 1
Petrescu asked on 19 Dec 2013, 09:25 AM
I have an Pie Chart looking like this one.
Is it possible on mouse hover to show me the real number and in the fixed labels to show me the percentage? Because I try some ways but doesn't work. I tried with the {N} for fixed and {P} for percentage but is not good this solution. 

3 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 23 Dec 2013, 11:18 AM
Hi,

Check if the following sample will be helpful to achieve the required functionality. In the sample 1000 is the total quantitiy:

<telerik:RadHtmlChart runat="server" ID="PieChart1" Width="500" Height="300">
    <PlotArea>
        <Series>
            <telerik:PieSeries StartAngle="90">
                <LabelsAppearance Position="Circle" DataFormatString="{0} %">
                </LabelsAppearance>
                <TooltipsAppearance DataFormatString="{0}">
                    <ClientTemplate>
                        #= Math.round(1000 * (value / 100)) #
                    </ClientTemplate>
                </TooltipsAppearance>
                <SeriesItems>
                    <telerik:PieSeriesItem BackgroundColor="#ff9900" Exploded="true" Name="First" Y="20"></telerik:PieSeriesItem>
                    <telerik:PieSeriesItem BackgroundColor="#cccccc" Exploded="false" Name="Second" Y="35"></telerik:PieSeriesItem>
                    <telerik:PieSeriesItem BackgroundColor="#999999" Exploded="false" Name="Third" Y="45"></telerik:PieSeriesItem>
                </SeriesItems>
            </telerik:PieSeries>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>
 

Regards,
Stanimir
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Petrescu
Top achievements
Rank 1
answered on 23 Dec 2013, 12:42 PM
Hi Stanimir,

Can you provide me a link or something about TooltipsApearance -> ClientTemplate? Because I don't find it anywhere. Maybe I didn't find right.

Thank's a lot for all.
0
Stanimir
Telerik team
answered on 23 Dec 2013, 01:40 PM
Hello,

Check the following online help articles:
http://www.telerik.com/help/aspnet-ajax/htmlchart-client-templates-for-tooltips-and-labels.html
Using ClientTemplates to Display HTML and Execute JavaScript



Regards,
Stanimir
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Chart (Obsolete)
Asked by
Petrescu
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Petrescu
Top achievements
Rank 1
Share this question
or