lightningchart.charts package¶
Submodules¶
lightningchart.charts.bar_chart module¶
- class lightningchart.charts.bar_chart.BarChart(data: list[dict] = None, vertical: bool = True, axis_type: str = 'linear', axis_base: int = 10, title: str = None, theme: Themes = Themes.Light, theme_scale: float = 1.0, license: str = None, license_information: str = None, instance: Instance = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,ChartWithCursor2D,ChartsWithAddEventListener,GeneralGetMethodsChart type for visualizing categorical data as Bars.
- get_bar_color(category: str, sub_category: str | None = None) dict[source]¶
Get the fill color of a single bar (BarChart).
- Parameters:
category – Bar category name.
sub_category – Optional sub-category (for grouped/stacked bars).
- Returns:
dict with ‘color’, ‘colorHex’, ‘colorRgb’.
Notes
Call this in live mode, e.g.
chart.open(live=True)
- set_animation_category_position(enabled: bool)[source]¶
Enable/disable animation of bar category positions. This is enabled by default.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_animation_values(enabled: bool)[source]¶
Enable/disable animation of bar values. This is enabled by default.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_bar_color(category: str, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color value of a single category bar.
- Parameters:
category (str) – Category name.
color (Color) – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_bars_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color value of all bars.
- Parameters:
color – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_bars_effect(enabled: bool)[source]¶
Set theme effect enabled on component or disabled.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_bars_margin(margin: int | float)[source]¶
Set margin around each bar along category axis as percentage of the bar thickness. For example, 0.1 = on both left and right side of bar there is a 10% margin. Actual thickness of bar depends on chart size, but for 100 px bar that would be 10 px + 10 px margin. Valid value range is between [0, 0.49].
- Parameters:
margin (int | float) – Margin around each bar along category axis as percentage of bar thickness.
- Returns:
The instance of the class for fluent interface.
- set_category_axis_labels(size: int = None, family: str = None, weight: str = None, style: str = None, color: str = None, rotation: float = None, alignment: float = None, margin: int = None, shadow: str = None, tick_length: int = None, tick_style: dict = None)[source]¶
Set font of Chart category axis labels (X-axis labels in vertical bar charts).
- Parameters:
size (int | float) – CSS font size in pixels. For example, 16.
family (str, optional) – CSS font family. For example, ‘Arial, Helvetica, sans-serif’.
weight (str, optional) – CSS font weight. Options: ‘normal’, ‘bold’, ‘bolder’, ‘lighter’.
style (str, optional) – CSS font style. Options: ‘normal’, ‘italic’, ‘oblique’.
color (Color, optional) – Label text color. Default: None (uses chart theme default). Use ‘transparent’ to hide.
rotation (float, optional) – Label rotation in degrees. Positive values rotate clockwise.
alignment – Label alignment (-1 to 1)
margin – Pixels margin before label
shadow – Shadow color (hex)
tick_length – Tick line length (pixels)
tick_style – {‘thickness’: int, ‘color’: str}
- Returns:
The instance of the class for fluent interface.
Examples
Basic usage - set font size >>> chart.set_category_axis_labels(size=14)
Bold labels with custom color >>> chart.set_category_axis_labels( … size=12, … weight=’bold’, … color=’darkblue’ … )
Rotated labels for long category names >>> chart.set_category_axis_labels( … size=10, … rotation=45, … weight=’bold’ … )
Complete customization >>> chart.set_category_axis_labels( … size=16, … family=’Arial’, … style=’italic’, … weight=’bold’, … color=’#ff6600’, … rotation=30, … tick_style={ … ‘thickness’: 2, … ‘color’: ‘#0000FF’ … } … )
- set_data(data: list[dict])[source]¶
Set BarChart data, or update existing bars.
- Parameters:
data (list[dict]) – List of {category, value, color} entries. Color is optional.
- Returns:
The instance of the class for fluent interface.
- set_data_grouped(categories: list[str], data: list[dict])[source]¶
Set BarChart data, updating the visible bars. This method accepts data for a Grouped Bar Chart, displaying it as such.
- Parameters:
categories (list[str]) – List of categories as strings.
data – List of { “subCategory”: str, “values” list[int | float], “color”: str } dictionaries. Color is optional.
- Returns:
The instance of the class for fluent interface.
- set_data_stacked(categories: list[str], data: list[dict])[source]¶
Set BarChart data, updating the visible bars. This method accepts data for a Stacked Bar Chart, displaying it as such.
- Parameters:
categories (list[str]) – List of categories as strings.
data – List of { “subCategory”: str, “values” list[int | float], “color”: str } dictionaries. Color is optional.
- Returns:
The instance of the class for fluent interface.
- set_label_fitting(enabled: bool)[source]¶
Enable or disable automatic label fitting.
- Parameters:
enabled (bool) – If true, labels will not overlap.
- Returns:
The instance of the class for fluent interface.
- set_label_rotation(degrees: int)[source]¶
Rotate the category labels.
- Parameters:
degrees (int) – Degree of the label rotation.
- Returns:
The instance of the class for fluent interface.
- set_palette_colors(steps: list[dict[str, Any]], percentage_values: bool = True, interpolate: bool = True, look_up_property: str = 'y')[source]¶
Define a palette coloring for the bars.
- Parameters:
steps (list[dict]) – List of {“value”: number, “color”: Color, ‘label’: ‘Label’} dictionaries.
interpolate (bool) – Enables automatic linear interpolation between color steps.
percentage_values (bool) – Whether values represent percentages or explicit values.
look_up_property (str) – “value” | “x” | “y”
- Returns:
The instance of the class for fluent interface.
- set_series_background_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set chart series background color.
- Parameters:
color (Color) – Color of the series background. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_series_background_effect(enabled: bool = True)[source]¶
Set theme effect enabled on component or disabled.
- Parameters:
enabled (bool) – Theme effect enabled.
- Returns:
The instance of the class for fluent interface.
- set_sorting(mode: str)[source]¶
Configure automatic sorting of bars.
- Parameters:
mode – “disabled” | “ascending” | “descending” | “alphabetical”
- Returns:
The instance of the class for fluent interface.
- set_subcategory_color(category: str, subcategory: str, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color value of a single category bar.
- Parameters:
category (str) – Category name.
subcategory (str) – Subcategory name.
color (Color) – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_value_axis_labels(major_size: int | float = None, minor_size: int | float = None, family: str = None, style: str = None, weight: str = None, major_color: Color = None, minor_color: Color = None, major_rotation: float = None, minor_rotation: float = None, format_type: str = 'standard', precision: int = None, unit: str = None, scale: float = 1.0)[source]¶
Set font of value axis tick labels (Y-axis labels in vertical bar charts).
- Parameters:
major_size (int | float, optional) – Font size for major tick labels in pixels.
minor_size (int | float, optional) – Font size for minor tick labels in pixels.
family (str, optional) – CSS font family for both major and minor tick labels.
style (str, optional) – CSS font style for both major and minor tick labels.
weight (str, optional) – CSS font weight for both major and minor tick labels.
major_color (Color, optional) – Text color for major tick labels. Use ‘transparent’ or None to hide.
minor_color (Color, optional) – Text color for minor tick labels. Use ‘transparent’ or None to hide.
major_rotation (float, optional) – Rotation angle in degrees for major tick labels. Positive values rotate clockwise. Useful for long numeric formats or units.
minor_rotation (float, optional) – Rotation angle in degrees for minor tick labels.
format_type (str) – Format style: - ‘standard’: Normal number formatting (default) - ‘currency’: Currency formatting with symbol - ‘percentage’: Percentage formatting (value * 100 + %) - ‘thousands’: Compact notation (K, M, B, T) - ‘integer’: Rounded integer values
precision (int, optional) – Number of decimal places (None = auto)
unit (str, optional) – Unit to append (e.g., “kg”, “ms”, “items”)
scale (float) – Scale factor to multiply value (default: 1.0)
- Returns:
The instance of the class for fluent interface.
Examples
Different sizes for major and minor ticks >>> chart.set_value_axis_labels(major_size=12, minor_size=10)
Rotate major tick labels (useful for long numbers/units) >>> chart.set_value_axis_labels( … major_size=12, … major_rotation=45, … major_color=(‘black’) … )
Different rotations for major and minor ticks >>> chart.set_value_axis_labels( … major_size=12, … minor_size=9, … major_rotation=30, … minor_rotation=15, … major_color=’darkblue’, … minor_color=’gray’ … )
Professional look with rotated labels >>> chart.set_value_axis_labels( … major_size=12, … minor_size=9, … weight=’bold’, … major_color=’#2c3e50’, … minor_color=’#7f8c8d’, … major_rotation=0, # No rotation for major … minor_rotation=90 # Vertical minor labels … )
Rotated labels for currency or percentage values >>> chart.set_value_axis_labels( … major_size=11, … minor_size=8, … major_rotation=45, … minor_rotation=45, … major_color=’darkgreen’, … minor_color=’green’ … )
Scientific notation with rotation and formatting parameters >>> chart.set_value_axis_labels( … major_size=10, … minor_size=8, … family=’monospace’, … major_rotation=30, … minor_rotation=30, … major_color=’navy’, … minor_color=’blue’, … format_type=’standard’, … precision=2, … unit=’AA’, … scale=2 … )
- set_value_labels(enabled: bool = True, position: str = None, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None, font_size: int = None, font_family: str = None, font_weight: str = None, font_style: str = None, rotation: float = None, format_type: str = 'standard', precision: int = None, unit: str = None, scale: float = 1.0, currency_symbol: str = None, show_category: bool = False, display_stacked_sum: bool = None, display_stacked_individuals: bool = None)[source]¶
Configure how value labels are displayed in the BarChart.
- Parameters:
enabled (bool) – Whether to show value labels. If False, hides all labels.
position (str, optional) – Label position: ‘after-bar’, ‘inside-bar’, ‘inside-bar-centered’
color (Color, optional) – Label text color. Use ‘transparent’ to hide.
font_size (int, optional) – Font size in pixels
font_family (str, optional) – Font family name
font_weight (str, optional) – Font weight (‘normal’, ‘bold’)
font_style (str, optional) – Font style (‘normal’, ‘italic’)
rotation (float, optional) – Label rotation in degrees
format_type (str) – Format style: - ‘standard’: Normal number formatting (default) - ‘currency’: Currency formatting with symbol - ‘percentage’: Percentage formatting (value * 100 + %) - ‘thousands’: Compact notation (K, M, B, T) - ‘integer’: Rounded integer values
precision (int, optional) – Number of decimal places (None = auto)
unit (str, optional) – Unit to append (e.g., “kg”, “ms”, “items”)
scale (float) – Scale factor to multiply value (default: 1.0)
currency_symbol (str, optional) – Currency symbol for currency format (default: “$”)
show_category (bool) – Whether to include category name in label
display_stacked_sum (bool, optional) – Show sum labels for stacked bars
display_stacked_individuals (bool, optional) – Show individual labels for stacked bars
Examples
Rotated labels >>> chart.set_value_labels(position=’after-bar’, rotation=45, format_type=’currency’, precision=0))
Stacked bar labels >>> chart.set_value_labels(position=’inside-bar’, display_stacked_individuals=True, display_stacked_sum=True, format_type=’currency’, precision=2)
Currency formatting >>> chart.set_value_labels(format_type=’currency’, currency_symbol=’€’, precision=0)
Percentage formatting >>> chart.set_value_labels(format_type=’percentage’, precision=1)
- Returns:
The instance of the class for fluent interface.
- translate_coordinate(coordinate: dict, target: str, source: str = None)[source]¶
Translate BarChart coordinates between systems.
- Parameters:
coordinate – Dict with keys for source system
target – ‘bars’ | ‘relative’ | ‘client’
source – ‘bars’ | ‘relative’ | ‘client’ (auto-detected if None)
- Returns:
Dict with translated coordinates
Examples
>>> # Bars to relative (source auto-detected) >>> loc = chart.translate_coordinate({'iCategory': 0, 'value': 50}, target='relative', source='bars') >>> print(f"Relative: x={loc['x']}, y={loc['y']}")
>>> # Relative to bars >>> loc = chart.translate_coordinate({'x': 200, 'y': 300}, target='bars', source='relative') >>> print(f"Bars: category={loc['iCategory']}, value={loc['value']}")
>>> # Client to bars (source auto-detected) >>> loc = chart.translate_coordinate({'clientX': 500, 'clientY': 400}, target='bars') >>> print(f"Bars: category={loc['iCategory']}, value={loc['value']}")
- class lightningchart.charts.bar_chart.BarChartContainer(instance, container, column, row, colspan, rowspan, title, vertical, axis_type, axis_base, legend)[source]¶
Bases:
BarChart
- class lightningchart.charts.bar_chart.BarChartDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, vertical: bool, axis_type: str, axis_base: int, title: str = None, legend: LegendOptions | None = None)[source]¶
Bases:
BarChart
lightningchart.charts.chart_3d module¶
- class lightningchart.charts.chart_3d.Chart3D(theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,ChartWithXYZAxis,ChartWithSeries,ChartWithCursor3D,UserInteractions,ChartsWithAddEventListenerChart for visualizing data in a 3-dimensional scene, with camera and light source(s).
- add_box_series(automatic_color_index: int = None, legend: LegendOptions | None = None) BoxSeries3D[source]¶
Create Series for visualization of large sets of individually configurable 3D Boxes.
Box Series 3D accepts data of form { xCenter, yCenter, zCenter, xSize, ySize, zSize}
- Parameters:
automatic_color_index – Optional index to use for automatic coloring of series.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Box Series class.
Examples
Basic box series >>> series1 = chart3d.add_box_series()
Hidden from legend >>> series2 = chart3d.add_box_series(legend={‘show’: False})
Custom legend appearance >>> series3 = chart3d.add_box_series( … legend={ … ‘text’:”Temperature Range”, … ‘text_font’: {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#000000’, … ‘button_fill_style’: ‘#ff0000’, … ‘button_shape’: ‘Square’} … )
- add_line_series(automatic_color_index: int = None, individual_lookup_values_enabled: bool = False, legend: LegendOptions | None = None) LineSeries3D[source]¶
Method for adding a new LineSeries3D to the chart. This Series type for visualizing a collection of { x, y, z } coordinates by a continuous line stroke.
Line Series 3D accepts data of form {x,y,z} :param automatic_color_index: Optional index to use for automatic coloring of series. :param individual_lookup_values_enabled: Flag that can be used to enable data points value property on top of x, y and z. By default this is disabled. :type individual_lookup_values_enabled: bool :param legend: Legend configuration dictionary with the following options:
show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
‘Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Line Series class.
Examples
Basic line series >>> series1 = chart3d.add_line_series()
Hidden from legend >>> series2 = chart3d.add_line_series(legend={‘show’: False})
Custom legend appearance >>> series3 = chart3d.add_line_series( … legend={ … ‘text’:”Temperature Range”, … ‘text_font’: {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#000000’, … ‘button_fill_style’: ‘#ff0000’, … ‘button_shape’: ‘Square’} … )
- add_mesh_model(legend: LegendOptions | None = None) MeshModel3D[source]¶
3D Series for rendering a 3D object model within a Chart3D. Args: legend (dict): Legend configuration dictionary with the following options:
show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
‘Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Mesh Model Series class.
Examples
Basic mesh model series >>> series1 = chart3d.add_mesh_model()
Hidden from legend >>> series2 = chart3d.add_mesh_model(legend={‘show’: False})
Custom legend appearance >>> series3 = chart3d.add_mesh_model( … legend={ … ‘text’:”Temperature Range”, … ‘text_font’: {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#000000’, … ‘button_fill_style’: ‘#ff0000’, … ‘button_shape’: ‘Square’} … )
- add_point_line_series(render_2d: bool = False, automatic_color_index: int = None, individual_lookup_values_enabled: bool = False, individual_point_color_enabled: bool = False, individual_point_size_axis_enabled: bool = False, individual_point_size_enabled: bool = False, legend: LegendOptions | None = None) PointLineSeries3D[source]¶
Method for adding a new PointLineSeries3D to the chart. This Series type for visualizing a collection of { x, y, z } coordinates by a continuous line stroke and markers.
Point Line Series 3D accepts data of form {x,y,z}
- Parameters:
automatic_color_index – Optional index to use for automatic coloring of series.
render_2d (bool) – Defines the rendering type of Point Series. When true, points are rendered by 2D markers.
individual_lookup_values_enabled (bool) – Flag that can be used to enable data points value property on top of x, y and z. By default, this is disabled.
individual_point_color_enabled (bool) – Flag that can be used to enable data points color property on top of x, y and z. By default, this is disabled.
individual_point_size_axis_enabled (bool) – Flag that can be used to enable data points ‘sizeAxisX’, ‘sizeAxisY’ and ‘sizeAxisZ’ properties on top of x, y and z. By default, this is disabled.
individual_point_size_enabled (bool) – Flag that can be used to enable data points size property on top of x, y and z. By default, this is disabled.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Point Line Series class.
Examples
Basic point line series >>> series1 = chart3d.add_point_line_series()
Hidden from legend >>> series2 = chart3d.add_point_line_series(legend={‘show’: False})
Custom legend appearance >>> series3 = chart3d.add_point_line_series( … legend={ … ‘text’:”Temperature Range”, … ‘text_font’: {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#000000’, … ‘button_fill_style’: ‘#ff0000’, … ‘button_shape’: ‘Square’} … )
- add_point_series(automatic_color_index: int = None, render_2d: bool = False, individual_lookup_values_enabled: bool = False, individual_point_color_enabled: bool = False, individual_point_size_axis_enabled: bool = False, individual_point_size_enabled: bool = False, legend: LegendOptions | None = None) PointSeries3D[source]¶
Method for adding a new PointSeries3D to the chart. This series type for visualizing a collection of { x, y, z } coordinates by different markers.
Point Series 3D accepts data of form {x,y,z}
- Parameters:
automatic_color_index – Optional index to use for automatic coloring of series.
render_2d (bool) – Defines the rendering type of Point Series. When true, points are rendered by 2D markers.
individual_lookup_values_enabled (bool) – Flag that can be used to enable data points value property on top of x, y and z. By default, this is disabled.
individual_point_color_enabled (bool) – Flag that can be used to enable data points color property on top of x, y and z. By default, this is disabled.
individual_point_size_axis_enabled (bool) – Flag that can be used to enable data points ‘sizeAxisX’, ‘sizeAxisY’ and ‘sizeAxisZ’ properties on top of x, y and z. By default, this is disabled.
individual_point_size_enabled (bool) – Flag that can be used to enable data points size property on top of x, y and z. By default, this is disabled.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Point Series class.
Examples
Basic point series >>> series1 = chart3d.add_point_series()
Hidden from legend >>> series2 = chart3d.add_point_series(legend={‘show’: False})
Custom legend appearance >>> series3 = chart3d.add_point_series( … legend={ … ‘text’:”Temperature Range”, … ‘text_font’: {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#000000’, … ‘button_fill_style’: ‘#ff0000’, … ‘button_shape’: ‘Square’} … )
- add_surface_grid_series(columns: int, rows: int, data_order: str = 'columns', automatic_color_index: int = None, legend: LegendOptions | None = None) SurfaceGridSeries[source]¶
Add a Series for visualizing a Surface Grid with a static column and row count.
Surface Grid Series accepts data in the form of two-dimensional matrix of correct size that includes integers or floats.
- Parameters:
automatic_color_index – Optional index to use for automatic coloring of series.
columns (int) – Amount of cells along X axis.
rows (int) – Amount of cells along Y axis.
data_order (str) – “columns” | “rows” - Specify how to interpret surface grid values supplied by user.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Surface Grid Series class.
Examples
Basic surface grid series >>> series1 = chart3d.add_surface_grid_series(columns=3, rows=3)
Hidden from legend >>> series2 = chart3d.add_surface_grid_series(columns=3, rows=3, legend={‘show’: False})
Custom legend appearance >>> series3 = chart3d.add_surface_grid_series( … columns=3, … rows=3, … legend={ … ‘text’:”Temperature Range”, … ‘text_font’: {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#000000’, … ‘button_fill_style’: ‘#ff0000’, … ‘button_shape’: ‘Square’} … )
- add_surface_scrolling_grid_series(columns: int, rows: int, scroll_dimension: str = 'columns', automatic_color_index: int = None, legend: LegendOptions | None = None) SurfaceScrollingGridSeries[source]¶
Add a Series for visualizing a Surface Grid with API for pushing data in a scrolling manner (append new data on top of existing data).
Surface Scrolling Grid Series accepts data in the form of two-dimensional matrix of correct size that includes integers or floats.
- Parameters:
automatic_color_index – Optional index to use for automatic coloring of series.
columns (int) – Amount of cells along X axis.
rows (int) – Amount of cells along Y axis.
scroll_dimension (str) – “columns” | “rows” - Select scrolling dimension, as well as how to interpret grid matrix values supplied by user.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Surface Scrolling Grid Series class.
Examples
Basic surface scrolling grid series >>> series1 = chart3d.add_surface_scrolling_grid_series(columns=3, rows=3)
Hidden from legend >>> series2 = chart3d.add_surface_scrolling_grid_series(columns=3, rows=3, legend={‘show’: False})
Custom legend appearance >>> series3 = chart3d.add_surface_scrolling_grid_series( … columns=3, … rows=3, … legend={ … ‘text’:”Temperature Range”, … ‘text_font’: {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#000000’, … ‘button_fill_style’: ‘#ff0000’, … ‘button_shape’: ‘Square’} … )
- set_animation_zoom(enabled: bool = True)[source]¶
Set Chart3D zoom animation enabled. When enabled, zooming with mouse wheel or trackpad will include a short animation. This is enabled by default.
- Parameters:
enabled (bool) – Boolean.
- Returns:
The instance of the class for fluent interface.
- set_bounding_box(x: int | float = 1.0, y: int | float = 1.0, z: int | float = 1.0)[source]¶
Set the dimensions of the Scenes bounding box. The bounding box is a visual reference that all the data of the Chart is depicted inside. The Axes of the 3D chart are always positioned along the sides of the bounding box.
- Parameters:
x (int | float) – Relative ratio of x dimension.
y (int | float) – Relative ratio of y dimension.
z (int | float) – Relative ratio of z dimension.
- Returns:
The instance of the class for fluent interface.
- set_bounding_box_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Set style of 3D bounding box.
- Parameters:
thickness (int | float) – Thickness of the bounding box.
color (Color) – Color of the bounding box. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_camera_automatic_fitting_enabled(enabled: bool)[source]¶
Set automatic camera fitting enabled. This is enabled as the default configuration. Note that zooming in or out disables it automatically.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_camera_location(x: int, y: int, z: int)[source]¶
Set the location of camera in World Space, a coordinate system that is not tied to 3D Axes. The camera always faces (0, 0, 0) coordinate. The light source is always a set distance behind the camera.
- Parameters:
x (int) – x-coordinate in the range [1, 5]
y (int) – y-coordinate in the range [1, 5]
z (int) – z-coordinate in the range [1, 5]
- Returns:
The instance of the class for fluent interface.
- set_user_interactions(interactions=Ellipsis)[source]¶
Configure user interactions from a set of preset options.
- Parameters:
interactions (dict or None) –
None: disable all interactions
{} or no argument: restore default interactions
dict: configure specific interactions
Examples
Disable all interactions: >>> chart.set_user_interactions(None)
Restore default interactions: >>> chart.set_user_interactions() … chart.set_user_interactions({})
Disable zooming: >>> chart.set_user_interactions( … { … ‘zoom’: { … ‘wheel’: { … ‘camera’: False, … }, … }, … } … )
- translate_coordinate(coordinate: dict, target: str, source: str)[source]¶
Translate 3D coordinates between coordinate systems.
- Parameters:
coordinate – Dict with ‘x’, ‘y’, ‘z’ (axis/world)
target – ‘axis’ | ‘world’ | ‘client’ | ‘relative’
source – ‘axis’ | ‘world’
- Returns:
Dict with translated coordinates
Examples
>>> # Axis to world >>> loc = chart.translate_coordinate({'x': 10, 'y': 20, 'z': 30}, target='world', source='axis') >>> print(f"World: x={loc['x']}, y={loc['y']}, z={loc['z']}")
>>> # World to axis >>> loc = chart.translate_coordinate({'x': 0, 'y': 0, 'z': 0}, target='axis', source='world') >>> print(f"Axis: x={loc['x']}, y={loc['y']}, z={loc['z']}")
>>> # Axis to client (3D → 2D projection) >>> loc = chart.translate_coordinate({'x': 10, 'y': 20, 'z': 30}, target='client', source='axis') >>> print(f"Client: x={loc['clientX']}, y={loc['clientY']}")
>>> # World to relative (3D → 2D projection) >>> loc = chart.translate_coordinate({'x': 0, 'y': 0, 'z': 0}, target='relative', source='world') >>> print(f"Relative: x={loc['x']}, y={loc['y']}")
- class lightningchart.charts.chart_3d.Chart3DContainer(instance, container, column, row, colspan, rowspan, title, legend)[source]¶
Bases:
Chart3D
- class lightningchart.charts.chart_3d.Chart3DDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None, legend: LegendOptions | None = None)[source]¶
Bases:
Chart3DClass for Chart3D contained in Dashboard.
lightningchart.charts.chart_xy module¶
- class lightningchart.charts.chart_xy.ChartXY(theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, instance: Instance = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,ChartWithXYAxis,ChartWithSeries,ChartWithCursorXY,BackgroundChartStyle,UserInteractions,ChartsWithAddEventListener,SolveNearestMixin,GeneralGetMethodsChart type for visualizing data between two dimensions, X and Y.
- add_area_range_series(automatic_color_index: int = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) AreaRangeSeries[source]¶
Method for adding a new AreaRangeSeries to the chart. This series type is used for visualizing bands of data between two curves of data.
Area Range Series accepts data of form {position, low, high}
- Parameters:
automatic_color_index (int) – Optional index to use for automatic coloring of series.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Area Range Series class.
Examples
Basic area range series >>> series = chart.add_area_range_series()
Hidden from legend >>> series = chart.add_area_range_series(legend={‘show’: False})
Custom legend appearance >>> series = chart.add_area_range_series( … legend= … { … ‘show’: True, … ‘button_shape’: ‘Triangle’, … ‘text’: ‘Series A’, … ‘text_font’: {‘size’: 20, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#0000FF’, … } … )
- add_area_series(colors: bool = None, lookup_values: bool = None, ids: bool = None, sizes: bool = None, rotations: bool = None, schema: dict = None, strict_mode: bool = None, auto_detect_patterns: bool = False, allow_data_grouping: bool = None, allow_input_modification: bool = None, auto_sorting_enabled: bool = None, automatic_color_index: int = None, includes_nan: bool = None, warnings: bool = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) AreaSeries[source]¶
Method for adding a new AreaSeries to the chart. This series type is used for visualizing area from user-supplied curve data.
- Parameters:
colors (bool) – If true, the DataSetXY should allocate for Color property to be included for every sample. This can be used to adjust data visualization to use per sample colors. Defaults to false.
lookup_values (bool) – Flag that can be used to enable data points value property on top of x and y. Disabled by default.
ids (bool) – If true, user supplied ID property is allocated to be included for every sample. Defaults to false.
sizes (bool) – If true, user supplied individual point size properties are allocated. This means that points can have individual sizes, rather than each point having same size. Defaults to false.
rotations (bool) – If true, user supplied individual point rotation properties are allocated. This means that points can have individual rotations, rather than each point having same rotation. Defaults to false.
schema (dict) – Define data properties and their configurations:
auto (-) – bool or {‘start’: int, ‘step’: int} for auto-indexing
pattern (-) – ‘progressive’ | ‘regressive’ | None
storage (-) – TypedArray constructor name (‘Float32Array’, ‘Int32Array’, etc.)
ensureNoDuplication (-) – bool
strict_mode (bool) – Enable strict schema validation and configuration requirements.
auto_detect_patterns (bool) – Enable/disable automatic pattern detection.
allow_data_grouping – Optional flag that can be used to disable automatic grouping of progressive data that is packed very tightly together.
allow_input_modification (bool) – Allow DataSetXY to modify input arrays.
auto_sorting_enabled (bool) – Controls whether automatic sorting of data according to active data_pattern is enabled or disabled. If data_pattern is any kind of progressive pattern, then input data can be automatically sorted to remain in that progressive order. This can be useful when data is arriving in the application asynchronously, and it can’t be guaranteed that it arrives in the correct order. Please note that auto sorting only sorts by BATCH, not by SAMPLE. For example, if you supply batches of for example 10 samples at a time, auto sorting is capable of identifying the scenario where a newer batch arrives before one that should be displayed first. However, auto sorting is not capable of sorting any samples that are in wrong order within a BATCH. This is intentional due to effects on performance, and since its not a realistic need scenario. Defaults to true.
automatic_color_index (int) – Optional index to use for automatic coloring of series.
includes_nan – Optional flag that can be used to inform that data set will not include NaN values. By default, it is assumed that the data provided might include NaN values. This results in extra processing to properly handle NaN values.
warnings (bool) – Enable/disable data set warnings.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Area Series class.
Examples: Basic series (shows in legend by default)
>>> series = chart.add_area_series()
- Custom series
>>> series = chart.add_area_series( ... sizes=True, ... rotations=True, ... lookup_values=True, ... colors=True ... )
- Custom auto-indexing with start/step
>>> series = chart.add_area_series( ... schema={ ... 'time': {'auto': {'start': 1000, 'step': 5}}, ... 'temperature': {} ... } ... ) ... series.set_data_mapping({'x': 'time', 'y': 'temperature'}) ... series.append_samples(samples={'temperature': y_values})
- Progressive data pattern
>>> series = chart.add_area_series( ... schema={ ... 'timestamps': {'pattern': 'progressive'}, ... 'values': {'pattern': None} ... } ... ) ... series.set_data_mapping({'x': 'timestamps', 'y': 'values'}) ... series.append_samples(samples={'timestamps': x_values, 'values': y_values})
- Hidden from legend
>>> series = chart.add_area_series(legend={'show': False})
- Custom legend appearance
>>> series = chart.add_area_series( ... legend= ... { ... 'show': True, ... 'button_shape': 'Triangle', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... 'text_fill_style': '#0000FF', ... } ... )
- add_box_series(automatic_color_index: int = None, dimension_strategy: str = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) BoxSeries[source]¶
- Parameters:
automatic_color_index (int) – Optional index to use for automatic coloring of series.
dimension_strategy – DimensionStrategy Strategy used for selecting between vertical and horizontal Box Series.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Box Series class.
Examples
Basic box series >>> series = chart.add_box_series()
Hidden from legend >>> series = chart.add_box_series(legend={‘show’: False})
Horizontal box series >>> series = chart.add_box_series(dimension_strategy=’horizontal’)
Custom legend appearance >>> series = chart.add_box_series( … legend= … { … ‘show’: True, … ‘button_shape’: ‘Triangle’, … ‘text’: ‘Series A’, … ‘text_font’: {‘size’: 20, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#0000FF’, … } … )
- add_ellipse_series(automatic_color_index: int = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) EllipseSeries[source]¶
Add an EllipseSeries to the Chart
- Parameters:
automatic_color_index (int) – Optional index to use for automatic coloring of series.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Ellipse Series class.
Examples
Basic ellipse series >>> series = chart.add_ellipse_series()
Hidden from legend >>> series = chart.add_ellipse_series(legend={‘show’: False})
Custom legend appearance >>> series = chart.add_ellipse_series( … legend= … { … ‘show’: True, … ‘button_shape’: ‘Triangle’, … ‘text’: ‘Series A’, … ‘text_font’: {‘size’: 20, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#0000FF’, … } … )
- add_heatmap_grid_series(columns: int, rows: int, data_order: str = 'columns', automatic_color_index: int = None, heatmap_data_type: str = 'intensity', axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, max_tile_size: int = None, legend: LegendOptions | None = None) HeatmapGridSeries[source]¶
Add a Series for visualizing a Heatmap Grid with a static column and grid count.
Heatmap Grid Series accepts data in the form of two-dimensional matrix of correct size that includes integers or floats.
- Parameters:
columns (int) – Amount of columns (values on X Axis).
rows (int) – Amount of rows (values on Y Axis).
data_order (str) – “columns” | “rows” - Specify how to interpret grid matrix values supplied by user.
automatic_color_index (int) – Optional index to use for automatic coloring of series.
heatmap_data_type (str) – Selection of format in which heatmap values are supplied. ‘intensity’ | numeric value that can be colored with an associated color look up table. Defaults to ‘intensity’.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
max_tile_size (int) – Defaults to 2048. Can be overridden for case specific optimizations, where your heatmap is larger than 2048 in one dimension and you are providing all the heatmap data as single TypedArray.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Heatmap Grid Series class.
Examples
Basic heatmap grid series >>> series = chart.add_heatmap_grid_series(columns=2, rows=2)
Hidden from legend >>> series = chart.add_heatmap_grid_series(columns=2, rows=2, legend={‘show’: False})
Custom legend appearance >>> series = chart.add_heatmap_grid_series( … columns=2, … rows=2, … legend= … { … ‘show’: True, … ‘button_shape’: ‘Triangle’, … ‘text’: ‘Series A’, … ‘text_font’: {‘size’: 20, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#0000FF’, … } … )
- add_heatmap_scrolling_grid_series(resolution: int, scroll_dimension: str = 'columns', automatic_color_index: int = None, heatmap_data_type: str = 'intensity', axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) HeatmapScrollingGridSeries[source]¶
Add a Series for visualizing a Heatmap Grid, with API for pushing data in a scrolling manner (append new data on top of existing data).
Heatmap Scrolling Grid Series accepts data in the form of two-dimensional matrix of correct size that includes integers or floats.
- Parameters:
resolution (int) – Static amount of columns (cells on X Axis) OR rows (cells on Y Axis).
scroll_dimension (str) – “columns” | “rows” - Select scrolling dimension, as well as how to interpret grid matrix values supplied by user.
automatic_color_index (int) – Optional index to use for automatic coloring of series.
heatmap_data_type (str) – Selection of format in which heatmap values are supplied. ‘intensity’ | numeric value that can be colored with an associated color look up table. Defaults to ‘intensity’.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Heatmap Scrolling Grid Series class.
- add_line_series(colors: bool = None, lookup_values: bool = None, ids: bool = None, sizes: bool = None, rotations: bool = None, schema: dict = None, strict_mode: bool = None, auto_detect_patterns: bool = False, allow_data_grouping: bool = None, allow_input_modification: bool = None, auto_sorting_enabled: bool = None, automatic_color_index: int = None, includes_nan: bool = None, warnings: bool = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) LineSeries[source]¶
Method for adding a new LineSeries to the chart. This series type visualizes a list of Points (pair of X and Y coordinates), with a continuous stroke.
- Parameters:
colors (bool) – If true, the DataSetXY should allocate for Color property to be included for every sample. This can be used to adjust data visualization to use per sample colors. Defaults to false.
lookup_values (bool) – Flag that can be used to enable data points value property on top of x and y. Disabled by default.
ids (bool) – If true, user supplied ID property is allocated to be included for every sample. Defaults to false.
sizes (bool) – If true, user supplied individual point size properties are allocated. This means that points can have individual sizes, rather than each point having same size. Defaults to false.
rotations (bool) – If true, user supplied individual point rotation properties are allocated. This means that points can have individual rotations, rather than each point having same rotation. Defaults to false.
schema (dict) – Define data properties and their configurations:
auto (-) – bool or {‘start’: int, ‘step’: int} for auto-indexing
pattern (-) – ‘progressive’ | ‘regressive’ | None
storage (-) – TypedArray constructor name (‘Float32Array’, ‘Int32Array’, etc.)
ensureNoDuplication (-) – bool
strict_mode (bool) – Enable strict schema validation and configuration requirements.
auto_detect_patterns (bool) – Enable/disable automatic pattern detection.
allow_data_grouping – Optional flag that can be used to disable automatic grouping of progressive data that is packed very tightly together.
allow_input_modification (bool) – Allow DataSetXY to modify input arrays.
auto_sorting_enabled (bool) – Controls whether automatic sorting of data according to active data_pattern is enabled or disabled. If data_pattern is any kind of progressive pattern, then input data can be automatically sorted to remain in that progressive order. This can be useful when data is arriving in the application asynchronously, and it can’t be guaranteed that it arrives in the correct order. Please note that auto sorting only sorts by BATCH, not by SAMPLE. For example, if you supply batches of for example 10 samples at a time, auto sorting is capable of identifying the scenario where a newer batch arrives before one that should be displayed first. However, auto sorting is not capable of sorting any samples that are in wrong order within a BATCH. This is intentional due to effects on performance, and since its not a realistic need scenario. Defaults to true.
automatic_color_index (int) – Optional index to use for automatic coloring of series.
includes_nan – Optional flag that can be used to inform that data set will not include NaN values. By default, it is assumed that the data provided might include NaN values. This results in extra processing to properly handle NaN values.
warnings (bool) – Enable/disable data set warnings.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Line Series class.
Examples: Basic series (shows in legend by default)
>>> series = chart.add_line_series()
- Custom series
>>> series = chart.add_line_series( ... sizes=True, ... rotations=True, ... lookup_values=True, ... colors=True ... )
- Custom auto-indexing with start/step
>>> series = chart.add_line_series( ... schema={ ... 'time': {'auto': {'start': 1000, 'step': 5}}, ... 'temperature': {} ... } ... ) ... series.set_data_mapping({'x': 'time', 'y': 'temperature'}) ... series.append_samples(samples={'temperature': y_values})
- Progressive data pattern
>>> series = chart.add_line_series( ... schema={ ... 'timestamps': {'pattern': 'progressive'}, ... 'values': {'pattern': None} ... } ... ) ... series.set_data_mapping({'x': 'timestamps', 'y': 'values'}) ... series.append_samples(samples={'timestamps': x_values, 'values': y_values})
- Hidden from legend
>>> series = chart.add_line_series(legend={'show': False})
- Custom legend appearance
>>> series = chart.add_line_series( ... legend= ... { ... 'show': True, ... 'button_shape': 'Triangle', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... 'text_fill_style': '#0000FF', ... } ... )
- add_point_line_series(colors: bool = None, lookup_values: bool = None, ids: bool = None, sizes: bool = None, rotations: bool = None, schema: dict = None, strict_mode: bool = None, auto_detect_patterns: bool = False, allow_data_grouping: bool = None, allow_input_modification: bool = None, auto_sorting_enabled: bool = None, automatic_color_index: int = None, includes_nan: bool = None, warnings: bool = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) PointLineSeries[source]¶
Method for adding a new PointLineSeries to the chart. This series type visualizes a list of Points (pair of X and Y coordinates), with a continuous stroke and configurable markers over each coordinate.
- Parameters:
colors (bool) – If true, the DataSetXY should allocate for Color property to be included for every sample. This can be used to adjust data visualization to use per sample colors. Defaults to false.
lookup_values (bool) – Flag that can be used to enable data points value property on top of x and y. Disabled by default.
ids (bool) – If true, user supplied ID property is allocated to be included for every sample. Defaults to false.
sizes (bool) – If true, user supplied individual point size properties are allocated. This means that points can have individual sizes, rather than each point having same size. Defaults to false.
rotations (bool) – If true, user supplied individual point rotation properties are allocated. This means that points can have individual rotations, rather than each point having same rotation. Defaults to false.
schema (dict) – Define data properties and their configurations:
auto (-) – bool or {‘start’: int, ‘step’: int} for auto-indexing
pattern (-) – ‘progressive’ | ‘regressive’ | None
storage (-) – TypedArray constructor name (‘Float32Array’, ‘Int32Array’, etc.)
ensureNoDuplication (-) – bool
strict_mode (bool) – Enable strict schema validation and configuration requirements.
auto_detect_patterns (bool) – Enable/disable automatic pattern detection.
allow_data_grouping – Optional flag that can be used to disable automatic grouping of progressive data that is packed very tightly together.
allow_input_modification (bool) – Allow DataSetXY to modify input arrays.
auto_sorting_enabled (bool) – Controls whether automatic sorting of data according to active data_pattern is enabled or disabled. If data_pattern is any kind of progressive pattern, then input data can be automatically sorted to remain in that progressive order. This can be useful when data is arriving in the application asynchronously, and it can’t be guaranteed that it arrives in the correct order. Please note that auto sorting only sorts by BATCH, not by SAMPLE. For example, if you supply batches of for example 10 samples at a time, auto sorting is capable of identifying the scenario where a newer batch arrives before one that should be displayed first. However, auto sorting is not capable of sorting any samples that are in wrong order within a BATCH. This is intentional due to effects on performance, and since its not a realistic need scenario. Defaults to true.
automatic_color_index (int) – Optional index to use for automatic coloring of series.
includes_nan – Optional flag that can be used to inform that data set will not include NaN values. By default, it is assumed that the data provided might include NaN values. This results in extra processing to properly handle NaN values.
warnings (bool) – Enable/disable data set warnings.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Point Line Series class.
Examples: Basic series (shows in legend by default)
>>> series = chart.add_point_line_series()
- Custom series
>>> series = chart.add_point_line_series( ... sizes=True, ... rotations=True, ... lookup_values=True, ... colors=True ... )
- Custom auto-indexing with start/step
>>> series = chart.add_point_line_series( ... schema={ ... 'time': {'auto': {'start': 1000, 'step': 5}}, ... 'temperature': {} ... } ... ) ... series.set_data_mapping({'x': 'time', 'y': 'temperature'}) ... series.append_samples(samples={'temperature': y_values})
- Progressive data pattern
>>> series = chart.add_point_line_series( ... schema={ ... 'timestamps': {'pattern': 'progressive'}, ... 'values': {'pattern': None} ... } ... ) ... series.set_data_mapping({'x': 'timestamps', 'y': 'values'}) ... series.append_samples(samples={'timestamps': x_values, 'values': y_values})
- Custom series
>>> series = chart.add_point_line_series( ... legend= ... { ... 'show': True, ... 'button_shape': 'Triangle', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... 'text_fill_style': '#0000FF', ... } ... )
- add_point_series(colors: bool = None, lookup_values: bool = None, ids: bool = None, sizes: bool = None, rotations: bool = None, schema: dict = None, strict_mode: bool = None, auto_detect_patterns: bool = False, allow_data_grouping: bool = None, allow_input_modification: bool = None, auto_sorting_enabled: bool = None, automatic_color_index: int = None, includes_nan: bool = None, warnings: bool = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) PointSeries[source]¶
Method for adding a new PointSeries to the chart. This series type visualizes a list of Points (pair of X and Y coordinates), with configurable markers over each coordinate.
- Parameters:
colors (bool) – If true, the DataSetXY should allocate for Color property to be included for every sample. This can be used to adjust data visualization to use per sample colors. Defaults to false.
lookup_values (bool) – Flag that can be used to enable data points value property on top of x and y. Disabled by default.
ids (bool) – If true, user supplied ID property is allocated to be included for every sample. Defaults to false.
sizes (bool) – If true, user supplied individual point size properties are allocated. This means that points can have individual sizes, rather than each point having same size. Defaults to false.
rotations (bool) – If true, user supplied individual point rotation properties are allocated. This means that points can have individual rotations, rather than each point having same rotation. Defaults to false.
schema (dict) – Define data properties and their configurations:
auto (-) – bool or {‘start’: int, ‘step’: int} for auto-indexing
pattern (-) – ‘progressive’ | ‘regressive’ | None
storage (-) – TypedArray constructor name (‘Float32Array’, ‘Int32Array’, etc.)
ensureNoDuplication (-) – bool
strict_mode (bool) – Enable strict schema validation and configuration requirements.
auto_detect_patterns (bool) – Enable/disable automatic pattern detection.
allow_data_grouping – Optional flag that can be used to disable automatic grouping of progressive data that is packed very tightly together.
allow_input_modification (bool) – Allow DataSetXY to modify input arrays.
auto_sorting_enabled (bool) – Controls whether automatic sorting of data according to active data_pattern is enabled or disabled. If data_pattern is any kind of progressive pattern, then input data can be automatically sorted to remain in that progressive order. This can be useful when data is arriving in the application asynchronously, and it can’t be guaranteed that it arrives in the correct order. Please note that auto sorting only sorts by BATCH, not by SAMPLE. For example, if you supply batches of for example 10 samples at a time, auto sorting is capable of identifying the scenario where a newer batch arrives before one that should be displayed first. However, auto sorting is not capable of sorting any samples that are in wrong order within a BATCH. This is intentional due to effects on performance, and since its not a realistic need scenario. Defaults to true.
automatic_color_index (int) – Optional index to use for automatic coloring of series.
includes_nan – Optional flag that can be used to inform that data set will not include NaN values. By default, it is assumed that the data provided might include NaN values. This results in extra processing to properly handle NaN values.
warnings (bool) – Enable/disable data set warnings.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Point Series class.
Examples
Hidden from legend >>> series = chart.add_point_series(legend={‘show’: False})
Custom series >>> series = chart.add_point_series( … sizes=True, … rotations=True, … lookup_values=True, … colors=True … ).set_individual_point_color_enabled(True)
Custom auto-indexing with start/step >>> series = chart.add_point_series( … schema={ … ‘time’: {‘auto’: {‘start’: 1000, ‘step’: 5}}, … ‘temperature’: {} … } … ) … series.set_data_mapping({‘x’: ‘time’, ‘y’: ‘temperature’}) … series.append_samples(samples={‘temperature’: y_values})
Progressive data pattern >>> series = chart.add_point_series( … schema={ … ‘timestamps’: {‘pattern’: ‘progressive’}, … ‘values’: {‘pattern’: None} … } … ) … series.set_data_mapping({‘x’: ‘timestamps’, ‘y’: ‘values’}) … series.append_samples(samples={‘timestamps’: x_values, ‘values’: y_values})
Custom legend appearance >>> series = chart.add_point_series( … legend= … { … ‘show’: True, … ‘button_shape’: ‘Triangle’, … ‘text’: ‘Series A’, … ‘text_font’: {‘size’: 20, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#0000FF’, … } … )
- add_polygon_series(automatic_color_index: int = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) PolygonSeries[source]¶
Add an PolygonSeries to the Chart.
- Parameters:
automatic_color_index (int) – Optional index to use for automatic coloring of series.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Polygon Series class.
Examples
Basic polygon series >>> series = chart.add_polygon_series()
Hidden from legend >>> series = chart.add_polygon_series(legend={‘show’: False})
Custom legend appearance >>> series = chart.add_polygon_series( … legend= … { … ‘show’: True, … ‘button_shape’: ‘Triangle’, … ‘text’: ‘Series A’, … ‘text_font’: {‘size’: 20, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#0000FF’, … } … )
- add_rectangle_series(automatic_color_index: int = None, solve_plane: str = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) RectangleSeries[source]¶
Add an RectangleSeries to the Chart. :param automatic_color_index: Optional index to use for automatic coloring of series. :type automatic_color_index: int :param solve_plane: Option to specify cursor / solve nearest behavior. Whether it should consider only X plane, only Y plane or both.
Auto-selected by default based on rectangle dimensions.
- Parameters:
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Rectangle Series class.
Examples
Basic rectangle series >>> series = chart.add_rectangle_series()
Hidden from legend >>> series = chart.add_rectangle_series(legend={‘show’: False})
Custom legend appearance >>> series = chart.add_rectangle_series( … legend= … { … ‘show’: True, … ‘button_shape’: ‘Triangle’, … ‘text’: ‘Series A’, … ‘text_font’: {‘size’: 20, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#0000FF’, … } … )
- add_segment_series(automatic_color_index: int = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) SegmentSeries[source]¶
Add an SegmentSeries to the Chart.
- Parameters:
automatic_color_index (int) – Optional index to use for automatic coloring of series.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Segment Series class.
Examples
Basic segment series >>> series = chart.add_segment_series()
Hidden from legend >>> series = chart.add_segment_series(legend={‘show’: False})
Custom legend appearance >>> series = chart.add_segment_series( … legend= … { … ‘show’: True, … ‘button_shape’: ‘Triangle’, … ‘text’: ‘Series A’, … ‘text_font’: {‘size’: 20, ‘weight’: ‘bold’}, … ‘text_fill_style’: ‘#0000FF’, … } … )
- add_spline_series(resolution: int | float = 20, colors: bool = None, lookup_values: bool = None, ids: bool = None, sizes: bool = None, rotations: bool = None, schema: dict = None, strict_mode: bool = None, auto_detect_patterns: bool = False, allow_data_grouping: bool = None, allow_input_modification: bool = None, auto_sorting_enabled: bool = None, automatic_color_index: int = None, includes_nan: bool = None, warnings: bool = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) SplineSeries[source]¶
Method for adding a new SplineSeries to the chart. This series type visualizes a list of Points (pair of X and Y coordinates), with a smoothed curve stroke + point markers over each data point.
- Parameters:
resolution (int | float) – Number of interpolated coordinates between two real data points.
colors (bool) – If true, the DataSetXY should allocate for Color property to be included for every sample. This can be used to adjust data visualization to use per sample colors. Defaults to false.
lookup_values (bool) – Flag that can be used to enable data points value property on top of x and y. Disabled by default.
ids (bool) – If true, user supplied ID property is allocated to be included for every sample. Defaults to false.
sizes (bool) – If true, user supplied individual point size properties are allocated. This means that points can have individual sizes, rather than each point having same size. Defaults to false.
rotations (bool) – If true, user supplied individual point rotation properties are allocated. This means that points can have individual rotations, rather than each point having same rotation. Defaults to false.
schema (dict) – Define data properties and their configurations:
auto (-) – bool or {‘start’: int, ‘step’: int} for auto-indexing
pattern (-) – ‘progressive’ | ‘regressive’ | None
storage (-) – TypedArray constructor name (‘Float32Array’, ‘Int32Array’, etc.)
ensureNoDuplication (-) – bool
strict_mode (bool) – Enable strict schema validation and configuration requirements.
auto_detect_patterns (bool) – Enable/disable automatic pattern detection.
allow_data_grouping – Optional flag that can be used to disable automatic grouping of progressive data that is packed very tightly together.
allow_input_modification (bool) – Allow DataSetXY to modify input arrays.
auto_sorting_enabled (bool) – Controls whether automatic sorting of data according to active data_pattern is enabled or disabled. If data_pattern is any kind of progressive pattern, then input data can be automatically sorted to remain in that progressive order. This can be useful when data is arriving in the application asynchronously, and it can’t be guaranteed that it arrives in the correct order. Please note that auto sorting only sorts by BATCH, not by SAMPLE. For example, if you supply batches of for example 10 samples at a time, auto sorting is capable of identifying the scenario where a newer batch arrives before one that should be displayed first. However, auto sorting is not capable of sorting any samples that are in wrong order within a BATCH. This is intentional due to effects on performance, and since its not a realistic need scenario. Defaults to true.
automatic_color_index (int) – Optional index to use for automatic coloring of series.
includes_nan – Optional flag that can be used to inform that data set will not include NaN values. By default, it is assumed that the data provided might include NaN values. This results in extra processing to properly handle NaN values.
warnings (bool) – Enable/disable data set warnings.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Spline Series class.
Examples: Basic series (shows in legend by default)
>>> series = chart.add_spline_series()
- Custom series
>>> series = chart.add_spline_series( ... sizes=True, ... rotations=True, ... lookup_values=True, ... colors=True ... )
- Custom auto-indexing with start/step
>>> series = chart.add_spline_series( ... schema={ ... 'time': {'auto': {'start': 1000, 'step': 5}}, ... 'temperature': {} ... } ... ) ... series.set_data_mapping({'x': 'time', 'y': 'temperature'}) ... series.append_samples(samples={'temperature': y_values})
- Progressive data pattern
>>> series = chart.add_spline_series( ... schema={ ... 'timestamps': {'pattern': 'progressive'}, ... 'values': {'pattern': None} ... } ... ) ... series.set_data_mapping({'x': 'timestamps', 'y': 'values'}) ... series.append_samples(samples={'timestamps': x_values, 'values': y_values})
- Hidden from legend
>>> series = chart.add_spline_series(legend={'show': False})
- Custom legend appearance
>>> series = chart.add_spline_series( ... legend= ... { ... 'show': True, ... 'button_shape': 'Triangle', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... 'text_fill_style': '#0000FF', ... } ... )
- add_step_series(step_mode: str = 'middle', colors: bool = None, lookup_values: bool = None, ids: bool = None, sizes: bool = None, rotations: bool = None, schema: dict = None, strict_mode: bool = None, auto_detect_patterns: bool = False, allow_data_grouping: bool = None, allow_input_modification: bool = None, auto_sorting_enabled: bool = None, automatic_color_index: int = None, includes_nan: bool = None, warnings: bool = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) StepSeries[source]¶
Method for adding a new StepSeries to the chart. This series type visualizes a list of Points (pair of X and Y coordinates), with a stepped stroke + point markers over each data point.
- Parameters:
step_mode (str) – “after” | “before” | “middle”
colors (bool) – If true, the DataSetXY should allocate for Color property to be included for every sample. This can be used to adjust data visualization to use per sample colors. Defaults to false.
lookup_values (bool) – Flag that can be used to enable data points value property on top of x and y. Disabled by default.
ids (bool) – If true, user supplied ID property is allocated to be included for every sample. Defaults to false.
sizes (bool) – If true, user supplied individual point size properties are allocated. This means that points can have individual sizes, rather than each point having same size. Defaults to false.
rotations (bool) – If true, user supplied individual point rotation properties are allocated. This means that points can have individual rotations, rather than each point having same rotation. Defaults to false.
schema (dict) – Define data properties and their configurations:
auto (-) – bool or {‘start’: int, ‘step’: int} for auto-indexing
pattern (-) – ‘progressive’ | ‘regressive’ | None
storage (-) – TypedArray constructor name (‘Float32Array’, ‘Int32Array’, etc.)
ensureNoDuplication (-) – bool
strict_mode (bool) – Enable strict schema validation and configuration requirements.
auto_detect_patterns (bool) – Enable/disable automatic pattern detection.
allow_data_grouping – Optional flag that can be used to disable automatic grouping of progressive data that is packed very tightly together.
allow_input_modification (bool) – Allow DataSetXY to modify input arrays.
auto_sorting_enabled (bool) – Controls whether automatic sorting of data according to active data_pattern is enabled or disabled. If data_pattern is any kind of progressive pattern, then input data can be automatically sorted to remain in that progressive order. This can be useful when data is arriving in the application asynchronously, and it can’t be guaranteed that it arrives in the correct order. Please note that auto sorting only sorts by BATCH, not by SAMPLE. For example, if you supply batches of for example 10 samples at a time, auto sorting is capable of identifying the scenario where a newer batch arrives before one that should be displayed first. However, auto sorting is not capable of sorting any samples that are in wrong order within a BATCH. This is intentional due to effects on performance, and since its not a realistic need scenario. Defaults to true.
automatic_color_index (int) – Optional index to use for automatic coloring of series.
includes_nan – Optional flag that can be used to inform that data set will not include NaN values. By default, it is assumed that the data provided might include NaN values. This results in extra processing to properly handle NaN values.
warnings (bool) – Enable/disable data set warnings.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Step Series class.
Examples: Basic series (shows in legend by default)
>>> series = chart.add_step_series()
- Custom series
>>> series = chart.add_step_series( ... sizes=True, ... rotations=True, ... lookup_values=True, ... colors=True ... )
- Custom auto-indexing with start/step
>>> series = chart.add_step_series( ... schema={ ... 'time': {'auto': {'start': 1000, 'step': 5}}, ... 'temperature': {} ... } ... ) ... series.set_data_mapping({'x': 'time', 'y': 'temperature'}) ... series.append_samples(samples={'temperature': y_values})
- Progressive data pattern
>>> series = chart.add_step_series( ... schema={ ... 'timestamps': {'pattern': 'progressive'}, ... 'values': {'pattern': None} ... } ... ) ... series.set_data_mapping({'x': 'timestamps', 'y': 'values'}) ... series.append_samples(samples={'timestamps': x_values, 'values': y_values})
- Hidden from legend
>>> series = chart.add_step_series(legend={'show': False})
- Custom legend appearance
>>> series = chart.add_step_series( ... legend= ... { ... 'show': True, ... 'button_shape': 'Triangle', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... 'text_fill_style': '#0000FF', ... } ... )
- add_text_series(automatic_color_index: int = None, axis_x: Axis = None, axis_y: Axis = None, x_axis: Axis = None, y_axis: Axis = None, legend: LegendOptions | None = None) TextSeries[source]¶
Add a TextSeries to the Chart for displaying individual text objects.
- Parameters:
automatic_color_index (int) – Optional index to use for automatic coloring of series.
axis_x (Axis) – Optional non-default X Axis to attach series to.
axis_y (Axis) – Optional non-default Y Axis to attach series to.
x_axis (Axis) – Deprecated, use axis_x.
y_axis (Axis) – Deprecated, use axis_y.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to Text Series class.
- add_x_axis(stack_index: int = None, parallel_index: int = None, opposite: bool = False, axis_type: str = None, base: int = None) Axis[source]¶
Add a new X Axis to the Chart.
- Parameters:
stack_index (int) – Axis index in same plane as the Axis direction.
parallel_index (int) – Axis index in direction parallel to axis.
opposite (bool) – Specify Axis position in chart. Default is bottom for X Axes, and left for Y Axes. Setting to true will result in the opposite side (top for X Axes, right for Y Axes).
axis_type (str) – “linear” | “linear-highPrecision” | “logarithmic”
base (int) – Specification of Logarithmic Base number (e.g. 10, 2, natural log). Defaults to 10 if omitted.
- Returns:
Reference to Axis class.
- add_y_axis(stack_index: int = None, parallel_index: int = None, opposite: bool = False, axis_type: str = None, base: int = None) Axis[source]¶
Add a new Y Axis to the Chart.
- Parameters:
stack_index (int) – Axis index in same plane as the Axis direction.
parallel_index (int) – Axis index in direction parallel to axis.
opposite (bool) – Specify Axis position in chart. Default is bottom for X Axes, and left for Y Axes. Setting to true will result in the opposite side (top for X Axes, right for Y Axes).
axis_type (str) – “linear” | “linear-highPrecision” | “logarithmic”
base (int) – Specification of Logarithmic Base number (e.g. 10, 2, natural log). Defaults to 10 if omitted.
- Returns:
Reference to Axis class.
- pan(x: int | float, y: int | float)[source]¶
Method pans axes by pixels.
- Parameters:
x (int | float) – Amount to pan X in pixels.
y (int | float) – Amount to pan Y in pixels.
- Returns:
The instance of the class for fluent interface.
- set_title_position(position: str = 'center-top')[source]¶
Set position of XY Chart title.
- Parameters:
position (str) – “right-top” | “left-top” | “right-bottom” | “left-bottom” | “center-top” | “center-bottom” | “series-center-top” | “series-right-top” | “series-left-top” | “series-center-bottom” | “series-right-bottom” | “series-left-bottom”
- Returns:
The instance of the class for fluent interface.
- set_user_interactions(interactions=Ellipsis)[source]¶
Configure user interactions from a set of preset options for XY charts.
- Parameters:
interactions (dict or None) –
None: disable all interactions
{} or no argument: restore default interactions
dict: configure specific interactions
- Returns:
Reference to the chart object for method chaining.
- Return type:
Examples
# Disable all interactions: >>> chart.set_user_interactions(None)
# Restore default interactions: >>> chart.set_user_interactions() … chart.set_user_interactions({})
# Configure specific interactions: >>> chart.set_user_interactions({ … ‘pan’: { … ‘lmb’: {‘drag’: True}, … ‘rmb’: False, … }, … ‘rectangleZoom’: { … ‘lmb’: False, … ‘rmb’: {‘drag’: True}, … }, … })
- swap_axes(axis1, axis2)[source]¶
Swap the positions of two axes.
Only supports swapping between same planes (two X axes or two Y axes). Does not support swapping between different ‘opposite’ modes.
- Parameters:
axis1 – First axis to swap.
axis2 – Second axis to swap.
- Returns:
The instance of the class for fluent interface.
Examples
>>> y_axis_1 = chart.get_default_y_axis() >>> y_axis_2 = chart.add_y_axis(stack_index=1) >>> chart.swap_axes(y_axis_1, y_axis_2)
- translate_coordinate(coordinate: dict, target: str, source: str)[source]¶
Translate coordinates between coordinate systems.
- Parameters:
coordinate – Dict with ‘x’/’y’ (axis/relative) or ‘clientX’/’clientY’ (client)
target – ‘axis’ | ‘relative’ | ‘client’
source – ‘axis’ | ‘relative’ | ‘client’
- Returns:
Dict with translated coordinates
Examples
>>> # Client to axis >>> loc = chart.translate_coordinate({'clientX': 500, 'clientY': 300}, target='axis', source='client') >>> print(f"Axis: x={loc['x']}, y={loc['y']}")
>>> # Axis to relative >>> loc = chart.translate_coordinate({'x': 50, 'y': 100}, target='relative', source='axis') >>> print(f"Relative: x={loc['x']}, y={loc['y']}")
>>> # Relative to client >>> loc = chart.translate_coordinate({'x': 400, 'y': 300}, target='client', source='relative') >>> print(f"Client: x={loc['clientX']}, y={loc['clientY']}")
>>> # Client to relative >>> loc = chart.translate_coordinate({'clientX': 100, 'clientY': 200}, target='relative', source='client') >>> print(f"Relative: x={loc['x']}, y={loc['y']}")
- zoom(location: tuple[int, int], amount: tuple[int, int])[source]¶
Zoom axes around a location by pixel amounts.
- Parameters:
location (tuple[int, int]) – Origin location for zooming as viewport pixels
amount (tuple[int, int]) – Amount to zoom X/Y in pixels
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.chart_xy.ChartXYContainer(instance, container, column, row, colspan, rowspan, title, legend)[source]¶
Bases:
ChartXY
- class lightningchart.charts.chart_xy.ChartXYDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None, legend: LegendOptions | None = None)[source]¶
Bases:
ChartXYClass for ChartXY contained in Dashboard.
lightningchart.charts.dashboard module¶
- class lightningchart.charts.dashboard.Dashboard(columns: int, rows: int, theme: Themes = Themes.Light, theme_scale: float = 1.0, license: str = None, license_information: str = None)[source]¶
Bases:
GeneralMethods,ChartsWithCoordinateTransformsDashboard is a tool for rendering multiple charts in the same view.
- BarChart(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, vertical: bool = True, axis_type: str = 'linear', axis_base: int = 10, legend: LegendOptions | None = None) BarChartDashboard[source]¶
Create a Bar Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
vertical (bool) – If true, bars are aligned vertically. If false, bars are aligned horizontally.
axis_type (str) – “linear” | “logarithmic”
axis_base (int) – Specification of Logarithmic Base number (e.g. 10, 2, natural log).
legend –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Chart3D(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, legend: LegendOptions | None = None) Chart3DDashboard[source]¶
Create a 3D chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to the 3D Chart.
- ChartXY(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, legend: LegendOptions | None = None) ChartXYDashboard[source]¶
Create a XY Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to the XY Chart.
- DataGrid(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None) DataGridDashboard[source]¶
Create a DataGrid on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart spans (grid width). Default = 1.
row_span (int) – How many rows the chart spans (grid height). Default = 1.
title (str) – The title of the grid.
- Returns:
Reference to the DataGrid
- FunnelChart(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, slice_mode: str = 'height', labels_inside: bool = False, legend: LegendOptions | None = None) FunnelChartDashboard[source]¶
Create a Funnel Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
slice_mode – “width” | “height”
labels_inside – If True, labels are placed inside slices. If False, labels are on sides (default).
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to the Funnel Chart.
- GaugeChart(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None) GaugeChartDashboard[source]¶
Create a Gauge Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
- Returns:
Reference to the Gauge Chart.
- LegendPanel(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, legend: LegendOptions | None = None) LegendPanelDashboard[source]¶
Create a legend panel on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
LegendPanel instance
- MapChart(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, map_type: str = 'World', legend: LegendOptions | None = None) MapChartDashboard[source]¶
Create a Map Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
map_type (str) – “Africa” | “Asia” | “Australia” | “Canada” | “Europe” | “NorthAmerica” | “SouthAmerica” | “USA” | “World”.
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to the Map Chart
- ParallelCoordinateChart(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, legend: LegendOptions | None = None) ParallelCoordinateChartDashboard[source]¶
Create a Parallel Coordinates Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to the Parallel Coordinates Chart
- PieChart(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, labels_inside_slices: bool = False, legend: LegendOptions | None = None) PieChartDashboard[source]¶
Create a Pie Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
labels_inside_slices (bool) – If true, the labels are inside pie slices. If false, the labels are on the sides of the slices.
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to the Pie Chart.
- PolarChart(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, legend: LegendOptions | None = None) PolarChartDashboard[source]¶
Create a Polar Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to the Polar Chart.
- PyramidChart(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, slice_mode: str = 'height', labels_inside: bool = False, legend: LegendOptions | None = None) PyramidChartDashboard[source]¶
Create a Pyramid Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
slice_mode – “width” | “height”
labels_inside – If True, labels are placed inside slices. If False, labels are on sides (default).
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to the Pyramid Chart.
- SpiderChart(column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, legend: LegendOptions | None = None) SpiderChartDashboard[source]¶
Create a Spider Chart on the dashboard.
- Parameters:
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
legend (dict) –
Legend configuration dictionary with the following options: visible (bool): Show/hide legend. position: Position (TopRight, RightCenter, etc.). title (str): Legend title text. title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Horizontal or Vertical orientation. render_on_top (bool): Render above chart (default: False). background_visible (bool): Show legend background. background_fill_style (str): Background color (“#ff0000”). background_stroke_style (dict): Border style {‘thickness’: 2, ‘color’: ‘#000’}. padding (int | dict): Padding around legend content. margin_inner (int): Space between chart and legend. margin_outer (int): Space from legend to chart edge. entry_margin (int): Space between legend entries. auto_hide_threshold (float): Auto-hide when legend takes >X of chart (0.0-1.0). add_entries_automatically (bool): Auto-add series to legend. entries (dict): Default styling for all legend entries with options:
button_shape (str): ‘Arrow’, ‘Diamond’, ‘Plus’, ‘Triangle’, ‘Circle’, ‘Square’, ‘Cross’, ‘Minus’ and ‘Star’. button_size (int | dict): Size in pixels or {‘x’: 20, ‘y’: 15}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 1, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text (str): Override default series name. text_font (dict): Font settings {‘size’: 16, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). show (bool): Show/hide this entry. match_style_exactly (bool): Match series style exactly vs simplified. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length for heatmap legends. lut_thickness (int): LUT bar thickness for heatmap legends. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
Reference to the Spider Chart.
- ZoomBandChart(chart: ChartXY, column_index: int, row_index: int, column_span: int = 1, row_span: int = 1, title: str = None, axis_type: str = 'linear', orientation: str = 'x', use_shared_value_axis: bool = False) ZoomBandChart[source]¶
Create a Zoom Band Chart on the dashboard.
- Parameters:
chart (ChartXY) – Reference to XY Chart which the Zoom Band Chart will use.
column_index (int) – Column index of the dashboard where the chart will be located.
row_index (int) – Row index of the dashboard where the chart will be located.
column_span (int) – How many columns the chart will take (X width). Default = 1.
row_span (int) – How many rows the chart will take (Y height). Default = 1.
title (str) – The title of the chart.
axis_type (str) – Creation-time axis options for the zoom band’s internal default axis (“linear” | “linear-highPrecision” | “logarithmic”).
orientation (str) – Select orientation of ZoomBandChart. ‘x’ = primary axis is X axis (commonly used when X = Time axis). ‘y’ = opposite mode, for example when Time axis is Y and chart is rotated 90 degrees.
use_shared_value_axis (bool) – ZoomBandChart can display series belonging to several different axes. By default, every unique value axis will have its own scale in the zoom band chart. By setting this flag to true, the zoom band chart will display all its series with 1 shared scale.
- Returns:
Reference to the Zoom Band Chart.
- add_event_listener(event: str, handler: callable | None = None, throttle_ms: int = 0, once: bool = False, target: str = 'chart') str[source]¶
Add event listener to the dashboard.
- Parameters:
event – Event name (‘inviewchange’, ‘resize’)
handler – Python callback receiving event data
throttle_ms – Minimum delay between callbacks in milliseconds
once – If True, listener removes itself after first trigger
target – ‘chart’ for dashboard-level events
Examples
>>> dashboard.add_event_listener('resize', handler=on_resize, target='chart')
- Returns:
callback_id for the registered handler
lightningchart.charts.funnel_chart module¶
- class lightningchart.charts.funnel_chart.FunnelChart(data: list[dict[str, int | float]] = None, slice_mode: str = 'height', labels_inside: bool = False, theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,ChartWithLUT,ChartWithLabelStyling,ChartsWithCoordinateTransforms,FunnelPyramidLabelConnectorMethods,ChartWithCursor2D,ChartsWithAddEventListenerVisualizes proportions and percentages between categories, by dividing a funnel into proportional segments.
- add_slice(name: str, value: int | float)[source]¶
This method is used for the adding slices to the funnel chart.
- Parameters:
name (str) – Funnel slice title.
value (int | float) – Funnel slice value.
- Returns:
The instance of the class for fluent interface.
- add_slices(slices: list[dict[str, int | float]])[source]¶
This method is used for the adding multiple slices to the funnel chart.
- Parameters:
slices (list[dict[str, int | float]]) – Array of {name, value} slices.
- Returns:
The instance of the class for fluent interface.
- set_head_width(width: int | float)[source]¶
Set Funnel Head Width.
- Parameters:
width (int | float) – Funnel Head Width range from 0 to 100.
- Returns:
The instance of the class for fluent interface.
- set_label_side(side: str)[source]¶
Set the side where labels should be displayed.
- Parameters:
side – “left” | “right”
- Returns:
The instance of the class for fluent interface.
- set_neck_width(width: int | float)[source]¶
Set Funnel Neck Width.
- Parameters:
width (int | float) – Funnel Neck Width range from 0 to 100.
- Returns:
The instance of the class for fluent interface.
- set_slice_gap(gap: int | float)[source]¶
Set gap between Slice / start of label connector, and end of label connector / Label.
- Parameters:
gap (int | float) – Gap as pixels. Clamped between [0, 20] !
- Returns:
The instance of the class for fluent interface.
- set_slice_mode(mode: str)[source]¶
Set funnel slice mode. Can be used to select between different drawing approaches for Slices.
- Parameters:
mode (str) – “height” | “width”
- Returns:
The instance of the class for fluent interface.
- set_slice_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None) Self[source]¶
Set stroke style of Funnel Slices border.
- Parameters:
thickness (int | float) – Thickness of the slice border.
color (Color) – Color of the slice border. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.funnel_chart.FunnelChartContainer(instance, container, column, row, colspan, rowspan, title, slice_mode, labels_inside, legend)[source]¶
Bases:
FunnelChart
- class lightningchart.charts.funnel_chart.FunnelChartDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None, slice_mode: str = 'height', labels_inside: bool = False, legend: LegendOptions | None = None)[source]¶
Bases:
FunnelChart
lightningchart.charts.gauge_chart module¶
- class lightningchart.charts.gauge_chart.GaugeChart(start: int | float = None, end: int | float = None, value: int | float = None, angle_interval_start: int | float = 225, angle_interval_end: int | float = -45, theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, html_text_rendering: bool = False)[source]¶
Bases:
GeneralMethods,TitleMethods,ChartsWithAddEventListenerGauge charts indicate where your data point(s) falls over a particular range.
- set_angle_interval(start: int | float, end: int | float)[source]¶
Set angular interval of the gauge in degrees.
- Parameters:
start (int | float) – Start angle of the gauge in degrees.
end (int | float) – End angle of the gauge in degrees.
- Returns:
The instance of the class for fluent interface.
- set_automatic_bar_coloring(enabled: bool)[source]¶
Enable or disable dynamic gauge bar coloring based on value indicators. If true, gauge bar is colored with the current indicator color. If false, gauge bar is always colored according to its “normal” color, set_bar_color
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_bar_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None) Self[source]¶
Set the normal bar color, when not affected by value coloring.
- Parameters:
color (Color) – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_bar_effect(enabled: bool)[source]¶
Set theme effect enabled on component or disabled.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_bar_gradient(enabled: bool)[source]¶
Enable or disable gradient coloring for the gauge bar. If true, the active color of the Gauge Bar is mapped to a gradient color. If false, bar is always solid color.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_bar_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None) Self[source]¶
Set the stroke style of the gauge bar, i.e., the gauge bar border.
- Parameters:
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.
- set_bar_thickness(pixels: int)[source]¶
Set the thickness of the gauge bar.
- Parameters:
pixels (int) – Thickness in pixels.
- Returns:
The instance of the class for fluent interface.
- set_color_animation(enabled: bool, speed_multiplier: float = None)[source]¶
Enable or disable color animations.
- Parameters:
enabled (bool) – Boolean flag.
speed_multiplier (float) – Optional value for adjusting the speed of the animation.
- Returns:
The instance of the class for fluent interface.
- set_gap_between_bar_and_value_indicators(gap: int)[source]¶
Set the distance between gauge bar and value indicators.
- Parameters:
gap (int) – Distance in pixels.
- Returns:
The instance of the class for fluent interface.
- set_glow_color(arg: None | Any | dict[str, Any])[source]¶
- Set the background glow color.
arg: None = No background glow color. arg: Color = Use explicit glow color always. arg: { ‘auto’: true } = Automatically color with same color as gauge bar.
- Parameters:
arg – None | Color | { auto: boolean, alpha: number }
- Returns:
The instance of the class for fluent interface.
- set_interval(start: int | float, end: int | float)[source]¶
Set scale interval of the gauge slice.
- Parameters:
start (int | float) – Start scale value.
end (int | float) – End scale value.
- Returns:
The instance of the class for fluent interface.
- set_label_effect(enabled: bool)[source]¶
Set theme effect enabled on component or disabled.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_needle_alignment(offset: float)[source]¶
Align the gauge needle from the gauge bar center.
- Parameters:
offset (float) – Numerical offset value between -1.0 and 1.0.
- Returns:
The instance of the class for fluent interface.
- set_needle_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color) Self[source]¶
Set the color of the gauge needle.
- Parameters:
color (Color) – Color value.
- Returns:
The instance of the class for fluent interface.
- set_needle_length(pixels: int)[source]¶
Set the length of the gauge needle.
- Parameters:
pixels (int) – Length in pixels.
- Returns:
The instance of the class for fluent interface.
- set_needle_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None) Self[source]¶
Set the stroke style of the needle edge.
- Parameters:
thickness (int | float) – Thickness of the needle stroke.
color (Color) – Color of the stroke. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_needle_thickness(thickness: int)[source]¶
Set the thickness of the needle.
- Parameters:
thickness (int) – Thickness in pixels.
- Returns:
The instance of the class for fluent interface.
- set_rounded_edges(enabled: bool)[source]¶
Enable or disable rounded edges for the gauge and value indicators.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_tick_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None) Self[source]¶
Set the color of gauge ticks.
- Parameters:
color (Color) – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_tick_decimals(precision: int)[source]¶
Set the decimal precision of gauge ticks.
- Parameters:
precision (int) – Number of decimal points.
- Returns:
The instance of the class for fluent interface.
- set_tick_font(size: int | float, family: str = 'Segoe UI, -apple-system, Verdana, Helvetica', style: str = 'normal', weight: str = 'normal')[source]¶
Set the font settings of gauge ticks.
- Parameters:
size (int | float) – CSS font size. For example, 16.
family (str) – CSS font family. For example, ‘Arial, Helvetica, sans-serif’.
style (str) – CSS font style. For example, ‘italic’
weight (str) – CSS font weight. For example, ‘bold’.
- Returns:
The instance of the class for fluent interface.
- set_unit_label(label: str)[source]¶
Set the text of the unit label.
- Parameters:
label (str) – Unit label text.
- Returns:
The instance of the class for fluent interface.
- set_unit_label_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None) Self[source]¶
Set the color of the unit label.
- Parameters:
color (Color) – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_unit_label_font(size: int | float, family: str = 'Segoe UI, -apple-system, Verdana, Helvetica', style: str = 'normal', weight: str = 'normal')[source]¶
Set the font settings of the unit label.
- Parameters:
size (int | float) – CSS font size. For example, 16.
family (str) – CSS font family. For example, ‘Arial, Helvetica, sans-serif’.
style (str) – CSS font style. For example, ‘italic’
weight (str) – CSS font weight. For example, ‘bold’.
- Returns:
The instance of the class for fluent interface.
- set_value(value: int | float)[source]¶
Set value of gauge slice.
- Parameters:
value (int | float) – Numeric value.
- Returns:
The instance of the class for fluent interface.
- set_value_animation(enabled: bool, speed_multiplier: float = None)[source]¶
Enable or disable value animations.
- Parameters:
enabled (bool) – Boolean flag.
speed_multiplier (float) – Optional value for adjusting the speed of the animation.
- Returns:
The instance of the class for fluent interface.
- set_value_decimals(precision: int)[source]¶
Set the decimal precision of the value label.
- Parameters:
precision (int) – Number of decimal points.
- Returns:
The instance of the class for fluent interface.
- set_value_indicator_thickness(pixels: int)[source]¶
Set the thickness of the value indicators.
- Parameters:
pixels (int) – Thickness in pixels.
- Returns:
The instance of the class for fluent interface.
- set_value_indicators(indicators: list[dict[str, Any]])[source]¶
Set the value indicators of the gauge.
- Parameters:
indicators – List of {start: number, end: number, color: Color} dictionaries.
- Returns:
The instance of the class for fluent interface.
- set_value_label_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None) Self[source]¶
Set the FillStyle of the value label.
- Parameters:
color (Color) – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_value_label_font(size: int | float, family: str = 'Segoe UI, -apple-system, Verdana, Helvetica', style: str = 'normal', weight: str = 'normal')[source]¶
Set the font settings of the value label.
- Parameters:
size (int | float) – CSS font size. For example, 16.
family (str) – CSS font family. For example, ‘Arial, Helvetica, sans-serif’.
style (str) – CSS font style. For example, ‘italic’
weight (str) – CSS font weight. For example, ‘bold’.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.gauge_chart.GaugeChartContainer(instance, container, column, row, colspan, rowspan, title)[source]¶
Bases:
GaugeChart
- class lightningchart.charts.gauge_chart.GaugeChartDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None)[source]¶
Bases:
GaugeChart
lightningchart.charts.map_chart module¶
- class lightningchart.charts.map_chart.MapChart(map_type: str = 'World', theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, instance: Instance = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,ComponentWithPaletteColoring,ChartsWithCoordinateTransforms,ChartWithCursor2D,ChartsWithAddEventListener- invalidate_region_values(region_values: list[dict])[source]¶
Invalidate numeric values associated with each region of the Map.
- Parameters:
region_values (list[dict]) – List of {“ISO_A3”: string, “value”: number} dictionaries.
- Returns:
The instance of the class for fluent interface.
- set_highlight_on_hover(enabled: bool)[source]¶
Set highlight on mouse hover enabled or disabled.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_outlier_region_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color) Self[source]¶
Set color of outlier regions (parts of map that are visible, but not interactable with active map type).
- Parameters:
color (Color) – Color of outlier regions.
- Returns:
The instance of the class for fluent interface.
- set_outlier_region_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None) Self[source]¶
Set stroke of outlier regions (parts of map that are visible, but not interactable with active map type).
- Parameters:
thickness (int | float) – Thickness of the stroke.
color (Color) – Color of the stroke.
- Returns:
The instance of the class for fluent interface.
- set_separate_region_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color) Self[source]¶
Set color of separate regions, which are visual components surrounding areas such as Alaska and Hawaii.
- Parameters:
color (Color) – Color of separate regions.
- Returns:
The instance of the class for fluent interface.
- set_separate_region_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None) Self[source]¶
Set stroke of Separate regions, which are visual components surrounding areas such as Alaska and Hawaii.
- Parameters:
thickness (int | float) – Thickness of the stroke.
color (Color) – Color of the stroke.
- Returns:
The instance of the class for fluent interface.
- set_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None) Self[source]¶
Set Stroke style of Map regions.
- Parameters:
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.
- class lightningchart.charts.map_chart.MapChartContainer(instance, container, column, row, colspan, rowspan, title, legend, map_type)[source]¶
Bases:
MapChart
- class lightningchart.charts.map_chart.MapChartDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None, map_type: str = 'World', legend: LegendOptions | None = None)[source]¶
Bases:
MapChart
lightningchart.charts.parallel_coordinate_chart module¶
- class lightningchart.charts.parallel_coordinate_chart.ParallelCoordinateAxis(chart, axis_key)[source]¶
Bases:
GenericAxis- add_custom_tick()[source]¶
Add custom tick to parallel coordinate axis.
- Returns:
Reference to ParallelCoordinateCustomTick class.
- add_range_selector()[source]¶
Add a range selector to this axis.
- Returns:
The created range selector object.
- get_custom_ticks()[source]¶
Get information about all custom ticks on this axis.
- Returns:
- List of custom tick information dictionaries, each containing:
id (str): Unique identifier for the tick
value (float): Axis value where tick is positioned
text (str): Label text displayed on the tick
visible (bool): Whether tick is visible
allocatesAxisSpace (bool): Whether tick reserves space on axis
tickLength (float): Length of tick line in pixels
gridStrokeLength (float): Length of grid line
tickLabelPadding (float): Padding around label
gridStrokeStyle (dict): Grid line style {‘thickness’: int, ‘color’: str}
tickStrokeStyle (dict): Tick line style {‘thickness’: int, ‘color’: str}
markerFont (dict): Font settings {‘size’: int, ‘family’: str, ‘weight’: str, ‘style’: str}
markerColor (str): Marker text color (rgba string)
textFont (dict): Text font settings
textColor (str): Text color (rgba string)
backgroundColor (str): Label background color (rgba string)
backgroundStrokeStyle (dict): Background border style {‘thickness’: int, ‘color’: str}
padding (float): Padding value
tickLabelRotation (float): Label rotation in degrees
- Return type:
list[dict]
Notes
Must be called in live mode and better after opening the chart window, chart.open(live=True).
Examples
Get all custom ticks with their properties: >>> ticks = axis.get_custom_ticks() >>> for tick in ticks: … print(f”Value: {tick[‘value’]}, Text: {tick[‘text’]}”) … print(f”Font: {tick[‘textFont’]}”) … print(f”Color: {tick[‘textColor’]}”)
- set_animation_scroll(enabled: bool | None)[source]¶
Enable/disable scroll animation.
- Parameters:
enabled – True/False; None maps to undefined (disables custom setting).
- Returns:
The instance of the axis for fluent interface.
- set_palette_stroke(thickness: int | float, interpolate: bool, steps: list)[source]¶
Set the stroke style of the axis with a palette.
- Parameters:
thickness (int | float) – Thickness of the stroke in pixels.
interpolate (bool) – Whether to interpolate between palette steps.
steps (list) – List of palette steps, each containing value and color.
- Returns:
The instance of the axis for fluent interface.
- set_solid_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None) Self[source]¶
Set a solid stroke style for the axis.
- Parameters:
thickness (int | float) – Thickness of the stroke in pixels.
color – Solid color for the stroke. Use ‘transparent’ or None to hide.
- Returns:
The instance of the axis for fluent interface.
- set_stopped(stopped: bool)[source]¶
Stop/resume axis so scroll strategy won’t change its interval.
- Parameters:
stopped (bool) – True to stop, False to resume.
- Returns:
The instance of the axis for fluent interface.
- set_tick_labels(major_size: int | float | None = None, minor_size: int | float | None = None, family: str | None = None, style: str | None = None, weight: str | None = None, major_color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None, minor_color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None, major_rotation: float | None = None, minor_rotation: float | None = None, format_type: str = 'standard', precision: int | None = None, unit: str | None = None, scale: float = 1.0)[source]¶
Style tick labels for this parallel coordinate axis.
- Parameters:
major_size – Font size for major tick labels in pixels.
minor_size – Font size for minor tick labels in pixels.
family – CSS font family for both major and minor tick labels.
style – CSS font style (‘normal’, ‘italic’).
weight – CSS font weight (‘normal’, ‘bold’).
major_color – Text color for major tick labels. Accepts hex string, named color, RGB/RGBA tuple, or Color object.
minor_color – Text color for minor tick labels. Accepts hex string, named color, RGB/RGBA tuple, or Color object.
major_rotation – Rotation angle in degrees for major tick labels.
minor_rotation – Rotation angle in degrees for minor tick labels.
format_type – Format style: - ‘standard’: Normal number formatting (default) - ‘currency’: Currency formatting with symbol - ‘percentage’: Percentage formatting (value * 100 + %) - ‘thousands’: Compact notation (K, M, B, T) - ‘integer’: Rounded integer values
precision – Number of decimal places (None = auto).
unit – Unit to append (e.g., “kg”, “ms”, “items”).
scale – Scale factor to multiply value (default: 1.0).
- Returns:
The instance of the axis for fluent interface.
Examples
Basic font styling: >>> axis.set_tick_labels(major_size=14, minor_size=10, weight=’bold’)
Rotated labels with color: >>> axis.set_tick_labels( … major_size=12, … major_rotation=45, … major_color=’darkblue’ … )
Using various color formats: >>> axis.set_tick_labels(major_color=’#FF0000’) # Hex string >>> axis.set_tick_labels(major_color=’red’) # Named color >>> axis.set_tick_labels(major_color=(255, 0, 0)) # RGB tuple >>> axis.set_tick_labels(major_color=(255, 0, 0, 128)) # RGBA tuple >>> axis.set_tick_labels(major_color=0xFF0000) # Integer
Formatted with units: >>> axis.set_tick_labels( … major_size=12, … precision=2, … unit=’Hz’, … scale=1000 … )
Percentage formatting: >>> axis.set_tick_labels( … format_type=’percentage’, … precision=1 … )
- set_tick_strategy(strategy: str, time_origin: int | float = None, utc: bool = False)[source]¶
Set the tick strategy for the axis.
- Parameters:
strategy (str) – Tick strategy (“Empty”, “Numeric”, “DateTime”, “Time”).
time_origin (int | float, optional) – Time origin for the strategy. Defaults to None.
utc (bool, optional) – Whether to use UTC for DateTime strategy. Defaults to False.
- Returns:
The instance of the axis for fluent interface.
- set_units(units: str | None, behavior: dict | None = None)[source]¶
Set axis units (e.g., ‘Hz’, ‘°C’) with optional behavior flags.
- Parameters:
units – String (e.g., ‘Hz’) or None to clear.
behavior – Optional dict with keys: - displayOnAxis (bool) - displayInCursor (bool)
- Returns:
The instance of the axis for fluent interface.
- class lightningchart.charts.parallel_coordinate_chart.ParallelCoordinateAxisRangeSelector(chart, axis_key, selector_id)[source]¶
Bases:
object- dispose()[source]¶
Remove the range selector permanently.
- Returns:
The instance of the class for fluent interface.
- set_interval(a: float, b: float, stop_axis_after: bool = False, animate: bool = False)[source]¶
Set the range interval for the selector.
- Parameters:
a (float) – Start of the interval.
b (float) – End of the interval.
stop_axis_after (bool, optional) – Stop axis after the range. Defaults to False.
animate (bool, optional) – Animate the range update. Defaults to False.
- Returns:
The instance of the selector for fluent interface.
- class lightningchart.charts.parallel_coordinate_chart.ParallelCoordinateChart(theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
ChartWithSeries,ChartWithCursor2D,TitleMethods,GeneralMethods,UserInteractions,ChartsWithCoordinateTransforms,ChartsWithAddEventListenerChart for visualizing data in a parallel coordinate system.
- get_axis(axis_key: str)[source]¶
Retrieve a specific axis by its name or ID.
- Parameters:
axis_key (str) – The key or name of the axis.
- Returns:
The corresponding axis object.
- Raises:
ValueError – If the axis with the given key is not found.
- get_series() list[ParallelCoordinateSeries][source]¶
Get all data series in the chart.
- Returns:
A list of all series in the chart.
- set_all_axes_tick_labels(major_size: int | float | None = None, minor_size: int | float | None = None, family: str | None = None, style: str | None = None, weight: str | None = None, major_color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None, minor_color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None, major_rotation: float | None = None, minor_rotation: float | None = None, format_type: str = 'standard', precision: int | None = None, unit: str | None = None, scale: float = 1.0)[source]¶
Style tick labels for ALL parallel coordinate axes at once.
- Parameters:
major_size – Font size for major tick labels in pixels.
minor_size – Font size for minor tick labels in pixels.
family – CSS font family for both major and minor tick labels.
style – CSS font style (‘normal’, ‘italic’).
weight – CSS font weight (‘normal’, ‘bold’).
major_color – Text color for major tick labels. Accepts hex string, named color, RGB/RGBA tuple, or Color object.
minor_color – Text color for minor tick labels. Accepts hex string, named color, RGB/RGBA tuple, or Color object.
major_rotation – Rotation angle in degrees for major tick labels.
minor_rotation – Rotation angle in degrees for minor tick labels.
format_type – Format style: - ‘standard’: Normal number formatting (default) - ‘currency’: Currency formatting with symbol - ‘percentage’: Percentage formatting (value * 100 + %) - ‘thousands’: Compact notation (K, M, B, T) - ‘integer’: Rounded integer values
precision – Number of decimal places (None = auto).
unit – Unit to append (e.g., “kg”, “ms”, “items”).
scale – Scale factor to multiply value (default: 1.0).
- Returns:
The instance of the chart for fluent interface.
Examples
Style all axes uniformly >>> chart.set_all_axes_tick_labels(major_size=14, minor_size=10, weight=’bold’)
Rotated labels on all axes >>> chart.set_all_axes_tick_labels( … major_size=12, … major_rotation=45, … major_color=’darkblue’ … )
Formatted with units on all axes >>> chart.set_all_axes_tick_labels( … major_size=12, … precision=2, … format_type=’standard’ … )
- set_axes(axes: list)[source]¶
Set axes of the parallel coordinate chart as a list of strings.
- Parameters:
axes (list) – List of axis names or identifiers.
- Returns:
The instance of the chart for fluent interface.
- set_highlight_on_hover(state: bool)[source]¶
Enable or disable highlight on hover for series.
- Parameters:
state (bool) – True to enable highlight on hover, False to disable.
- Returns:
The instance of the chart for fluent interface.
- set_lut(axis_key: str, interpolate: bool, steps: list, percentage_values: bool = False, formatter_precision: int | None = None, formatter_unit: str = '', formatter_scale: float = 1.0, formatter_type: str = 'standard', formatter_operation: str = 'none')[source]¶
Configure series coloring by a Value-Color Table (LUT) based on a specific axis.
- Parameters:
axis_key (str) – The key of the axis for which to apply LUT.
interpolate (bool) – Whether to interpolate between LUT steps.
steps (list) – List of LUT steps, each with a value and color.
percentage_values (bool) – Whether values represent percentages or explicit values.
formatter_precision (int | None) – Decimal places for legend display.
formatter_unit (str) – Unit suffix (e.g., “mag”, “ms”).
formatter_scale (float) – Multiply values by this factor.
formatter_type (str) – ‘standard’, ‘compact’, ‘engineering’, ‘scientific’.
formatter_operation (str) – ‘none’, ‘round’, ‘ceil’, ‘floor’.
- Returns:
The instance of the chart for fluent interface.
- set_series_stroke_thickness(thickness: int | float)[source]¶
Set the thickness of series lines.
- Parameters:
thickness (int | float) – Thickness of the lines in pixels.
- Returns:
The instance of the chart for fluent interface.
- set_spline(enabled: bool)[source]¶
Enable or disable spline interpolation for the chart.
- Parameters:
enabled (bool) – True to enable spline interpolation, False to disable.
- Returns:
The instance of the chart for fluent interface.
- set_unselected_series_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None) Self[source]¶
Set the color for unselected series.
- Parameters:
Color – Color to apply to unselected series. Use ‘transparent’ or None to hide.
- Returns:
The instance of the chart for fluent interface.
- set_user_interactions(interactions=Ellipsis)[source]¶
Configure user interactions from a set of preset options.
- Parameters:
interactions (dict or None) –
None: disable all interactions
{} or no argument: restore default interactions
dict: configure specific interactions
Examples
## Disable all interactions: >>> chart.set_user_interactions(None)
## Restore default interactions: >>> chart.set_user_interactions() … chart.set_user_interactions({})
## Remove select range selector interactions >>> chart.set_user_interactions( … { … ‘rangeSelectors’: { … ‘create’: { … ‘doubleClickAxis’: True, … }, … ‘dispose’: { … ‘doubleClick’: True, … }, … }, … } … )
- class lightningchart.charts.parallel_coordinate_chart.ParallelCoordinateChartContainer(instance, container, column, row, colspan, rowspan, title, legend)[source]¶
Bases:
ParallelCoordinateChart
- class lightningchart.charts.parallel_coordinate_chart.ParallelCoordinateChartDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None, legend: LegendOptions | None = None)[source]¶
Bases:
ParallelCoordinateChartClass for ParallelCoordinateChart contained in Dashboard.
lightningchart.charts.pie_chart module¶
- class lightningchart.charts.pie_chart.PieChart(data: list[dict[str, int | float]] = None, inner_radius: int | float = None, title: str = None, theme: Themes = Themes.Light, theme_scale: float = 1.0, labels_inside_slices: bool = False, license: str = None, license_information: str = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,ChartWithLUT,ChartWithLabelStyling,ChartsWithCoordinateTransforms,ChartWithCursor2D,ChartsWithAddEventListenerVisualizes proportions and percentages between categories, by dividing a circle into proportional segments.
- add_slice(name: str, value: int | float)[source]¶
Add new Slice to the Pie Chart.
- Parameters:
name (str) – Initial name for Slice as string.
value (int | float) – Initial value for Slice as number.
- Returns:
The instance of the class for fluent interface.
- add_slices(slices: list[dict[str, int | float]])[source]¶
This method is used for adding multiple slices in the pie chart.
- Parameters:
slices (list[dict[str, int | float]]) – List of slices {name, value}.
- Returns:
The instance of the class for fluent interface.
- set_inner_radius(radius: int | float)[source]¶
Set inner radius of Pie Chart. This method can be used to style the Pie Chart as a “Donut Chart”, with the center being hollow.
- Parameters:
radius (int | float) – Inner radius as a percentage of outer radius [0, 100]
- Returns:
The instance of the class for fluent interface.
- set_label_connector_end_length(length: int | float)[source]¶
Set horizontal length of connector line before connecting to label.
- Parameters:
length (int | float) – Length of the connector line before connecting to label.
- Returns:
The instance of the class for fluent interface.
- set_label_connector_gap_start(gap: int | float)[source]¶
Set gap between slice and connector line start.
- Parameters:
gap (int | float) – Gap as pixels.
- Returns:
The instance of the class for fluent interface.
- set_label_slice_offset(offset: int | float)[source]¶
Set distance between slice and label (includes explosion offset), this points to reference position of label, so not necessarily the nearest corner.
- Parameters:
offset (int | float) – Length as pixels.
- Returns:
The instance of the class for fluent interface.
- set_multiple_slice_explosion(enabled: bool)[source]¶
Set whether multiple slices are allowed to be ‘exploded’ at the same time or not. When a Slice is exploded, it is drawn differently from non-exploded state, usually slightly “pushed away” from the center of Pie Chart.
- Parameters:
enabled (bool) – Whether this behavior is allowed as boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_slice_explosion_offset(offset: int | float)[source]¶
Set offset of exploded Slices in pixels.
- Parameters:
offset (int | float) – Offset of exploded Slices in pixels
- Returns:
The instance of the class for fluent interface.
- set_slice_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Set stroke style of Pie Slices border.
- Parameters:
thickness (int | float) – Thickness of the slice border.
color (Color) – Color of the slice border. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.pie_chart.PieChartContainer(instance, container, column, row, colspan, rowspan, title, labels_inside_slices, legend)[source]¶
Bases:
PieChart
- class lightningchart.charts.pie_chart.PieChartDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None, labels_inside_slices: bool = False, legend: LegendOptions | None = None)[source]¶
Bases:
PieChart
lightningchart.charts.polar_chart module¶
- class lightningchart.charts.polar_chart.PolarChart(theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,ChartWithCursor2D,ChartsWithAddEventListener,SolveNearestMixinChart for visualizing data in a polar coordinate system.
- add_area_series(automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Add an Area series to the PolarChart.
automatic_color_index (int): Optional index to use for automatic coloring of series. legend (dict): Legend configuration dictionary with the following options:
show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
‘Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
PolarAreaSeries instance.
Examples: Hidden from legend
>>> series2 = chart.add_area_series(legend={'show': False})
- Custom legend appearance
>>> series3 = chart.add_area_series( ... legend= ... { ... 'button_shape': 'Triangle', ... 'button_size': 20, ... 'button_fill_style': '#00FF00', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... } ... )
- add_heatmap_series(sectors: int, annuli: int, data_order: str = 'annuli', amplitude_start: int | float = 0, amplitude_end: int | float = 1, amplitude_step: int | float = 0, legend: LegendOptions | None = None)[source]¶
Add a Series for visualizing a Polar Heatmap with a static sector and annuli count.
- Parameters:
sectors – Amount of unique data samples along Radial Axis.
annuli – Amount of unique data samples along Amplitude Axis.
data_order – “annuli” | “sectors” - Select order of data.
amplitude_start – Amplitude value where Polar Heatmap originates at.
amplitude_end – Amplitude value where Polar Heatmap ends at.
amplitude_step – Amplitude step between each ring (annuli) of the Polar Heatmap.
legend (dict) –
Legend configuration dictionary with the following options: show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
’Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
PolarHeatmapSeries instance.
Examples: Hidden from legend
>>> series2 = chart.add_heatmap_series(sectors=4, annuli=3, legend={'show': False})
- Custom legend appearance
>>> series3 = chart.add_heatmap_series( ... sectors=4, ... annuli=3, ... legend= ... { ... 'button_shape': 'Triangle', ... 'button_size': 20, ... 'button_fill_style': '#00FF00', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... } ... )
- add_line_series(automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Add a Line series to the PolarChart.
automatic_color_index (int): Optional index to use for automatic coloring of series. legend (dict): Legend configuration dictionary with the following options:
show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
‘Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
PolarLineSeries instance.
Examples: Hidden from legend
>>> series2 = chart.add_line_series(legend={'show': False})
- Custom legend appearance
>>> series3 = chart.add_line_series( ... legend= ... { ... 'button_shape': 'Triangle', ... 'button_size': 20, ... 'button_fill_style': '#00FF00', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... } ... )
- add_point_line_series(automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Add a Point Line series to the PolarChart.
automatic_color_index (int): Optional index to use for automatic coloring of series. legend (dict): Legend configuration dictionary with the following options:
show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
‘Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
PolarPointLineSeries instance.
Examples: Hidden from legend
>>> series2 = chart.add_point_line_series(legend={'show': False})
- Custom legend appearance
>>> series3 = chart.add_point_line_series( ... legend= ... { ... 'button_shape': 'Triangle', ... 'button_size': 20, ... 'button_fill_style': '#00FF00', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... } ... )
- add_point_series(automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Add a Point series to the PolarChart.
automatic_color_index (int): Optional index to use for automatic coloring of series. legend (dict): Legend configuration dictionary with the following options:
show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
‘Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
PolarPointSeries instance.
Examples: Hidden from legend
>>> series2 = chart.add_point_series(legend={'show': False})
- Custom legend appearance
>>> series3 = chart.add_point_series( ... legend= ... { ... 'button_shape': 'Triangle', ... 'button_size': 20, ... 'button_fill_style': '#00FF00', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... } ... )
- add_polygon_series(automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Add a Polygon series to the PolarChart.
automatic_color_index (int): Optional index to use for automatic coloring of series. legend (dict): Legend configuration dictionary with the following options:
show (bool): Whether to show this series in legend (default: True). text (str): Custom text for legend entry. button_shape (str): Button shape (‘Circle’, ‘Square’, ‘Triangle’, ‘Diamond’,
‘Plus’, ‘Cross’, ‘Minus’, ‘Star’, ‘Arrow’).
button_size (int | dict): Button size in pixels or {‘x’: width, ‘y’: height}. button_fill_style (str): Button color (“#ff0000”). button_stroke_style (dict): Button border {‘thickness’: 2, ‘color’: ‘#000’}. button_rotation (float): Button rotation in degrees. text_font (dict): Text font settings {‘size’: 12, ‘family’: ‘Arial’, ‘weight’: ‘bold’}. text_fill_style (str): Text color (“#000000”). match_style_exactly (bool): Whether button should match series style exactly. highlight (bool): Whether highlighting on hover is enabled. lut: LUT element for legends (None to disable). lut_length (int): LUT bar length in pixels. lut_thickness (int): LUT bar thickness in pixels. lut_display_proportional_steps (bool): LUT step display mode.
- Returns:
PolarPolygonSeries instance.
Examples: Hidden from legend
>>> series2 = chart.add_polygon_series(legend={'show': False})
- Custom legend appearance
>>> series3 = chart.add_polygon_series( ... legend= ... { ... 'button_shape': 'Triangle', ... 'button_size': 20, ... 'button_fill_style': '#00FF00', ... 'text': 'Series A', ... 'text_font': {'size': 20, 'weight': 'bold'}, ... } ... )
- get_amplitude_axis()[source]¶
Get PolarAxisAmplitude object that represents the PolarChart’s amplitude dimension, which is depicted as a distance away from the Chart’s center.
- Returns:
PolarAxisAmplitude instance.
- get_radial_axis()[source]¶
Get PolarAxisRadial object that represents the PolarChart’s radial dimension, which is depicted as an angle on the Chart’s center.
- Returns:
PolarAxisRadial instance.
- translate_coordinate(coordinate: dict, target: str, source: str = None)[source]¶
Translate PolarChart coordinates between systems.
- Parameters:
coordinate – Dict with coordinate keys for source system - polar: {‘angle’: float, ‘amplitude’: float} (degrees and radius) - relative: {‘x’: float, ‘y’: float} (pixels from bottom-left) - client: {‘clientX’: float, ‘clientY’: float} (screen coordinates)
target – ‘polar’ | ‘relative’ | ‘client’
source – ‘polar’ | ‘relative’ | ‘client’ (auto-detected if None)
- Returns:
Dict with translated coordinates
Examples
>>> # Polar to relative (source auto-detected) >>> loc = chart.translate_coordinate({'angle': 90, 'amplitude': 4}, target='relative') >>> print(f"Relative: x={loc['x']}, y={loc['y']}")
>>> # Polar to client (source auto-detected) >>> loc = chart.translate_coordinate({'angle': 45, 'amplitude': 3.5}, target='client') >>> print(f"Client: x={loc['clientX']}, y={loc['clientY']}")
>>> # Relative to polar >>> loc = chart.translate_coordinate({'x': 200, 'y': 300}, target='polar', source='relative') >>> print(f"Polar: angle={loc['angle']}, amplitude={loc['amplitude']}")
>>> # Client to polar (source auto-detected) >>> loc = chart.translate_coordinate({'clientX': 500, 'clientY': 400}, target='polar') >>> print(f"Polar: angle={loc['angle']}, amplitude={loc['amplitude']}")
- class lightningchart.charts.polar_chart.PolarChartContainer(instance, container, column, row, colspan, rowspan, title, legend)[source]¶
Bases:
PolarChart
- class lightningchart.charts.polar_chart.PolarChartDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None, legend: LegendOptions | None = None)[source]¶
Bases:
PolarChartClass for PolarChart contained in Dashboard.
lightningchart.charts.pyramid_chart module¶
- class lightningchart.charts.pyramid_chart.PyramidChart(data: list[dict[str, int | float]] = None, slice_mode: str = 'height', labels_inside: bool = False, theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,ChartWithLUT,ChartWithLabelStyling,ChartsWithCoordinateTransforms,FunnelPyramidLabelConnectorMethods,ChartWithCursor2D,ChartsWithAddEventListenerVisualizes proportions and percentages between categories, by dividing a pyramid into proportional segments.
- add_slice(name: str, value: int | float)[source]¶
This method is used for the adding slices in the pyramid chart.
- Parameters:
name (str) – Pyramid slice title.
value (int | float) – Pyramid slice value.
- Returns:
The instance of the class for fluent interface.
- add_slices(slices: list[dict[str, int | float]])[source]¶
This method is used for the adding multiple slices in the pyramid chart.
- Parameters:
slices (list[dict[str, int | float]]) – Array of {name, value} slices.
- Returns:
The instance of the class for fluent interface.
- set_label_side(side: str = 'left')[source]¶
Set the side where labels should be displayed.
- Parameters:
side – “left” | “right”
- Returns:
The instance of the class for fluent interface.
- set_neck_width(width: int | float)[source]¶
Set Pyramid Neck Width.
- Parameters:
width (int | float) – Pyramid Neck Width range from 0 to 100.
- Returns:
The instance of the class for fluent interface.
- set_slice_gap(gap: int | float)[source]¶
Set gap between Slice / start of label connector, and end of label connector / Label.
- Parameters:
gap (int | float) – Gap as pixels. Clamped between [0, 20] !
- Returns:
The instance of the class for fluent interface.
- set_slice_mode(mode: str = 'height')[source]¶
Set PyramidSliceMode. Can be used to select between different drawing approaches for Slices.
- Parameters:
mode (str) – “height” | “width”
- Returns:
The instance of the class for fluent interface.
- set_slice_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Set stroke style of Pyramid Slices border.
- Parameters:
thickness (int | float) – Thickness of the slice border.
color (Color) – Color of the slice border. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.pyramid_chart.PyramidChartContainer(instance, container, column, row, colspan, rowspan, title, labels_inside, slice_mode, legend)[source]¶
Bases:
PyramidChart
- class lightningchart.charts.pyramid_chart.PyramidChartDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None, slice_mode: str = 'height', labels_inside: bool = False, legend: LegendOptions | None = None)[source]¶
Bases:
PyramidChart
lightningchart.charts.spider_chart module¶
- class lightningchart.charts.spider_chart.SpiderChart(theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,SpiderChartAxis,ChartsWithCoordinateTransforms,ChartWithCursor2D,ChartsWithAddEventListener- set_series_background_effect(enabled: bool = True)[source]¶
Set theme effect enabled on component or disabled.
- Parameters:
enabled (bool) – Theme effect enabled.
- Returns:
The instance of the class for fluent interface.
- set_web_count(count: int)[source]¶
Set count of ‘webs’ displayed.
- Parameters:
count (int) – Count of web lines.
- Returns:
The instance of the class for fluent interface.
- set_web_mode(mode: str = 'circle')[source]¶
Set mode of SpiderCharts web and background.
- Parameters:
mode – “circle” | “normal”
- Returns:
The instance of the class for fluent interface.
- set_web_style(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Set style of Spider charts webs as LineStyle.
- Parameters:
thickness (int | float) – Thickness of the web lines.
color (Color) – Color of the web. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.spider_chart.SpiderChartContainer(instance, container, column, row, colspan, rowspan, title, legend)[source]¶
Bases:
SpiderChart
- class lightningchart.charts.spider_chart.SpiderChartDashboard(instance: Instance, dashboard_id: str, column: int, row: int, colspan: int, rowspan: int, title: str = None, legend: LegendOptions | None = None)[source]¶
Bases:
SpiderChart
- class lightningchart.charts.spider_chart.SpiderSeries(chart: Chart)[source]¶
Bases:
Series- add_points(points: list[dict[str, int | float]])[source]¶
Adds an arbitrary amount of SpiderPoints to the Series.
- Parameters:
points (list[dict]) – List of SpiderPoints as {‘axis’: string, ‘value’: number}
- Returns:
The instance of the class for fluent interface.
- set_fill_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set color of the polygon that represents the shape of the Series.
- Parameters:
color (Color) – Color of the polygon. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_line_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the series polygon line color.
- Parameters:
color (Color) – Color of the lines. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_line_thickness(thickness: int)[source]¶
Set the series polygon line thickness.
- Parameters:
thickness (int) – Thickness of the lines.
- Returns:
The instance of the class for fluent interface.
lightningchart.charts.treemap_chart module¶
- class lightningchart.charts.treemap_chart.TreeMapChart(data: list[dict] = None, theme: Themes = Themes.Light, theme_scale: float = 1.0, title: str = None, license: str = None, license_information: str = None, html_text_rendering: bool = True, legend: LegendOptions | None = None)[source]¶
Bases:
GeneralMethods,TitleMethods,UserInteractions,ChartsWithCoordinateTransforms,ChartWithCursor2D,ChartsWithAddEventListenerTreeMap Chart for visualizing hierarchical data.
- set_animation_highlight(enabled: bool)[source]¶
Set component highlight animations enabled or not.
- Parameters:
enabled – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_animation_values(enabled: bool, speed_multiplier: float = 1)[source]¶
Enable/Disable animation of Nodes positions.
- Parameters:
enabled – Boolean flag.
speed_multiplier – Optional multiplier for category animation speed. 1 matches default speed.
- Returns:
The instance of the class for fluent interface.
- set_data(data: list[dict])[source]¶
Set data for the TreeMap chart.
- Parameters:
data – List of hierarchical node dicts, e.g. {‘name’: str, ‘value’: number, ‘children’: [ … ]}.
- Returns:
The instance of the class for fluent interface.
- set_displayed_levels_count(level: int)[source]¶
Set the amount of levels of children nodes to display.
- Parameters:
level – Amount of levels to display.
- Returns:
The instance of the class for fluent interface.
- set_drill_down_node(node: str | list[str] | None = None)[source]¶
Drill down to a node by name or path.
- Parameters:
node – None to reset, str for single node name, list[str] for path.
Examples
>>> chart.set_drill_down_node('TECHNOLOGY') >>> chart.set_drill_down_node(['TECHNOLOGY', 'MSFT']) >>> chart.set_drill_down_node(None)
- Returns:
Self for chaining.
- set_header_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color of the header.
- Parameters:
color – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_header_font(size: int | float, family: str = 'Segoe UI, -apple-system, Verdana, Helvetica', style: str = 'normal', weight: str = 'normal')[source]¶
Set the header font for the TreeMap chart.
- Parameters:
size (int | float) – CSS font size. For example, 16.
family (str) – CSS font family. For example, ‘Arial, Helvetica, sans-serif’.
style (str) – CSS font style. For example, ‘italic’.
weight (str) – CSS font weight. For example, ‘bold’.
- Returns:
The instance of the class for fluent interface.
- set_init_path_button_text(text: str)[source]¶
Set the text for the back button that returns to the 1st level of Nodes.
- Parameters:
text – Text for the button.
- Returns:
The instance of the class for fluent interface.
- set_label_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color of the node labels.
- Parameters:
color – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_label_font(size: int | float, family: str = 'Segoe UI, -apple-system, Verdana, Helvetica', style: str = 'normal', weight: str = 'normal')[source]¶
Set the font of the node labels.
- Parameters:
size (int | float) – CSS font size. For example, 16.
family (str) – CSS font family. For example, ‘Arial, Helvetica, sans-serif’.
style (str) – CSS font style. For example, ‘italic’.
weight (str) – CSS font weight. For example, ‘bold’.
- Returns:
The instance of the class for fluent interface.
- set_node_border_style(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Set the line style of the node border.
- Parameters:
thickness (int | float) – Thickness of the border.
color (Color) – Color of the border. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_node_coloring(steps: list[dict], look_up_property: str = 'value', interpolate: bool = True, percentage_values: bool = False, formatter_precision: int | None = None, formatter_unit: str = '', formatter_scale: float = 1.0, formatter_type: str = 'standard', formatter_operation: str = 'none')[source]¶
Set the color of the nodes.
- Parameters:
steps (list[dict]) – List of {“value”: number, “color”: Color, ‘label’: ‘Label’} dictionaries.
look_up_property (str) – “value” | “x” | “y” | “z”.
interpolate (bool) – Enables automatic linear interpolation between color steps.
percentage_values (bool) – Whether values represent percentages or explicit values.
formatter_precision – Decimal places for legend display.
formatter_unit – Unit suffix (e.g., “mag”, “ms”).
formatter_scale – Multiply values by this factor.
formatter_type – ‘standard’, ‘compact’, ‘engineering’, ‘scientific’.
formatter_operation – ‘none’, ‘round’, ‘ceil’, ‘floor’.
- Returns:
The instance of the class for fluent interface.
- set_node_effect(enabled: bool)[source]¶
Set theme effect enabled on component or disabled.
- Parameters:
enabled – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_path_label_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set color of the path labels.
- Parameters:
color – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_path_label_font(size: int | float, family: str = 'Segoe UI, -apple-system, Verdana, Helvetica', style: str = 'normal', weight: str = 'normal')[source]¶
Set the font of the path labels.
- Parameters:
size (int | float) – CSS font size. For example, 16.
family (str) – CSS font family. For example, ‘Arial, Helvetica, sans-serif’.
style (str) – CSS font style. For example, ‘italic’.
weight (str) – CSS font weight. For example, ‘bold’.
- Returns:
The instance of the class for fluent interface.
- set_user_interactions(interactions=Ellipsis)[source]¶
Configure user interactions from a set of preset options.
- Parameters:
interactions (dict or None) –
None: disable all interactions
{} or no argument: restore default interactions
dict: configure specific interactions
Examples
# Disable all interactions: >>> chart.set_user_interactions(None)
# Restore default interactions: >>> chart.set_user_interactions() >>> chart.set_user_interactions({})
- class lightningchart.charts.treemap_chart.TreeMapChartContainer(instance, container, column, row, colspan, rowspan, title, legend, theme)[source]¶
Bases:
TreeMapChart
lightningchart.charts.zoom_band_chart module¶
- class lightningchart.charts.zoom_band_chart.ZoomBandChart(instance: Instance, chart_id: str, dashboard_id: str, column_index: int, column_span: int, row_index: int, row_span: int, axis_type: str, orientation: str, use_shared_value_axis, title: str = None, html_text_rendering: bool = True)[source]¶
Bases:
Chart,UserInteractions,ChartsWithCoordinateTransformsChart that is attached to a single Axis of a ChartXY.
- add_series(series: Series)[source]¶
Add a series to the ZoomBandChart.
- Parameters:
series (Series) – Series to attach.
- Returns:
The instance of the class for fluent interface.
- set_stop_axis_on_interaction(state: bool = False)[source]¶
Set whether to stop axis on interaction.
- Parameters:
state (bool) – Whether to stop axis on interaction.
- Returns:
The instance of the class for fluent interface.
- set_title(title: str)[source]¶
Set text of Chart title.
- Parameters:
title (str) – Chart title as a string.
- Returns:
The instance of the class for fluent interface.
- set_user_interactions(interactions=Ellipsis)[source]¶
Configure user interactions from a set of preset options.
- Parameters:
interactions (dict or None) –
None: disable all interactions
{} or no argument: restore default interactions
dict: configure specific interactions
Examples
# Disable all interactions: >>> zbc.set_user_interactions(None)
# Restore default interactions: >>> zbc.set_user_interactions() … zbc.set_user_interactions({})
# Configure specific interactions: >>> zbc.set_user_interactions( … { … ‘pan’: {‘drag’: False, ‘click’: True}, … ‘zoom’: {‘wheel’: ‘undefined’, ‘dragKnob’: False}, … } … )
- class lightningchart.charts.zoom_band_chart.ZoomBandChartContainer(instance: Instance, container, chart_id: str | None, title: str | None, column: int, row: int, colspan: int, rowspan: int, orientation: str, use_shared_value_axis: bool, axis_type: str)[source]¶
Bases:
ZoomBandChart
Module contents¶
- class lightningchart.charts.BackgroundChartStyle(instance: Instance)[source]¶
Bases:
Chart- set_chart_background_image(source: str, fit_mode: str = 'Stretch', surrounding_color=None, source_missing_color=None)[source]¶
Set the chart background image.
- Parameters:
source (str) – The image source. This can be: - A URL (remote image). - A local file path. - An already Base64-encoded image string.
fit_mode (str, optional) – Fit mode for the image. Options: - “Stretch” (default) - “Fill” - “Fit” - “Tile” - “Center”
surrounding_color (Color, optional) – Color for areas outside the image.
source_missing_color (Color, optional) – Color when the image fails to load.
- Returns:
The instance of the class for method chaining.
- Return type:
self
- Raises:
ValueError – If the source is invalid.
Example
>>> chart.set_chart_background_image("D:/path/to/local_image.png") >>> chart.set_chart_background_image("https://example.com/image.jpg")
- set_chart_background_video(video_source: str, fit_mode: str = 'fit', surrounding_color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None, source_missing_color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Sets the chart background to a video.
- Parameters:
- Returns:
The instance of the class for method chaining.
Example
>>> chart.set_chart_background_video("D:/path/to/local_video.mp4") >>> chart.set_chart_background_video("https://example.com/video.mp4")
- set_series_background_image(source: str, fit_mode: str = 'Stretch', surrounding_color=None, source_missing_color=None)[source]¶
Set the series background image.
- Parameters:
source (str) – The image source. This can be: - A URL (remote image). - A local file path. - An already Base64-encoded image string.
fit_mode (str, optional) – Fit mode for the image. Options: - “Stretch” (default) - “Fill” - “Fit” - “Tile” - “Center”
surrounding_color (Color, optional) – Color for areas outside the image.
source_missing_color (Color, optional) – Color when the image fails to load.
- Returns:
The instance of the class for method chaining.
- Return type:
self
- Raises:
ValueError – If the source is invalid.
Example
>>> chart.set_series_background_image("D:/path/to/local_image.png") >>> chart.set_series_background_image("https://example.com/image.jpg")
- set_series_background_video(video_source: str, fit_mode: str = 'fit', surrounding_color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None, source_missing_color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Sets the series background to a video.
- Parameters:
- Returns:
The instance of the class for method chaining.
Example
>>> chart.set_series_background_video("D:/path/to/local_video.mp4") >>> chart.set_series_background_video("https://example.com/video.mp4")
- class lightningchart.charts.Chart(instance: Instance)[source]¶
Bases:
object- close()[source]¶
Close the connection to a chart with real-time display mode.
Note: This will terminate the current Python instance!
- property legend¶
Access to chart’s default legend.
- open(method: str = None, live=False, width: int | str = '100%', height: int | str = 600)[source]¶
Open the rendering view. Method “browser” will open the chart in your browser. Method “notebook” will display the chart in a notebook environment with an IFrame component. Method “link” will return a URL of the chart that can be used to embed it in external applications.
- Parameters:
method (str) – “browser” | “notebook”
live (bool) – Whether to use real-time rendering or not.
width (int) – The width of the IFrame component in pixels.
height (int) – The height of the IFrame component in pixels.
- Returns:
Returns a URL string if method is “link”, otherwise returns the class instance.
- Return type:
self | str
- class lightningchart.charts.ChartWithCursor2D[source]¶
Bases:
CursorBehaviorMixin- add_cursor() ManualCursor2D[source]¶
Create a manual cursor.
- class lightningchart.charts.ChartWithCursor3D[source]¶
Bases:
CursorBehaviorMixin- add_cursor() ManualCursor3D[source]¶
Create a manual cursor.
- class lightningchart.charts.ChartWithCursorXY[source]¶
Bases:
CursorBehaviorMixin- add_cursor() ManualCursorXY[source]¶
Create a manual cursor (independent from the built-in cursor modes).
Notes
Manual cursors do NOT use chart.set_cursor_mode(…) hover/nearest logic.
You control their position via cursor.set_position(…). - The result table is not auto-populated for manual cursors. To display it, you must provide content via cursor.set_result_table(content=…), e.g. content=[[“X”, “60”], [“Y”, “60”]]. Otherwise the result table may remain empty/invisible even if visible=True.
- Returns:
The created manual cursor instance.
- Return type:
Examples
>>> c = chart.add_cursor() >>> c.set_position(60, 60) >>> c.set_result_table(visible=True, content=[["X", "60"], ["Y", "60"]])
- get_cursor_enabled_during_axis_animation() bool[source]¶
Get whether the built-in cursor is enabled during axis animations (pan/zoom).
- Returns:
True if enabled during axis animations, False otherwise.
- Return type:
bool
- set_cursor_enabled_during_axis_animation(enabled: bool)[source]¶
Disable/Enable Cursor during Axis Animations. Axis Animations are Axis Scale changes that are animated, such as Zooming and Scrolling done by using API (such as Axis.set_interval) or by using the mouse to click & drag on the Chart.
- Parameters:
enabled (bool) – Boolean value to enable or disable Cursor during Axis Animations.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.ChartWithLUT(instance: Instance)[source]¶
Bases:
Chart- set_lookup_table(steps: list[dict[str, any]], interpolate: bool = True, percentage_values: bool = False)[source]¶
Attach lookup table (LUT) to fill the slices with Colors based on value.
- Parameters:
steps (list[dict]) – List of {“value”: number, “color”: Color, ‘label’: ‘Label’} dictionaries.
interpolate (bool) – Whether color interpolation is used
percentage_values (bool) – Whether values represent percentages or explicit values.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.ChartWithLabelStyling(instance: Instance)[source]¶
Bases:
Chart- get_slice_color(category: str) dict[source]¶
Get the fill color of a slice (Pie / Funnel / Pyramid).
- Parameters:
category – Slice name.
- Returns:
dict with ‘color’, ‘colorHex’, ‘colorRgb’.
Notes
Call this in live mode, e.g.
chart.open(live=True)
- set_label_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color of Slice Labels.
- Parameters:
color (Color) – Color of the labels. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_label_connector_style(style: str, thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Set style of Label connector lines.
- Parameters:
style (str) – “solid” | “dashed” | “empty”
thickness (int | float) – Thickness of the connector line.
color (Color) – Color of the connector line. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_label_effect(enabled: bool)[source]¶
Set theme effect enabled on label or disabled. A theme can specify an Effect to add extra visual oomph to chart applications, like Glow effects around data or other components.
- Parameters:
enabled (bool) – Theme effect enabled.
- Returns:
The instance of the class for fluent interface.
- set_label_font(size: int | float, family: str = 'Segoe UI, -apple-system, Verdana, Helvetica', style: str = 'normal', weight: str = 'normal')[source]¶
Set font of Slice Labels.
- Parameters:
size (int | float) – CSS font size. For example, 16.
family (str) – CSS font family. For example, ‘Arial, Helvetica, sans-serif’.
weight (str) – CSS font weight. For example, ‘bold’.
style (str) – CSS font style. For example, ‘italic’
- Returns:
The instance of the class for fluent interface.
- set_label_formatter(formatter: str = 'NamePlusValue')[source]¶
Set formatter of Slice Labels.
- Parameters:
formatter – “Name” | “NamePlusValue” | “NamePlusRelativeValue”
- Returns:
The instance of the class for fluent interface.
- set_slice_colors(color_list: list[any])[source]¶
Set the colors of all slices at once.
- Parameters:
color_list (list[Color]) – list of Colors. The length must match the current number of slices! Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_slice_effect(enabled: bool)[source]¶
Set theme effect enabled on slice or disabled. A theme can specify an Effect to add extra visual oomph to chart applications, like Glow effects around data or other components.
- Parameters:
enabled (bool) – Theme effect enabled.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.ChartWithSeries(instance: Instance)[source]¶
Bases:
Chart- get_series_background_color() dict[source]¶
Get series-background color of the chart.
- Returns:
dict with ‘color’ (uint32 RGBA), ‘colorHex’ (#rrggbbaa), ‘colorRgb’ (rgb/rgba).
Notes
Call this in live mode, e.g.
chart.open(live=True)
- set_engine_background_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the background color of the chart’s ENGINE (canvas behind the chart). Use ‘transparent’ or None to hide.
- set_series_background_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color of chart series background.
- Parameters:
color (Color) – Color of the series background. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.ChartWithXYAxis[source]¶
Bases:
Chart- get_default_x_axis() Axis[source]¶
Get the reference to the default x-axis of the chart.
- Returns:
Reference to Axis class.
- class lightningchart.charts.ChartWithXYZAxis[source]¶
Bases:
Chart- get_default_x_axis() DefaultAxis3D[source]¶
Get the reference to the default x-axis of the chart.
- Returns:
Reference to Axis3D class.
- get_default_y_axis() DefaultAxis3D[source]¶
Get the reference to the default y-axis of the chart.
- Returns:
Reference to Axis3D class.
- get_default_z_axis() DefaultAxis3D[source]¶
Get the reference to the default z-axis of the chart.
- Returns:
Reference to Axis3D class.
- class lightningchart.charts.ChartsWithAddEventListener[source]¶
Bases:
object- add_event_listener(event: str, handler: callable | None = None, xy_chart=None, throttle_ms: int = 0, once: bool = False, target: str = 'auto') str[source]¶
Add event and (optionally) bind a ChartXY overlay to stay in sync with a Map/Bar view.
- Parameters:
event – str Event name emitted by the target. Common options include: - Interaction: ‘click’, ‘pointermove’, ‘pointerdown’, ‘pointerup’, ‘pointerenter’, ‘pointerleave’, ‘dblclick’ - Cursor: ‘cursortargetchange’ (reports cursor hits / mouse location) - Lifecycle/Layout: ‘ready’, ‘layoutchange’ - Map/Bar view: ‘viewchange’ (latitude/longitude + margins)
handler – Python callback receiving event data
xy_chart – ChartXY | None, keyword-only When event == ‘viewchange’, pass a ChartXY here to keep its axes and padding bound to the Map/Bar view. Ignored for other events.
throttle_ms – Minimum delay between callbacks in milliseconds
once – bool, default False, keyword-only If True, listener removes itself after first trigger
target –
{‘auto’,’seriesBackground’,’background’,’title’,’axisXTitle’,’axisYTitle’,’chart’}, default ‘auto’ Which DOM element to attach to: - ‘auto’ : For mouse/pointer events, uses plot area
(seriesBackground) if available, otherwise the chart.
’seriesBackground’: Plot area (inside axes) — best for data-space clicks/moves.
’background’ : Chart background (outside axes).
’title’ : Chart title element.
’axisXTitle’ : X-axis title element.
’axisYTitle’ : Y-axis title element.
’axisZTitle’ : Z-axis title element (3D charts only).
- ’chart’Chart object itself (e.g., ‘layoutchange’, ‘ready’,
or chart-level cursor events).
- Returns:
callback_id that identifies the registered handler (empty string if no handler was supplied).
Examples
# 1) Clicks in the plot area of a ChartXY >>> def on_click(ev): print(‘[click]’, ev) >>> xy.add_event_listener(‘click’, handler=on_click, target=’seriesBackground’)
# 2) Keep an overlayed XY chart glued to a Map view (pan/zoom/resize) >>> map_chart.add_event_listener(‘viewchange’, xy_chart=xy_overlay)
# 3) Listen cursor hits (hover) at chart level >>> def on_cursor(ev): print(ev.get(‘hits’)) >>> xy.add_event_listener(‘cursortargetchange’, handler=on_cursor, target=’chart’, throttle_ms=50)
# 4) Run code when a chart signals it is ready >>> def on_ready(_): print(‘chart ready’) >>> map_chart.add_event_listener(‘ready’, handler=on_ready, target=’chart’)
- class lightningchart.charts.ChartsWithCoordinateTransforms[source]¶
Bases:
object- translate_coordinate(coordinate: dict, target: str, source: str = None)[source]¶
Translate coordinates between client (browser) and relative (component) systems.
- Args:
coordinate: Dict with ‘x’/’y’ (relative) or ‘clientX’/’clientY’ (client) target: ‘relative’ | ‘client’ source: ‘relative’ | ‘client’ (auto-detected if None)
- Returns:
Dict with translated coordinates
Examples
>>> # Client to relative (source auto-detected) >>> loc = chart.translate_coordinate({'clientX': 500, 'clientY': 300}, target='relative') >>> print(f"Relative: x={loc['x']}, y={loc['y']}")
>>> # Relative to client >>> loc = dashboard.translate_coordinate({'x': 400, 'y': 250}, target='client', source='relative') >>> print(f"Client: x={loc['clientX']}, y={loc['clientY']}")
- class lightningchart.charts.CursorBehaviorMixin[source]¶
Bases:
objectShared cursor behavior utilities for charts with built-in cursors.
- get_cursor_formatting()[source]¶
Return the currently registered cursor formatter callable (if any).
- set_cursor_dynamic_behavior(match_point_marker_shape: bool | None = None, point_marker_fill: str | None = None, point_marker_stroke: dict | None = None, point_marker_size: int | float | tuple[float, float] | dict | None = None)[source]¶
Configure automatic cursor styling.
- Parameters:
match_point_marker_shape (bool, optional) – Match marker shape to hovered series marker.
point_marker_fill (str, optional) – Hex/RGB color or
'match-data'to use series color.point_marker_stroke (dict, optional) – {‘color’: ‘#fff’|’match-data’, ‘thickness’: float}
point_marker_size (float | tuple | dict, optional) – Uniform size or {‘x’,’y’} mapping.
- Returns:
The instance of the class for fluent interface.
- set_cursor_formatting(formatter: Callable[[dict], Any] | None)[source]¶
Set a custom formatter for the cursor tooltip.
- Parameters:
formatter (callable | None) – Python callable returning
ResultTablerows (list of lists) or None to reset to the default cursor formatting.
- set_cursor_mode(mode: str | None)[source]¶
Set built-in cursor mode.
- Parameters:
mode (str | None) – One of “disabled”, “show-nearest”, “show-nearest-interpolated”, “show-pointed”, “show-pointed-interpolated”, “show-all”, “show-all-interpolated”.
Noneis treated as"disabled".- Returns:
The instance of the class for fluent interface.
- set_custom_cursor(handler: Callable[[dict], Any] | None = None, throttle_ms: int = 0)[source]¶
Replace the built-in cursor with a custom handler.
- Parameters:
handler (callable, optional) – Receives the same payload as the chart event cursortargetchange.
throttle_ms (int, optional) – Minimum delay between handler invocations.
- class lightningchart.charts.FunnelPyramidLabelConnectorMethods[source]¶
Bases:
object- set_label_connector_gap_before_label(gap: int | float)[source]¶
Set gap before label in label connector.
- Parameters:
gap (int | float) – Gap in pixels.
- Returns:
The instance of the class for fluent interface.
- set_label_connector_gap_before_slice(gap: int | float)[source]¶
Set gap before slice in label connector.
- Parameters:
gap (int | float) – Gap in pixels.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.charts.GeneralGetMethods[source]¶
Bases:
object- get_background_fill_style() str | None[source]¶
Get chart background fill style color as rgba string (or None if transparent/unavailable).
- get_background_stroke_style() dict | None[source]¶
Get chart background stroke style.
- Returns:
{‘thickness’: number|None, ‘color’: ‘rgba(…)’|None}
- Return type:
dict | None
- get_minimum_size() dict | None[source]¶
Get minimum size of the panel.
- Returns:
{‘x’: number, ‘y’: number} or None
- Return type:
dict | None
- get_padding() dict[source]¶
Get padding around chart in pixels.
- Returns:
Margin-like object (e.g. {‘top’:..,’right’:..,’bottom’:..,’left’:..})
- Return type:
dict
- get_size_pixels()[source]¶
Get size of control as pixels.
- Returns:
Control size in pixels.
Notes
Call this in live mode, e.g.
chart.open(live=True)
- get_theme() dict[source]¶
Get the Theme currently being used.
- Returns:
Theme object.
- Return type:
dict
- get_title() str | None[source]¶
Get text of Chart title.
- Returns:
The instance of the class for fluent interface.
Notes
Call this in live mode, e.g.
chart.open(live=True)
- get_title_effect() bool[source]¶
Get whether theme effect is enabled on axis title.
A theme can specify an Effect to add extra visual elements to chart applications, like Glow effects around data or other components.
- Returns:
True if theme effect is enabled, False otherwise.
- Return type:
bool
Notes
Call this in live mode, e.g.
chart.open(live=True)Examples
>>> effect_enabled = chart.get_title_effect()
- get_title_fill_style() str | None[source]¶
Get chart title fill style (color).
- Returns:
Color as rgba string, or None if transparent.
- Return type:
str | None
Notes
Call this in live mode, e.g.
chart.open(live=True)Examples
>>> color = chart.get_title_fill_style()
- get_title_font() dict[source]¶
Get font settings of chart title.
- Returns:
- Font settings with keys:
size (float): Font size
family (str): Font family
weight (str): Font weight (e.g., ‘normal’, ‘bold’)
style (str): Font style (e.g., ‘normal’, ‘italic’)
- Return type:
dict
Notes
Call this in live mode, e.g.
chart.open(live=True)Examples
>>> font = chart.get_title_font() >>> print(f"Size: {font['size']}, Family: {font['family']}")
- get_title_margin() dict[source]¶
Get padding/margin after chart title.
- Returns:
Margin-like object (e.g. {‘top’:..,’right’:..,’bottom’:..,’left’:..})
- Return type:
dict
- class lightningchart.charts.GeneralMethods(instance: Instance)[source]¶
Bases:
Chart- add_buttonbox(text: str = None, x: int = None, y: int = None, position_scale: str = 'axis')[source]¶
Add button box to the chart.
- Parameters:
text (str) – Label text of the button.
x (int) – X position.
y (int) – Y position.
position_scale (str) – “percentage” | “pixel” | “axis”
- Returns:
Reference to ButtonBox class.
- add_checkbox(text: str = None, x: int = None, y: int = None, position_scale: str = 'axis')[source]¶
Add checkbox to the chart.
- Parameters:
text (str) – Label text of the checkbox.
x (int) – X position.
y (int) – Y position.
position_scale (str) – “percentage” | “pixel” | “axis”
- Returns:
Reference to CheckBox class.
- add_legend(**options: Unpack[LegendOptions]) Legend[source]¶
Add a new user-managed legend to the chart.
- Parameters:
**options – Legend configuration options including: visible (bool): Whether legend should be visible (default: True) position: Legend position (LegendPosition enum or custom position dict) title (str): Legend title title_font (dict): Title font settings title_fill_style: Title color/fill style orientation: Legend orientation (LegendOrientation.Horizontal/Vertical) render_on_top (bool): Whether to render legend on top of chart background_visible (bool): Whether background should be visible background_fill_style: Background fill style background_stroke_style: Background stroke style padding: Legend content padding margin_inner: Margin from chart to legend margin_outer: Margin from legend to chart edge entry_margin: Margin between legend entries auto_hide_threshold (float): Auto-hide threshold (0.0-1.0) add_entries_automatically (bool): Whether to add entries automatically (default: False for user legends) entries (dict): Default entry options
- Returns:
New user-managed legend instance
Examples
Basic user-managed legend >>> legend = chart.add_legend(title=”Custom Legend”)
Positioned legend >>> legend = chart.add_legend( … position=’TopRight’, … orientation=’Horizontal’, … background_visible=True )
- add_pointable_textbox(text: str = None, x: int = None, y: int = None, position_scale: str = 'axis')[source]¶
Add pointable text box to the chart.
- Parameters:
text (str) – Text of the text box.
x (int) – X position.
y (int) – Y position.
position_scale (str) – “percentage” | “pixel” | “axis”
- Returns:
Reference to PointableTextBox class.
- add_textbox(text: str = None, x: int = None, y: int = None, position_scale: str = 'axis')[source]¶
Add text box to the chart.
- Parameters:
text (str) – Text of the text box.
x (int) – X position in percentages (0-100).
y (int) – Y position in percentages (0-100).
position_scale (str) – “percentage” | “pixel” | “axis”
- Returns:
Reference to Text Box class.
- buttonbox(text: str = None, x: int = None, y: int = None, position_scale: str = 'axis')¶
Add button box to the chart.
- Parameters:
text (str) – Label text of the button.
x (int) – X position.
y (int) – Y position.
position_scale (str) – “percentage” | “pixel” | “axis”
- Returns:
Reference to ButtonBox class.
- checkbox(text: str = None, x: int = None, y: int = None, position_scale: str = 'axis')¶
Add checkbox to the chart.
- Parameters:
text (str) – Label text of the checkbox.
x (int) – X position.
y (int) – Y position.
position_scale (str) – “percentage” | “pixel” | “axis”
- Returns:
Reference to CheckBox class.
- get_background_color() dict[source]¶
Get chart background color.
- Returns:
dict with ‘color’, ‘colorHex’, ‘colorRgb’.
- pointable_textbox(text: str = None, x: int = None, y: int = None, position_scale: str = 'axis')¶
Add pointable text box to the chart.
- Parameters:
text (str) – Text of the text box.
x (int) – X position.
y (int) – Y position.
position_scale (str) – “percentage” | “pixel” | “axis”
- Returns:
Reference to PointableTextBox class.
- save_to_file(file_name: str = None, image_format: str = 'image/png', image_quality: float = 0.92, scale: float = None)[source]¶
Save the current rendering view as a screenshot.
- Parameters:
file_name (str) – Name of prompted download file as string. File extension shouldn’t be included as it is automatically detected from ‘type’-argument.
image_format (str) – A DOMString indicating the image format. The default format type is image/png.
image_quality (float) – A Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp. If this argument is anything else, the default value for image quality is used. The default value is 0.92.
scale (float) – Convenience output scaling factor. This doesn’t actually stretch the result, but instead draws an altered scaled version and captures that.
- Returns:
The instance of the class for fluent interface.
- set_animations_enabled(enabled: bool = True)[source]¶
Disable/Enable all animations of the Chart.
- Parameters:
enabled (bool) – Boolean value to enable or disable animations.
- Returns:
The instance of the class for fluent interface.
- set_background_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the background color of the chart.
- Parameters:
color (Color) – Color of the background. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_background_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Set the background stroke style of the chart.
- Parameters:
thickness (int | float) – Thickness of the stroke.
color (Color) – The color of the stroke. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_padding(*args, **kwargs: Unpack[PaddingKwargs])[source]¶
Set padding around the chart in pixels.
- Parameters:
*args – A single numeric value (int or float) for uniform padding on all sides.
**kwargs – Optional named arguments to specify padding for individual sides: - left (int or float): Padding for the left side. - right (int or float): Padding for the right side. - top (int or float): Padding for the top side. - bottom (int or float): Padding for the bottom side.
Examples
set_padding(5): Sets uniform padding for all sides (integer or float).
set_padding(left=10, top=15): Sets padding for specific sides only.
set_padding(left=10, top=15, right=20, bottom=25): Fully define padding for all sides.
- Returns:
The instance of the class for fluent interface.
- textbox(text: str = None, x: int = None, y: int = None, position_scale: str = 'axis')¶
Add text box to the chart.
- Parameters:
text (str) – Text of the text box.
x (int) – X position in percentages (0-100).
y (int) – Y position in percentages (0-100).
position_scale (str) – “percentage” | “pixel” | “axis”
- Returns:
Reference to Text Box class.
- class lightningchart.charts.TitleMethods(instance: Instance)[source]¶
Bases:
Chart- hide_title()[source]¶
Hide title and remove padding around it.
- Returns:
The instance of the class for fluent interface.
- set_title(title: str)[source]¶
Set text of Chart title.
- Parameters:
title (str) – Chart title as a string.
- Returns:
The instance of the class for fluent interface.
- set_title_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set color of Chart title.
- Parameters:
color (Color) – Color of the title. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_title_effect(enabled: bool = True)[source]¶
Set theme effect enabled on component or disabled.
- Parameters:
enabled (bool) – Theme effect enabled.
- Returns:
The instance of the class for fluent interface.
- set_title_font(size: int | float, family: str = 'Segoe UI, -apple-system, Verdana, Helvetica', style: str = 'normal', weight: str = 'normal')[source]¶
Set font of Chart title.
- Parameters:
size (int | float) – CSS font size. For example, 16.
family (str) – CSS font family. For example, ‘Arial, Helvetica, sans-serif’.
weight (str) – CSS font weight. For example, ‘bold’.
style (str) – CSS font style. For example, ‘italic’
- Returns:
The instance of the class for fluent interface.
- set_title_margin(*args, **kwargs: Unpack[PaddingKwargs])[source]¶
Specifies padding after chart title.
- Parameters:
*args – A single numeric value (int or float) for uniform padding on all sides.
**kwargs – Optional named arguments to specify padding for individual sides: - left (int or float): Padding for the left side. - right (int or float): Padding for the right side. - top (int or float): Padding for the top side. - bottom (int or float): Padding for the bottom side.
Examples
set_title_margin(5): Sets uniform padding for all sides (integer or float).
set_title_margin(left=10, top=15): Sets padding for specific sides only.
set_title_margin(left=10, top=15, right=20, bottom=25): Fully define padding for all sides.
- Returns:
The instance of the class for fluent interface.