[docs]defset_interaction_move_by_dragging(self,enabled:bool):"""Enable or disable default interaction of moving constant line by dragging with mouse or touch. Args: enabled (bool): Boolean flag. Returns: The instance of the class for fluent interface. """self.instance.send(self.id,'setInteractionMoveByDragging',{'enabled':enabled})returnself
[docs]defset_value(self,value:int|float):"""Set value of ConstantLine. This is in values of its owning Axis. Args: value (int | float): Value on Axis. Returns: The instance of the class for fluent interface. """self.instance.send(self.id,'setValue',{'value':value})returnself
[docs]defset_user_interactions(self,interactions=...):"""Configure user interactions from a set of preset options. Args: interactions (dict or None): - `None`: disable all interactions - `{}` or no argument: restore default interactions - `dict`: configure specific interactions Examples: # Disable all interactions: >>> constant_line.set_user_interactions(None) # Restore default interactions: >>> constant_line.set_user_interactions() >>> constant_line.set_user_interactions({}) # Move only with Control down: >>> chart.set_user_interactions({'move': {'drag': False, 'ctrl': {'drag': True}}}) """returnsuper().set_user_interactions(interactions)