1212from highcharts_core .utility_classes .breadcrumbs import BreadcrumbOptions
1313from highcharts_core .utility_classes .shadows import ShadowOptions
1414from highcharts_core .utility_classes .data_labels import SunburstDataLabel
15+ from highcharts_core .utility_classes .border_radius import BorderRadius
1516
1617
1718class SunburstOptions (GenericTypeOptions ):
@@ -28,6 +29,7 @@ class SunburstOptions(GenericTypeOptions):
2829 """
2930
3031 def __init__ (self , ** kwargs ):
32+ self ._border_radius = None
3133 self ._color_index = None
3234 self ._crisp = None
3335 self ._shadow = None
@@ -46,6 +48,7 @@ def __init__(self, **kwargs):
4648 self ._sliced_offset = None
4749 self ._start_angle = None
4850
51+ self .border_radius = kwargs .get ('border_radius' , None )
4952 self .color_index = kwargs .get ('color_index' , None )
5053 self .crisp = kwargs .get ('crisp' , None )
5154 self .shadow = kwargs .get ('shadow' , None )
@@ -117,6 +120,35 @@ def border_width(self, value):
117120 allow_empty = True ,
118121 minimum = 0 )
119122
123+ @property
124+ def border_radius (self ) -> Optional [int | float | Decimal | str | BorderRadius ]:
125+ """The corner radius of the border surrounding each column or bar. Defaults to
126+ ``0``.
127+
128+ :rtype: numeric or :obj:`None <python:None>`
129+ """
130+ return self ._border_radius
131+
132+ @border_radius .setter
133+ def border_radius (self , value ):
134+ if value is None :
135+ self ._border_radius = None
136+ else :
137+ try :
138+ self ._border_radius = validators .numeric (value ,
139+ allow_empty = True ,
140+ minimum = 0 )
141+ except (ValueError , TypeError ):
142+ try :
143+ self ._border_radius = validate_types (value , BorderRadius )
144+ except (ValueError , TypeError ):
145+ if not isinstance (value , str ):
146+ raise errors .HighchartsValueError (f'border_radius must be a numeric value, '
147+ f'a string, or an instance of BorderRadius. '
148+ f'Received { value .__class__ .__name__ } .' )
149+
150+ self ._border_radius = value
151+
120152 @property
121153 def breadcrumbs (self ) -> Optional [BreadcrumbOptions ]:
122154 """Options for the breadcrumbs, the navigation at the top leading the way up
@@ -468,6 +500,7 @@ def _get_kwargs_from_dict(cls, as_dict):
468500 'allow_traversing_tree' : as_dict .get ('allowTraversingTree' , None ),
469501 'border_color' : as_dict .get ('borderColor' , None ),
470502 'border_width' : as_dict .get ('borderWidth' , None ),
503+ 'border_radius' : as_dict .get ('borderRadius' , None ),
471504 'breadcrumbs' : as_dict .get ('breadcrumbs' , None ),
472505 'center' : as_dict .get ('center' , None ),
473506 'color_by_point' : as_dict .get ('colorByPoint' , None ),
@@ -491,6 +524,7 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
491524 'allowTraversingTree' : self .allow_traversing_tree ,
492525 'borderColor' : self .border_color ,
493526 'borderWidth' : self .border_width ,
527+ 'borderRadius' : self .border_radius ,
494528 'breadcrumbs' : self .breadcrumbs ,
495529 'center' : self .center ,
496530 'colorByPoint' : self .color_by_point ,
0 commit comments