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

Method generateRandomData

QtChart/ChartThemes.py:128–148  ·  view source on GitHub ↗
(self, listCount, valueMax, valueCount)

Source from the content-addressed store, hash-verified

126 self.m_legendComboBox.currentIndexChanged.connect(self.updateUI)
127
128 def generateRandomData(self, listCount, valueMax, valueCount):
129 random.seed()
130
131 dataTable = []
132
133 for i in range(listCount):
134 dataList = []
135 yValue = 0.0
136 f_valueCount = float(valueCount)
137
138 for j in range(valueCount):
139 yValue += random.uniform(0, valueMax) / f_valueCount
140 value = QPointF(
141 j + random.random() * self.m_valueMax / f_valueCount,
142 yValue)
143 label = "Slice " + str(i) + ":" + str(j)
144 dataList.append((value, label))
145
146 dataTable.append(dataList)
147
148 return dataTable
149
150 def createThemeBox(self):
151 themeComboBox = QComboBox()

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected