|
| 1 | +# AUTO GENERATED FILE - DO NOT EDIT |
| 2 | + |
| 3 | +from dash.development.base_component import Component, _explicitize_args |
| 4 | + |
| 5 | + |
| 6 | +class Gauge(Component): |
| 7 | + """A Gauge component. |
| 8 | +A Gauge component that points to |
| 9 | +a value between some range. |
| 10 | +
|
| 11 | +Keyword arguments: |
| 12 | +- id (string; optional): The ID used to identify this compnent in Dash callbacks |
| 13 | +- value (number; optional): The value of gauge. If logarithmic, the displayed |
| 14 | +value will be the logarithm of the inputted value. |
| 15 | +- size (number; optional): The size (diameter) of the gauge in pixels |
| 16 | +- min (number; default 0): The minimum value of the gauge. If logarithmic, |
| 17 | +represents the minimum exponent. |
| 18 | +- max (number; default 10): The maximum value of the gauge. If logarithmic, |
| 19 | +represents the maximum exponent. |
| 20 | +- base (number; default 10): Base to be used in logarithmic scale. |
| 21 | +- logarithmic (boolean; optional): If set to true, a logarithmic scale will be |
| 22 | +used. |
| 23 | +- showCurrentValue (boolean; optional): If true, the current value of the gauge |
| 24 | +will be displayed |
| 25 | +- units (string; optional): Label for the current value |
| 26 | +- theme (dict; default light): Theme configuration to be set by a ThemeProvider |
| 27 | +- label (dict; optional): Description to be displayed alongside the control. To control styling, pass an object with label and style properties. label has the following type: string | dict containing keys 'style', 'label'. |
| 28 | +Those keys have the following types: |
| 29 | + - style (dict; optional) |
| 30 | + - label (string; optional) |
| 31 | +- labelPosition (a value equal to: 'top', 'bottom'; default 'top'): Where the component label is positioned. |
| 32 | +- scale (dict; optional): Configuration for the component scale. scale has the following type: dict containing keys 'start', 'interval', 'labelInterval', 'custom'. |
| 33 | +Those keys have the following types: |
| 34 | + - start (number; optional): Value to start the scale from. Defaults |
| 35 | +to min. |
| 36 | + - interval (number; optional): Interval by which the scale goes up. Attempts |
| 37 | +to dynamically divide min-max range by |
| 38 | +default. |
| 39 | + - labelInterval (number; optional): Interval by which labels are added to |
| 40 | +scale marks. Defaults to 2 (every other |
| 41 | +mark has a label). |
| 42 | + - custom (dict; optional): Custom scale marks. The key determines the position |
| 43 | +and the value determines what will show. If you want |
| 44 | +to set the style of a specific mark point, the value |
| 45 | +should be an object which contains style and label |
| 46 | +properties. custom has the following type: number | dict containing keys 'style', 'label'. |
| 47 | +Those keys have the following types: |
| 48 | + - style (string; optional) |
| 49 | + - label (string; optional) |
| 50 | +- color (dict; optional): Color configuration for the gauge's track. color has the following type: string | dict containing keys 'default', 'gradient', 'ranges'. |
| 51 | +Those keys have the following types: |
| 52 | + - default (string; optional): Color used for current value text and other minor accents |
| 53 | + - gradient (boolean; optional): Display ranges as a gradient between given colors. |
| 54 | + - ranges (dict; optional): Define multiple color ranges on the gauge's track. |
| 55 | +The key determines the color of the range and |
| 56 | +the value is the start,end of the range itself. |
| 57 | +Ranges must be contiguous along the entirety |
| 58 | +of the gauge's range of values. ranges has the following type: dict containing keys 'color'. |
| 59 | +Those keys have the following types: |
| 60 | + - color (list of numbers; optional) |
| 61 | +- className (string; optional): Class to apply to the root component element. |
| 62 | +- style (dict; optional): Style to apply to the root component element.""" |
| 63 | + @_explicitize_args |
| 64 | + def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, size=Component.UNDEFINED, min=Component.UNDEFINED, max=Component.UNDEFINED, base=Component.UNDEFINED, logarithmic=Component.UNDEFINED, showCurrentValue=Component.UNDEFINED, units=Component.UNDEFINED, theme=Component.UNDEFINED, label=Component.UNDEFINED, labelPosition=Component.UNDEFINED, scale=Component.UNDEFINED, color=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, **kwargs): |
| 65 | + self._prop_names = ['id', 'value', 'size', 'min', 'max', 'base', 'logarithmic', 'showCurrentValue', 'units', 'theme', 'label', 'labelPosition', 'scale', 'color', 'className', 'style'] |
| 66 | + self._type = 'Gauge' |
| 67 | + self._namespace = 'dash_daq' |
| 68 | + self._valid_wildcard_attributes = [] |
| 69 | + self.available_properties = ['id', 'value', 'size', 'min', 'max', 'base', 'logarithmic', 'showCurrentValue', 'units', 'theme', 'label', 'labelPosition', 'scale', 'color', 'className', 'style'] |
| 70 | + self.available_wildcard_properties = [] |
| 71 | + |
| 72 | + _explicit_args = kwargs.pop('_explicit_args') |
| 73 | + _locals = locals() |
| 74 | + _locals.update(kwargs) # For wildcard attrs |
| 75 | + args = {k: _locals[k] for k in _explicit_args if k != 'children'} |
| 76 | + |
| 77 | + for k in []: |
| 78 | + if k not in args: |
| 79 | + raise TypeError( |
| 80 | + 'Required argument `' + k + '` was not specified.') |
| 81 | + super(Gauge, self).__init__(**args) |
0 commit comments