[docs]classPolarSector(ComponentWithPaletteColoring,SeriesWithoutCursorEnabled,SeriesWithAddEventListener):"""Class representing a sector in a polar chart."""def__init__(self,chart):self.id=str(uuid.uuid4()).split('-')[0]self.instance=chart.instanceself.chart=chartself.instance.send(self.id,'addSector',{'chart':self.chart.id})
[docs]defset_amplitude_start(self,amplitude_start:int|float|None):"""Set Sectors start amplitude. Args: amplitude_start: Start amplitude. Setting to None results in tracking the PolarAxes start value. This doesn't have to be less than amplitude end value. Returns: The instance of the class for fluent interface. """self.instance.send(self.id,'setAmplitudeStart',{'amplitudeStart':amplitude_start})returnself
[docs]defset_amplitude_end(self,amplitude_end:int|float|None):"""Set Sectors end amplitude. Args: amplitude_end: End amplitude. Setting to None results in tracking the PolarAxes end value. This doesn't have to be greater than amplitude start value. Returns: The instance of the class for fluent interface. """self.instance.send(self.id,'setAmplitudeEnd',{'amplitudeEnd':amplitude_end})returnself
[docs]defset_angle_start(self,angle_start:int):"""Set Sectors start angle in degrees. Args: angle_start: Start angle in degrees, restricted to [0, 360]. This doesn't have to be less than angle end value. Returns: The instance of the class for fluent interface. """self.instance.send(self.id,'setAngleStart',{'angleStart':angle_start})returnself
[docs]defset_angle_end(self,angle_end:int|float):"""Set Sectors end angle in degrees. Args: angle_end: End angle in degrees, restricted to [0, 360]. This doesn't have to be greater than angle start value. Returns: The instance of the class for fluent interface. """self.instance.send(self.id,'setAngleEnd',{'angleEnd':angle_end})returnself
[docs]defset_stroke(self,thickness:int|float,color:ColorInput|None=None):"""Set Stroke style of the sector. Args: thickness (int | float): Thickness of the stroke. color (Color): Color of the stroke. Use 'transparent' or None to hide. Returns: The instance of the class for fluent interface. """color=convert_color_to_hex(color)ifcolorisnotNoneelseNoneself.instance.send(self.id,'setStrokeStyle',{'thickness':thickness,'color':color},)returnself