Skip to content

Commit 9ef5e28

Browse files
committed
Implemented NodeOptions.height support.
1 parent afd2318 commit 9ef5e28

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

highcharts_core/utility_classes/nodes.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, **kwargs):
2020
self._color = None
2121
self._color_index = None
2222
self._data_labels = None
23+
self._height = None
2324
self._id = None
2425
self._name = None
2526
self._offset_horizontal = None
@@ -28,6 +29,7 @@ def __init__(self, **kwargs):
2829
self.color = kwargs.get('color', None)
2930
self.color_index = kwargs.get('color_index', None)
3031
self.data_labels = kwargs.get('data_labels', None)
32+
self.height = kwargs.get('height', None)
3133
self.id = kwargs.get('id', None)
3234
self.name = kwargs.get('name', None)
3335
self.offset_horizontal = kwargs.get('offset_horizontal', None)
@@ -76,6 +78,18 @@ def data_labels(self) -> Optional[DataLabel]:
7678
def data_labels(self, value):
7779
self._data_labels = value
7880

81+
@property
82+
def height(self) -> Optional[int | float | Decimal]:
83+
"""The height of the node.
84+
85+
:rtype: numeric or :obj:`None <python:None>`
86+
"""
87+
return self._height
88+
89+
@height.setter
90+
def height(self, value):
91+
self._height = validators.numeric(value, allow_empty=True)
92+
7993
@property
8094
def id(self) -> Optional[str]:
8195
"""The id of the auto-generated node, refering to the ``from`` or ``to`` setting
@@ -173,6 +187,7 @@ def _get_kwargs_from_dict(cls, as_dict):
173187
'color': as_dict.get('color', None),
174188
'color_index': as_dict.get('colorIndex', None),
175189
'data_labels': as_dict.get('dataLabels', None),
190+
'height': as_dict.get('height', None),
176191
'id': as_dict.get('id', None),
177192
'name': as_dict.get('name', None),
178193
'offset_horizontal': as_dict.get('offsetHorizontal', None),
@@ -186,6 +201,7 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
186201
'color': self.color,
187202
'colorIndex': self.color_index,
188203
'dataLabels': self.data_labels,
204+
'height': self.height,
189205
'id': self.id,
190206
'name': self.name,
191207
'offsetHorizontal': self.offset_horizontal,
@@ -263,6 +279,7 @@ def _get_kwargs_from_dict(cls, as_dict):
263279
'color': as_dict.get('color', None),
264280
'color_index': as_dict.get('colorIndex', None),
265281
'data_labels': as_dict.get('dataLabels', None),
282+
'height': as_dict.get('height', None),
266283
'id': as_dict.get('id', None),
267284
'name': as_dict.get('name', None),
268285
'offset_horizontal': as_dict.get('offsetHorizontal', None),
@@ -379,6 +396,7 @@ def _get_kwargs_from_dict(cls, as_dict):
379396
'color': as_dict.get('color', None),
380397
'color_index': as_dict.get('colorIndex', None),
381398
'data_labels': as_dict.get('dataLabels', None),
399+
'height': as_dict.get('height', None),
382400
'id': as_dict.get('id', None),
383401
'name': as_dict.get('name', None),
384402
'offset_horizontal': as_dict.get('offsetHorizontal', None),

0 commit comments

Comments
 (0)