File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -170,9 +170,10 @@ def add_text(
170170 text_anchor_point = (0 , 0.5 ),
171171 is_data = True ,
172172 text = None ,
173- ):
173+ ) -> int :
174174 """
175- Add text labels with settings
175+ Add text labels with settings. Returns the index of the label,
176+ for use with ``set_text()`` and ``set_text_color()``.
176177
177178 :param str text_font: The path to your font file for your data text display.
178179 :param text_position: The position of your extracted text on the display in an (x, y) tuple.
@@ -192,6 +193,9 @@ def add_text(
192193 :param bool is_data: If True, fetch will attempt to update the label
193194 :param str text: If this is provided, it will set the initial text of the label.
194195
196+ :return: Index of the new text label.
197+ :rtype: int
198+
195199 """
196200 if not text_wrap :
197201 text_wrap = 0
You can’t perform that action at this time.
0 commit comments