How to set direction of added pie pieces to counter-clockwise

5 posts, 1 answers
  1. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 03 Apr 2015 Link to this post

    For my pie chart, I see that I can set startAngle, but I don't see where I can set the direction of the pie pieces. I would like pie pieces to be added counter-clockwise. Currently, they are added clockwise.

    FYI, I am also setting a sort on the data, so the largest is always first. Right now the largest is taking the 12-3pm pie piece, the second largest taking 3-5pm, etc. I want them to go 12-9pm, 9-7pm.

    Thanks,

    --Ed

  2. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 03 Apr 2015 in reply to Ed Link to this post

    I guess one solution would be to reverse the sort.

    --Ed

  3. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 03 Apr 2015 in reply to Ed Link to this post

    I would prefer not to reverse the sort since the legend (I currently have it on the left) will still show from top to bottom the pieces as they appear on the chart in a clockwise fashion.

    --Ed

  4. Ed
    Ed avatar
    168 posts
    Member since:
    Sep 2013

    Posted 05 Apr 2015 in reply to Ed Link to this post

    The other issue with reversing the sort and reversing the legend order is that when there are varying numbers of pie slices, the largest piece will not always have the same color - unless we do calculations in dataBound to alter the colors array which would be a major pain.

    --Ed

  5. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 07 Apr 2015 Link to this post

    Hi Ed,

    Kendo UI Pie Chart supports only clockwise direction. You could submit this idea as a feature request at our UserVoice portal - this way the community would be able to evaluate it and if the suggestion gains popularity we will consider its implementation for future releases. 

    Meanwhile as a workaround I could suggest to change the sort direction and use the legend.reverse option to reverse the legend items. 

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top