Skip to content

Commit 5c63b06

Browse files
committed
Added ConnectorOptions.radius
1 parent efebc09 commit 5c63b06

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

highcharts_gantt/options/plot_options/connectors.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ def __init__(self, **kwargs):
1919
self._line_color = None
2020
self._line_width = None
2121
self._marker = None
22+
self._radius = None
2223
self._start_marker = None
2324

2425
self.dash_style = kwargs.get('dash_style', None)
2526
self.end_marker = kwargs.get('end_marker', None)
2627
self.line_color = kwargs.get('line_color', None)
2728
self.line_width = kwargs.get('line_width', None)
2829
self.marker = kwargs.get('marker', None)
30+
self.radius = kwargs.get('radius', None)
2931
self.start_marker = kwargs.get('start_marker', None)
3032

3133
@property
@@ -130,6 +132,19 @@ def marker(self) -> Optional[Marker]:
130132
def marker(self, value):
131133
self._marker = value
132134

135+
@property
136+
def radius(self) -> Optional[int | float | Decimal]:
137+
"""The corner radius for the connector line.
138+
139+
:rtype: numeric or :obj:`None <python:None>`
140+
"""
141+
return self._radius
142+
143+
@radius.setter
144+
def radius(self, value):
145+
self._radius = validators.numeric(value,
146+
allow_empty = True)
147+
133148
@property
134149
def start_marker(self) -> Optional[Marker]:
135150
"""Configuration of the marker to use at the start of the connector.
@@ -158,6 +173,7 @@ def _get_kwargs_from_dict(cls, as_dict):
158173
'line_color': as_dict.get('lineColor', None),
159174
'line_width': as_dict.get('lineWidth', None),
160175
'marker': as_dict.get('marker', None),
176+
'radius': as_dict.get('radius', None),
161177
'start_marker': as_dict.get('startMarker', None),
162178
}
163179

@@ -170,6 +186,7 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
170186
'lineColor': self.line_color,
171187
'lineWidth': self.line_width,
172188
'marker': self.marker,
189+
'radius': self.radius,
173190
'startMarker': self.start_marker,
174191
}
175192

0 commit comments

Comments
 (0)