radHtmlChart Series Labels extend out of Chart Area

4 posts, 1 answers
  1. Cecilia
    Cecilia avatar
    4 posts
    Member since:
    Sep 2015

    Posted 05 Aug Link to this post

    Hi -

    I am looking for a way to fix a radHTMLchart where the series labels extend outside of the chart boundary as shown in the attached picture.

    My work around is to set the chart.PlotArea.LabelsAppearance.TextStyle.Margin = "-3" so the series label will appear very close to the end of the bar, but I would like to know if there is a better solution.

    Thanks,

    Cecilia Daniels

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 10 Aug Link to this post

    Hi Cecilia,

    You can either set different position of the series labels (e.g., inside the series) or set a negative value for the plotarea's margin.

    Regards,
    Danail Vasilev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cecilia
    Cecilia avatar
    4 posts
    Member since:
    Sep 2015

    Posted 10 Aug Link to this post

    Hi Danail,

    Thanks you so much for responding.

    Setting the PlotArea's margin would be great, but I could not find that property in the radHTMLChart control. Am I missing something?

    For a fix, I wound up changing the PlotArea.YAxis.LabelsApperarance.Step value from 2 (which is the value we use for our charts) back to 1. This forced a label to be created at the end of the Axis, which lengthened it enough for the series label to display.  

    Thanks again,

    Cecilia Daniels

     

     

  5. Answer
    Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 11 Aug Link to this post

    Hi Cecilia,

    You can set the margin like that:

    <telerik:RadHtmlChart runat="server" ID="PieChart1" Width="400px" Height="400px">
        <PlotArea>
            <Appearance>
                <TextStyle Margin="-30" />
            </Appearance>

    A runnable sample is available here as well - http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/troubleshooting/common-issues#there-is-a-redundant-space-between-pie-or-donut-chart-and-its-legend

    Regards,
    Danail Vasilev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top