Source code for highcharts_core.utility_classes.breadcrumbs

from typing import Optional
from decimal import Decimal

from validator_collection import validators

from highcharts_core import constants, errors
from highcharts_core.decorators import class_sensitive
from highcharts_core.metaclasses import HighchartsMeta
from highcharts_core.utility_classes.events import BreadcrumbEvents
from highcharts_core.utility_classes.position import Position
from highcharts_core.utility_classes.javascript_functions import CallbackFunction


[docs]class Separator(HighchartsMeta): """Configuration object for the Breadcrumbs Separator.""" def __init__(self, **kwargs): self._style = None self._text = None self.style = kwargs.get('style', None) self.text = kwargs.get('text', None) @property def style(self) -> Optional[dict]: """CSS styles for the Breadcrumb Separator. :rtype: :class:`dict <python:dict>` """ return self._style @style.setter def style(self, value): self._style = validators.dict(value) @property def text(self) -> Optional[str]: """The text to use as the separator. Defaults to ``'/'``. :rtype: :class:`str <python:str>` or :obj:`None <python:None>` """ return self._text @text.setter def text(self, value): self._text = validators.string(value, allow_empty = True) @classmethod def _get_kwargs_from_dict(cls, as_dict): kwargs = { 'style': as_dict.get('style', None), 'text': as_dict.get('text', None), } return kwargs def _to_untrimmed_dict(self, in_cls = None) -> dict: untrimmed = { 'style': self.style, 'text': self.text } return untrimmed