MCPcopy Index your code
hub / github.com/PyQt5/PyQt / getSeries

Method getSeries

QtChart/PieChart.py:43–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

41 chart.addSeries(self.getSeries())
42
43 def getSeries(self):
44 series = QPieSeries()
45 slice0 = series.append('10%', 1)
46 series.append('20%', 2)
47 series.append('70%', 7)
48 # 显示label文字
49 series.setLabelsVisible()
50 series.setPieSize(0.5)
51 # 使第一块突出显示
52 slice0.setLabelVisible()
53 slice0.setExploded()
54 # 设置第一块颜色
55 slice0.setColor(QColor(255, 0, 0, 100))
56 return series
57
58
59if __name__ == '__main__':

Callers 1

__init__Method · 0.95

Calls 1

setColorMethod · 0.80

Tested by

no test coverage detected