PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, April 23, 2022

[FIXED] How do I set all values to be horizontal in plotly piechart?

 April 23, 2022     pie-chart, plotly, python     No comments   

Issue

I created this piechart with plotly: enter image description here

Anyone knows a smart command that all the shares are horizontal?

i.e. set the percentage values of Planing/scheduling and Robotics horizontal.

Or if the above is not possible, format the two categories the same way as the smallest catgories (Biometrics, Char Recognition,...)?

I tried it with decreasing fontsize, but there must be a smarter method.

Thanks in advance!


Solution

As gflavia suggested, the insidetextorientation helps with the problem .

Setting

fig.update_traces(insidetextorientation='horizontal')

formats the piechart as intended: enter image description here



Answered By - Epimetheus
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing