MCPcopy Create free account
hub / github.com/PyQt5/PyQt / __setLegend

Method __setLegend

Test/ChartView/ChartView.py:196–205  ·  view source on GitHub ↗

:param legend: legend json

(self, legend=None)

Source from the content-addressed store, hash-verified

194 self._chart.setMargins(QMargins(left, top, right, bottom))
195
196 def __setLegend(self, legend=None):
197 '''
198 :param legend: legend json
199 '''
200 if not legend or not isinstance(legend, dict):
201 return
202 _legend = self._chart.legend()
203 _legend.setAlignment(self.__getAlignment(
204 legend.get("alignment", None)))
205 _legend.setShowToolTips(legend.get("showToolTips", True) or True)
206
207 def __getSerie(self, serie=None):
208 if not serie or not isinstance(serie, dict):

Callers 1

__analysisMethod · 0.95

Calls 1

__getAlignmentMethod · 0.95

Tested by

no test coverage detected