One 、pyecharts Introduction to pie chart Syntax

Pie chart is mainly used to show the proportion of different categories of data in the total . The radian of each is not the proportion of data volume
center=None,
rosetype=None, **kwargs)
name->str legend title
attr->list The attribute name
value->list Value corresponding to property
radius->list The radius of the pie , The first item in the array is the inner radius , The second term is the outer radius , The default is [0,75]
The default setting is percentage , Relative to half of the smaller item in the height and width of the container
center-> The coordinates of the center of the pie chart , The first item in the array is the abscissa , The second is the ordinate , The default is [50,50]
The default setting is percentage , When set as a percentage, the first item is relative to the height of the container , The second item is also relative to the height of the container
rosetype->str
Is it shown as a nightingale map . Size data by radius , Yes radius and area Two modes . The default is radius
radius: The percentage of data presented by the sector center angle , Radius shows the size of the data
area: All sectors have the same center angle , Show data size by radius only

Two 、 Draw a normal pie chart

```attr = [" shirt ", " Woolen sweater ", " Snow spins unlined upper garment ", " The trousers ", " High heels ", " socks "]
v1 = [11, 12, 13, 10, 10, 10]
pie1 = Pie(" Pie chart example ")

3、 ... and 、 Draw a circle

```attr = [" shirt ", " Woolen sweater ", " Snow spins unlined upper garment ", " The trousers ", " High heels ", " socks "]
v1 = [11, 12, 13, 10, 10, 10]
pie2 = Pie(" The pie chart - An example of a doughnut ", title_pos='center')
"",
attr,
v1,
label_text_color=None,
is_label_show=True,
legend_orient="vertical",
legend_pos="left",
)

Four 、 Draw the pie chart - Rose chart

```attr = [" shirt ", " Woolen sweater ", " Snow spins unlined upper garment ", " The trousers ", " High heels ", " socks "]
v1 = [11, 12, 13, 10, 10, 10]
v2 = [19, 21, 32, 20, 20, 33]
pie3 = Pie(" The pie chart - An example of a rose chart ")
" goods A",
attr,
v1,
is_random=True,
is_label_show=True,
)

attr = [" shirt ", " Woolen sweater ", " Snow spins unlined upper garment ", " The trousers ", " High heels ", " socks "]
v1 = [11, 12, 13, 10, 10, 10]
v2 = [19, 21, 32, 20, 20, 33]
pie4 = Pie(" The pie chart - An example of a rose chart ")
" goods B",
attr,
v2,
#center=[75, 50],
is_random=True,
rosetype="area",
is_legend_show=True,
is_label_show=True,
)

Python pyecharts More articles on drawing pie charts

1. Python Use Plotly Drawing tools , Draw the pie chart

Today we're going to learn how to use Python Of Plotly Drawing tools , Draw the pie chart Use Plotly The way to draw a pie chart , We need to use graph_objs Medium Pie function The two most commonly used properties in functions values, It is used to assign a value to ...

2. Html5 Draw a pie chart, a statistical chart

Here is an example jQuery plug-in unit :jquery.easysector.js Html5 Provides powerful graphics API, Let's be able to use javascript Easy to draw all kinds of graphics . This article will mainly explain the use of HTML5 Draw the pie chart ...

3. PHP of use GD Draw the pie chart

PHP of use GD Draw the pie chart , See the code for the drawn class : Class Chart{ private \$image; // Define image private \$title; // Define the title private \$ydata; // ...

4. 【Highcharts】 Draw pie charts and funnel charts

1.outModel Class design Design outModel Class first, let's study Highcharts in series Of data data format , We found that both pie chart and funnel chart can use data in this format series: [{ name: 'Uniq ...

5. 【 With canvas Go wandering 】 （3） Draw the pie chart

Catalog One . Mission statement Two . Key points 3、 ... and . Sample code Four . hover Highlight the realization of ideas The sample code is hosted in :http://www.github.com/dashnowords/blogs Blog Garden address :< ...

6. Qt Draw a pie chart

1. explain I've been working on drawing recently , Tell the truth C++ There are not many third-party drawing Libraries , In short, I know :qtcharts.ChartDirector.qwt.kdchart and QCustomPlot. These libraries have their own advantages and disadvantages . ...

7. Use Python Statistical functions draw simple graphs matplotlib

1.bar() -- Draw a histogram plt.bar(x,y,align="center",color="b",tick_label=["a", ...

8. Python turtle Draw Yin Yang Tai Chi diagram code analysis

This paper analyzes in detail how to use Python turtle Draw the diagram of Yin Yang Tai Chi , Let's decompose this graph first , There are four colors in the picture , The arrows on each curve indicate the direction in which the tortoise moves , First draw a semicircle from the center ( Red thread ), Draw a campus with the diameter of the circle shown by the red line as the radius , ...

9. QT Draw the pie chart

QT edition :QT5.6.1 QT Draw the pie chart , The problem code is as follows void DrawPieDialog::paintEvent(QPaintEvent *event) { float startAngle=0 ...

10. HTML5 Drawing pie chart example （ One ）

Original address :http://www.2cto.com/kf/201108/100251.html HTML5 introduce Canvas Elements , For the drawing of figures , We can just based on HTML and JavaScript Can draw the original ...

Random recommendation

1. K-Means Clustering algorithm principle analysis and code implementation

Preface In the previous article , The machine learning algorithms involved are supervised learning algorithms . So called supervised learning , Is learning with training process . Be more precise , There is " Classification label set " Learning from . now , Will enter the field of unsupervised learning . Congjing ...

2. SpringMVC Source analysis （ One ）- Starting with abstraction and interfaces

SpringMVC As Struts2 After that, a framework of performance layer emerged , It's becoming more and more popular , Believe in javaee Even if they haven't used it SpringMVC, I should also have heard about it . I tried to pass the right SpringMVC Design ideas and ...

3. [maven] Common plug-ins resolve

Reference material :http://my.oschina.net/zh119893/blog/276090 We all know Maven It's essentially a plug-in framework , Its core does not perform any specific build tasks , All these tasks are left to the plug-in ...

4. （ turn ）Android How to program APP Installation position （ External storage or internal storage ）？

Beginning with API Level 8, you can allow your application to be installed on the external storage ( ...

5. python Learning notes 11（ Function two ）： Parameter passing 、 Scope of variable

One . The difference between formal and actual parameters of a function Formal parameters are formal parameters , In use def Keyword when defining a function, the variables in brackets after the function name are called formal parameters . Real parameters are called real parameters , The value or variable provided when a function is called is called the actual parameter . >>> ...

6. Struts2 check

Struts2 Check format : actionName-methodName-invalidation.xml   The profile must be the same as action Class under the same package . <?xml version="1 ...

7. cocos2d-x-lua Basic tutorial series III （lua object-oriented ）

lua class Lua In fact, it's not an object-oriented language We can use table Simulation imitates object-oriented programming lua Medium this similarly self  table It also has a life cycle 2, Use table   Create a class projed ...

8. About character type char Variable

When writing a program , Accidentally found a problem that is not easy to detect where the problem is scanf("%c",&ch); scanf("%c",&c); printf(" ...

9. Book one ：lesson3-4.

original text : A:My coat and my umbrella please?Here is my ticket. B:Thank you sir.Number five.Here is your umb ...

10. navicat Connect mysql When 2003（10060） error

Problem solving steps : Reference resources http://jingyan.baidu.com/article/95c9d20dac9040ec4f75617a.html, It is found that the firewall is not closed : Then we have two ways to solve Turn off ...