.bubble_legend
class: BubbleLegend
- class BubbleLegend(**kwargs)[source]
- The bubble legend is an additional element in legend which presents the scale of the bubble series. - Individual bubble ranges can be defined by user or calculated from series. In the case of automatically calculated ranges, a 1px margin of error is permitted. - Class Inheritance - copy(other=None, overwrite=True, **kwargs)
- Copy the configuration settings from this instance to the - otherinstance.- Parameters:
- other ( - HighchartsMeta) – The target instance to which the properties of this instance should be copied. If- None, will create a new instance and populate it with properties copied from- self. Defaults to- None.
- overwrite ( - bool) – if- True, properties in- otherthat are already set will be overwritten by their counterparts in- self. Defaults to- True.
- kwargs – Additional keyword arguments. Some special descendents of - HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
 
- Returns:
- A mutated version of - otherwith new property values
 
 - classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
- Construct an instance of the class from a - dictobject.
 - classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
- Return a Python object representation of a Highcharts JavaScript object literal. - Parameters:
- as_str_or_file ( - str) – The JavaScript object literal, represented either as a- stror as a filename which contains the JS object literal.
- allow_snake_case ( - bool) – If- True, interprets- snake_casekeys as equivalent to- camelCasekeys. Defaults to- True.
- _break_loop_on_failure ( - bool) – If- True, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults to- False.
 
- Returns:
- A Python object representation of the Highcharts JavaScript object literal. 
- Return type:
- HighchartsMeta
 
 - classmethod from_json(as_json_or_file, allow_snake_case: bool = True)
- Construct an instance of the class from a JSON string. - Parameters:
- as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string. 
- allow_snake_case ( - bool) – If- True, interprets- snake_casekeys as equivalent to- camelCasekeys. Defaults to- True.
 
- Returns:
- A Python objcet representation of - as_json.
- Return type:
- HighchartsMeta
 
 - to_dict() dict
- Generate a - dictrepresentation of the object compatible with the Highcharts JavaScript library.- Note - The - dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
 - to_js_literal(filename=None, encoding='utf-8') str | None
- Return the object represented as a - strcontaining the JavaScript object literal.
 - to_json(filename=None, encoding='utf-8')
- Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library. - Note - This method will either return a standard - stror a- bytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be a- bytesrepresentation of the string.- Parameters:
- Returns:
- A JSON representation of the object compatible with the Highcharts library. 
- Return type:
 
 - static trim_dict(untrimmed: dict, to_json: bool = False) dict
- Remove keys from - untrimmedwhose values are- Noneand convert values that have- .to_dict()methods.
 - static trim_iterable(untrimmed, to_json=False)
- Convert any - EnforcedNullTypevalues in- untrimmedto- 'null'.
 - property border_color: str | Gradient | Pattern | None
- The color of the ranges border. Can also be defined for an individual range. Defaults to - None.
 - property border_width: int | float | Decimal | None
- The border width (in pixels) applied to the range borders. Can also be defined for an individual range. Defaults to - None- Returns:
- The border width to apply to the range borders. 
- Return type:
- numeric or - None
 
 - property color: str | Gradient | Pattern | None
- The main color of the bubble legend. Applies to ranges, if individual ranges are not given a color. Defaults to - None.
 - property connector_class_name: str | None
- An additional class name to apply to the bubble legend’s connector graphical elements. This option does not replace default class names of the graphical element. Defaults to - None.
 - property connector_color: str | Gradient | Pattern | None
- The color applied to the connector. Can also be defined for individual ranges. Defaults to - None.
 - property connector_distance: int | float | Decimal | None
- The length of the connector in pixels. Defaults to - 60.- Note - If labels are centered, the distance is automatically reduced to - 0.- Returns:
- The border width to apply to the range borders. 
- Return type:
- numeric or - None
 
 - property connector_width: int | float | Decimal | None
- The width of the connector in pixels. Defaults to - 1.- Returns:
- The border width to apply to the range borders. 
- Return type:
- numeric or - None
 
 - property enabled: bool | None
- If - True, displays the bubble legend. If- False, hides the legend. Defaults to- False.
 - property labels: BubbleLegendLabelOptions | None
- Options to configure the bubble legend’s labels. Defaults to - None.- Return type:
 
 - property legend_index: int | None
- The position of the bubble legend within the legend. Defaults to - 0.- Returns:
- The position of the bubble legend within the legend. 
- Return type:
- numeric or - None
 
 - property max_size: int | float | Decimal | None
- The maximum bubble legend range size, in pixels. Defaults to - 60.- Note - If not specified, the maximum size is determined automatically. - Returns:
- The maximum bubble legend range size. 
- Return type:
- numeric or - None
 
 - property min_size: int | float | Decimal | None
- The minimum bubble legend range size, in pixels. Defaults to - 10.- Note - If not specified, the minimum size is determined automatically. - Returns:
- The minimum bubble legend range size. 
- Return type:
- numeric or - None
 
 - property ranges: List[BubbleLegendRange] | None
- Options for specific range. One range consists of bubble, label and connector. - Defaults to - None- Return type:
- listof- BubbleLegendRange, or- None
 
 - property size_by: str | None
- Indicates whether the bubble legend range should be represented by the area or the width of the bubble. The default ( - 'area') corresponds best to the human perception of the size of each bubble.- Accepts one of two possible values: - 'area'
- 'width'
 
 - property size_by_absolute_value: bool | None
- If - True, the absolute value of z determines the size of the bubble. This means that with the default- BubbleLegend.z_threshold()of- 0, a bubble of value- -1will have the same size as a bubble of value- 1, while a bubble of value 0 will have a smaller size according to- BubbleLegend.min_size().- Defaults to - False.
 
class: BubbleLegendRange
- class BubbleLegendRange(**kwargs)[source]
- Options for specific range. One range consists of bubble, label and connector. - Class Inheritance - copy(other=None, overwrite=True, **kwargs)
- Copy the configuration settings from this instance to the - otherinstance.- Parameters:
- other ( - HighchartsMeta) – The target instance to which the properties of this instance should be copied. If- None, will create a new instance and populate it with properties copied from- self. Defaults to- None.
- overwrite ( - bool) – if- True, properties in- otherthat are already set will be overwritten by their counterparts in- self. Defaults to- True.
- kwargs – Additional keyword arguments. Some special descendents of - HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
 
- Returns:
- A mutated version of - otherwith new property values
 
 - classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
- Construct an instance of the class from a - dictobject.
 - classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
- Return a Python object representation of a Highcharts JavaScript object literal. - Parameters:
- as_str_or_file ( - str) – The JavaScript object literal, represented either as a- stror as a filename which contains the JS object literal.
- allow_snake_case ( - bool) – If- True, interprets- snake_casekeys as equivalent to- camelCasekeys. Defaults to- True.
- _break_loop_on_failure ( - bool) – If- True, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults to- False.
 
- Returns:
- A Python object representation of the Highcharts JavaScript object literal. 
- Return type:
- HighchartsMeta
 
 - classmethod from_json(as_json_or_file, allow_snake_case: bool = True)
- Construct an instance of the class from a JSON string. - Parameters:
- as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string. 
- allow_snake_case ( - bool) – If- True, interprets- snake_casekeys as equivalent to- camelCasekeys. Defaults to- True.
 
- Returns:
- A Python objcet representation of - as_json.
- Return type:
- HighchartsMeta
 
 - to_dict() dict
- Generate a - dictrepresentation of the object compatible with the Highcharts JavaScript library.- Note - The - dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
 - to_js_literal(filename=None, encoding='utf-8') str | None
- Return the object represented as a - strcontaining the JavaScript object literal.
 - to_json(filename=None, encoding='utf-8')
- Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library. - Note - This method will either return a standard - stror a- bytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be a- bytesrepresentation of the string.- Parameters:
- Returns:
- A JSON representation of the object compatible with the Highcharts library. 
- Return type:
 
 - static trim_dict(untrimmed: dict, to_json: bool = False) dict
- Remove keys from - untrimmedwhose values are- Noneand convert values that have- .to_dict()methods.
 - static trim_iterable(untrimmed, to_json=False)
- Convert any - EnforcedNullTypevalues in- untrimmedto- 'null'.
 - property border_color: str | Gradient | Pattern | None
- The color of the range’s border. Defaults to - None.
 - property color: str | Gradient | Pattern | None
- The main color of the bubble for the range. Defaults to - None.
 
class: BubbleLegendLabelOptions
- class BubbleLegendLabelOptions(**kwargs)[source]
- Options to configure the bubble legend’s labels. - Class Inheritance - copy(other=None, overwrite=True, **kwargs)
- Copy the configuration settings from this instance to the - otherinstance.- Parameters:
- other ( - HighchartsMeta) – The target instance to which the properties of this instance should be copied. If- None, will create a new instance and populate it with properties copied from- self. Defaults to- None.
- overwrite ( - bool) – if- True, properties in- otherthat are already set will be overwritten by their counterparts in- self. Defaults to- True.
- kwargs – Additional keyword arguments. Some special descendents of - HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
 
- Returns:
- A mutated version of - otherwith new property values
 
 - classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
- Construct an instance of the class from a - dictobject.
 - classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
- Return a Python object representation of a Highcharts JavaScript object literal. - Parameters:
- as_str_or_file ( - str) – The JavaScript object literal, represented either as a- stror as a filename which contains the JS object literal.
- allow_snake_case ( - bool) – If- True, interprets- snake_casekeys as equivalent to- camelCasekeys. Defaults to- True.
- _break_loop_on_failure ( - bool) – If- True, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults to- False.
 
- Returns:
- A Python object representation of the Highcharts JavaScript object literal. 
- Return type:
- HighchartsMeta
 
 - classmethod from_json(as_json_or_file, allow_snake_case: bool = True)
- Construct an instance of the class from a JSON string. - Parameters:
- as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string. 
- allow_snake_case ( - bool) – If- True, interprets- snake_casekeys as equivalent to- camelCasekeys. Defaults to- True.
 
- Returns:
- A Python objcet representation of - as_json.
- Return type:
- HighchartsMeta
 
 - to_dict() dict
- Generate a - dictrepresentation of the object compatible with the Highcharts JavaScript library.- Note - The - dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
 - to_js_literal(filename=None, encoding='utf-8') str | None
- Return the object represented as a - strcontaining the JavaScript object literal.
 - to_json(filename=None, encoding='utf-8')
- Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library. - Note - This method will either return a standard - stror a- bytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be a- bytesrepresentation of the string.- Parameters:
- Returns:
- A JSON representation of the object compatible with the Highcharts library. 
- Return type:
 
 - static trim_dict(untrimmed: dict, to_json: bool = False) dict
- Remove keys from - untrimmedwhose values are- Noneand convert values that have- .to_dict()methods.
 - static trim_iterable(untrimmed, to_json=False)
- Convert any - EnforcedNullTypevalues in- untrimmedto- 'null'.
 - property align: str | None
- The alignment of the labels relative to the bubble legend. Defaults to - 'right'.- Accepts: - 'left'
- 'center'
- 'right'
 
 - property allow_overlap: bool | None
- If - True, data labels are allowed to overlap each other.- Defaults to - False.
 - property formatter: CallbackFunction | None
- JavaScript callback function to format the bubble legend’s data labels. - Hint - In the JavaScript callback function, the - thisproperties available are:- this.value- the bubble value
- this.radius- the bubble radius
- this.center- the y position of the bubble’s center
 - Returns:
- A JavaScript callback function. 
- Return type:
- CallbackFunctionor- None