Studio for ASP.NET Wijmo

C1PieChart: How to left align chart legend text?

  •  debarupa2012 said 1 year, 1 month ago:

    In the code behind I am setting the C1PieChart1.SeriesList().Label property to

    Now the problem is, (1.53%) appears center aligned under Growth Regulator.

    Is there a way to left align it?

    Thanks,
    Debarupa

  •  Ashish Jindal16p said 1 year, 1 month ago:

    Hello Debarupa,

    You may set the TextAnchor property of the TextStyle object of the same series as below:
    C1PieChart1.SeriesList(5).TextStyle.TextAnchor = "start";

    Regards
    Ashish

  •  debarupa2012 said 1 year, 1 month ago:

    Perhaps I was not clear about what I needed so I attached an image so you have a clearer picture of my needs.

    Setting the TextAnchor to "start" is not working for me. Please see the image where the percentage values under each product (Growth Regulator, Attractant/Pheromone etc.) are center aligned instead of left aligned.

    Is there a way to left align them?

    Thanks.

    Attachments:
    You must be logged in to view attched files.
  •  debarupa2012 said 1 year ago:

    Any update on this yet?

    Thanks,
    Debarupa

  •  Ashish Jindal16p said 1 year ago:

    Hello Debarupa,

    You may use the following code to align the percentage values towards left side:

     <script type="text/javascript">
            $(document).ready(function () {
               var legend = $(".wijchart-legend-text");
                for (i = 0; i < legend.length; i++) {
                    if (legend.childNodes.length > 1) {
                        legend.childNodes[1].style.textAnchor = "end";
                    }
                }
            });
     </script>
    

    Regards
    Ashish

  •  debarupa2012 said 1 year ago:

    Hi Ashish,

    I am sorry to say that this did not work for me. Let me know if you need any more details.

    Thanks,
    Debarupa

  •  Ashish Jindal16p said 1 year ago:

    Hello Debarupa,

    I have escalated it to the concerned team for review and would get back to you as soon as I hear anything from them.

    Regards
    Ashish

  •  Ashish Jindal16p said 10 months, 4 weeks ago:

    Hello Debarupa,

    The problem has been fixed in latest wijmo build 3.5/4.0.20122.68 which is available at below links :

    http://prerelease.componentone.com/dotnet30/C1WebWijmo.Webforms/2012-T2/

    Now, you may set Legend.TextStyle.TextAnchor to "start" in order to display left aligned
    eg. C1PieChart2.Legend.TextStyle.TextAnchor = "start";

    Could you please download the latest build and check it at your end ?

    Regards

    Answer
Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.