HTML Pie Chart

Thread is closed for posting
4 posts, 0 answers
  1. Petrescu
    Petrescu avatar
    2 posts
    Member since:
    Dec 2013

    Posted 19 Dec 2013 Link to this post

    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. 
  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 23 Dec 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Petrescu
    Petrescu avatar
    2 posts
    Member since:
    Dec 2013

    Posted 23 Dec 2013 Link to this post

    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.
  5. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 23 Dec 2013 Link to this post

    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.
Back to Top