lightningchart.series package¶
Submodules¶
lightningchart.series.area_range_series module¶
- class lightningchart.series.area_range_series.AreaRangeSeries(chart: Chart, axis_x: Axis = None, axis_y: Axis = None, automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithDataCleaning,ComponentWithRangePaletteColoring,SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing 2D areas with ranges.
- add_arrays_high_low(high: list[int | float], low: list[int | float], start: int | float = 0, step: int | float = 1)[source]¶
Add two individual Arrays, one for high values, and another for low values.
- Parameters:
high (list[int | float]) – List of high values.
low (list[int | float]) – List of low values. Length should be equal to length of high.
start (int | float) – Start index of x-axis.
step (int | float) – The step length for x-axis.
- Returns:
The instance of the class for fluent interface.
- set_high_fill_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the high area style of the Series.
- Parameters:
color (Color) – Color of the high area. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_high_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 high stroke style of the Series.
- Parameters:
thickness (int | float) – Thickness of the high stroke.
color (Color) – Color of the high stroke. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_low_fill_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the low area style of the Series.
- Parameters:
color (Color) – Color of the low area. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_low_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 low stroke style of the Series.
- Parameters:
thickness (int | float) – Thickness of the low stroke.
color (Color) – Color of the low stroke. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
lightningchart.series.area_series module¶
- class lightningchart.series.area_series.AreaSeries(chart: Chart, 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, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithAddDataXY,SeriesWith2DLines,SeriesWithDataCleaning,PointLineAreaSeries,SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing 2D areas.
- set_fill_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set a fill color of the area.
- Parameters:
color (Color) – Color of the area. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_palette_area_coloring(steps: list[dict[str, Any]], 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]¶
Define a palette for dynamically looked up fill coloring in the series.
- Parameters:
steps (list[dict]) – List of {“value”: number, “color”: Color, ‘label’: ‘Label’} dictionaries.
interpolate (bool) – Enables automatic linear interpolation between color steps.
look_up_property (str) – “value” | “x” | “y” | “z”
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.
lightningchart.series.box_series module¶
- class lightningchart.series.box_series.BoxFigure(series: BoxSeries, dimensions: dict)[source]¶
Bases:
objectClass representing a visual box figure in the BoxSeries.
- set_body_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color of the box body.
- Parameters:
color – Color value. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_body_stroke(thickness: int | float, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Set border style of Series.
- 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_body_width(width: int | float)[source]¶
Set width of box body as a % of the width of its interval width.
- Parameters:
width – Ratio between box body width and the segments interval
- Returns:
The instance of the class for fluent interface.
- set_median_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 Series median line.
- 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_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 the box whiskers and tails.
- 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.series.box_series.BoxSeries(chart: Chart, axis_x: Axis = None, axis_y: Axis = None, automatic_color_index: int = None, dimension_strategy: str = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries type for visualizing data groups through quartiles.
- add(start: int | float, end: int | float, median: int | float, lower_quartile: int | float, upper_quartile: int | float, lower_extreme: int | float, upper_extreme: int | float)[source]¶
Add new figure to the series.
- Parameters:
start (int | float) – Start x-value.
end (int | float) – End x-value.
median (int | float) – Median y-value.
lower_quartile (int | float) – Lower quartile y-value.
upper_quartile (int | float) – Upper quartile y-value.
lower_extreme (int | float) – Lower extreme y-value.
upper_extreme (int | float) – Upper extreme y-value.
- Returns:
BoxFigure instance.
lightningchart.series.box_series_3d module¶
- class lightningchart.series.box_series_3d.BoxSeries3D(chart: Chart, automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithInvalidateData,SeriesWith3DShading,ComponentWithPaletteColoring,SeriesWithAddEventListener,SeriesWithClear,SeriesWithXYZAxes,SeriesWithCursorSeries for visualizing 3D boxes.
- set_rounded_edges(roundness: int | float | None)[source]¶
Set rounded edges of Boxes. NOTE: Rounded edges result in increased geometry precision, which in turn uses more rendering resources.
- Parameters:
roundness – Either a number in range [0, 1] describing the amount of rounding or None to disable rounded edges.
- Returns:
The instance of the class for fluent interface.
lightningchart.series.ellipse_series module¶
- class lightningchart.series.ellipse_series.EllipseFigure(series: EllipseSeries, dimensions: dict)[source]¶
Bases:
objectClass representing a visual ellipse figure in the EllipseSeries.
- set_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set a color of the ellipse figure.
- Parameters:
color (Color) – Color of the ellipse. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_dimensions(x: int | float, y: int | float, radius_x: int | float, radius_y: int | float)[source]¶
Set new dimensions for figure.
- Parameters:
x – x coordinate.
y – y coordinate.
radius_x – x radius.
radius_y – y radius.
- 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)[source]¶
Set Stroke style of the ellipse
- 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.series.ellipse_series.EllipseSeries(chart, automatic_color_index: int = None, axis_x: Axis = None, axis_y: Axis = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithClear,SeriesWithDrawOrder,FigureSeries,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing ellipses in a 2D space.
- add(x: int | float, y: int | float, radius_x: int | float, radius_y: int | float)[source]¶
Add new figure to the series.
- Parameters:
x – x-axis coordinate.
y – y-axis coordinate.
radius_x – x-axis radius.
radius_y – y-axis radius.
- Returns:
The instance of the class for fluent interface.
lightningchart.series.heatmap_grid_series module¶
- class lightningchart.series.heatmap_grid_series.HeatmapGridSeries(chart: Chart, 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, legend: LegendOptions | None = None, max_tile_size: int = None)[source]¶
Bases:
ComponentWithPaletteColoring,SeriesWithIntensityInterpolation,SeriesWithWireframe,SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing 2D heatmap data in a grid.
- invalidate_intensity_values(data, column_index: int = None, row_index: int = None, sample_index: int = None, columns: int = None, rows: int = None)[source]¶
Invalidate range of heatmap intensity values.
Supports both 2D matrix and flat array formats. Flat arrays are more efficient for large datasets and TypedArray transfer.
- Parameters:
data – Intensity values as either: - 2D matrix: list[list[int | float]] or np.ndarray (2D) - Flat array: list[int | float] or np.ndarray (1D)
column_index – Index of first invalidated column (for partial updates).
row_index – Index of first invalidated row (for partial updates).
sample_index – Sample index for scrolling heatmaps.
columns – Number of columns (required for flat array partial updates).
rows – Number of rows (required for flat array partial updates).
- Returns:
The instance of the class for fluent interface.
Examples
Full update with 2D matrix: >>> series.invalidate_intensity_values([[1, 2], [3, 4]])
Full update with flat array (efficient): >>> series.invalidate_intensity_values([1, 2, 3, 4, 5, 6])
Partial update with flat array: >>> series.invalidate_intensity_values( … data=[1, 2, 3, 4], … column_index=5, row_index=2, … columns=2, rows=2 … )
- set_aggregation(mode: str | None)[source]¶
Set heatmap intensity aggregation mode.
Notes
Works when intensity interpolation is disabled.
(e.g., set_intensity_interpolation(False))
- Parameters:
mode – Aggregation mode - ‘max’, ‘min’, or None to disable.
- Returns:
The instance of the class for fluent interface.
- set_contours(levels: list[dict] = None, shadows: str = None, show_labels: bool = None)[source]¶
Set contour lines for heatmap visualization.
- Parameters:
levels –
List of contour level configurations. Each level dict can contain: - value (float, required): Contour value threshold - label (str, optional): Text label for contour - label_color (str, optional): Color for label (hex “#FF0000” or name “red”) - label_font (dict, optional): Font settings with keys:
size (int): Font size in pixels
family (str): Font family (e.g., “Arial, sans-serif”)
weight (str): Font weight (“normal”, “bold”, “bolder”, “lighter”, or 100-900)
style (str): Font style (“normal”, “italic”, “oblique”)
- stroke_style (dict, optional): Line style with keys:
thickness (int): Line thickness in pixels
color (str): Line color (hex or name)
shadows – Shadow color for contours (hex “#000000” or name “black”, None to disable)
show_labels – Whether to show contour labels
- Returns:
The instance of the class for fluent interface.
Examples
Simple contours: >>> series.set_contours( … levels=[ … {‘value’: 10}, … {‘value’: 50}, … {‘value’: 90} … ] … )
Styled contours with labels: >>> series.set_contours( … levels=[ … { … ‘value’: 25, … ‘label’: ‘Low’, … ‘label_color’: ‘#0000FF’, … ‘label_font’: {‘size’: 14, ‘weight’: ‘bold’}, … ‘stroke_style’: {‘thickness’: 2, ‘color’: ‘#0000FF’} … }, … { … ‘value’: 75, … ‘label’: ‘High’, … ‘label_color’: ‘#FF0000’, … ‘label_font’: {‘size’: 16, ‘family’: ‘Arial’}, … ‘stroke_style’: {‘thickness’: 3, ‘color’: ‘#FF0000’} … } … ], … shadows=’#00000040’, … show_labels=True … )
- set_contours_from_palette(shadows: str = None, show_labels: bool = True)[source]¶
Generate contours automatically from the series’ palette colors.
- Parameters:
shadows – Shadow color (hex “#000000”)
show_labels – Show contour labels
Example
>>> series.set_palette_colors(steps=[...]) >>> series.set_contours_from_palette(show_labels=True)
- set_end(x: int | float, y: int | float)[source]¶
Set end coordinate of Heatmap on its X and Y axis where the last heatmap sample will be positioned.
- Parameters:
x – x-coordinate.
y – y-coordinate.
- Returns:
The instance of the class for fluent interface.
lightningchart.series.heatmap_scrolling_grid_series module¶
- class lightningchart.series.heatmap_scrolling_grid_series.HeatmapScrollingGridSeries(chart: Chart, resolution: int, scroll_dimension: str = 'columns', automatic_color_index: int = None, heatmap_data_type: str = 'intensity', axis_x: Axis = None, axis_y: Axis = None, legend: LegendOptions | None = None)[source]¶
Bases:
ComponentWithPaletteColoring,SeriesWithWireframe,SeriesWithPixelInterpolation,SeriesWithDataCleaning,SeriesWithAddIntensityValues,SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing 2D heatmap data in a grid with automatic scrolling features.
- set_aggregation(mode: str | None)[source]¶
Set heatmap intensity aggregation mode.
Notes
Works when intensity interpolation is disabled.
(e.g., set_intensity_interpolation(False))
- Parameters:
mode – Aggregation mode - ‘max’, ‘min’, or None to disable.
- Returns:
The instance of the class for fluent interface.
lightningchart.series.line_series module¶
- class lightningchart.series.line_series.LineSeries(chart: Chart, 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, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithAddDataXY,SeriesWith2DLines,PointLineAreaSeries,SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing 2D lines.
lightningchart.series.line_series_3d module¶
- class lightningchart.series.line_series_3d.LineSeries3D(chart: Chart, automatic_color_index: int = None, individual_lookup_values_enabled: bool = False, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithAddDataXYZ,SeriesWith3DLines,SeriesWith3DShading,ComponentWithLinePaletteColoring,SeriesWithClear,SeriesWithAddEventListener,SeriesWithXYZAxes,SeriesWithCursorSeries for visualizing 3D lines.
lightningchart.series.mesh_model_3d module¶
- class lightningchart.series.mesh_model_3d.MeshModel3D(chart: Chart, legend: LegendOptions | None = None)[source]¶
Bases:
ComponentWithPaletteColoring,SeriesWith3DShading,SeriesWithAddEventListener,SeriesWithXYZAxes,SeriesWithCursor- get_vertex_locations_world()[source]¶
Get vertex locations in world coordinate space.
This method retrieves the current world-space coordinates of all vertices in the mesh model. World coordinates are the final transformed positions after applying scale, rotation, location and alignment transformations.
- Returns:
- List of vertex locations where each location is a dict
with ‘x’, ‘y’, ‘z’ keys representing world coordinates. Returns empty list if mesh has no vertices.
- Return type:
list[dict]
Notes
Call this in live mode, e.g.
chart.open(live=True)
- set_animation_highlight(enabled: bool)[source]¶
Set state of component highlighting.
- Parameters:
enabled – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_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_highlight_on_hover(enabled: bool)[source]¶
Set highlight on mouse hover enabled or disabled.
- Parameters:
enabled – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_model_alignment(x: int | float, y: int | float, z: int | float)[source]¶
Set alignment of the model. Describes which “corner” of the model is positioned at model location.
- Parameters:
x – x-axis alignment.
y – y-axis alignment.
z – z-axis alignment.
- Returns:
The instance of the class for fluent interface.
- set_model_geometry(vertices: list[float], indices: list[int], normals: list[float] = None)[source]¶
Method for loading triangulated 3D model geometry data. Please note that LightningChart Python does not include any routines for parsing 3D model files. To display your 3D models with LightningChart, you have to export it to a triangulated file format (such as .OBJ), parse the data and supply list of vertices, indices and optionally normals to LightningChart Python.
- Parameters:
vertices – 3D model vertices
indices – 3D model indices
normals – 3D model normals
- Returns:
The instance of the class for fluent interface.
- set_model_location(x: int | float, y: int | float, z: int | float)[source]¶
Set location of the model.
- Parameters:
x – x-axis location.
y – y-axis location.
z – z-axis location.
- Returns:
The instance of the class for fluent interface.
- set_model_rotation(x: int | float, y: int | float, z: int | float)[source]¶
Set rotation of the model.
- Parameters:
x – x-axis rotation.
y – y-axis rotation.
z – z-axis rotation.
- Returns:
The instance of the class for fluent interface.
- set_scale(scale: float | dict)[source]¶
Set scale of the model.
- Parameters:
scale – Number for symmetric scale multiplier or dict with separate scale multipliers for x, y, z.
- Returns:
The instance of the class for fluent interface.
- set_vertex_values_from_array(values)[source]¶
Set vertex values directly from an array of numbers.
This is a simplified version of set_vertex_values that accepts a pre-computed array of values rather than a callback function. Useful for performance when values are already computed.
- Parameters:
values (list[float] | array-like) – Array of numeric values, one per vertex. Length must match the vertex count.
- Returns:
The instance for fluent interface.
- Return type:
self
lightningchart.series.parallel_coordinate_series module¶
- class lightningchart.series.parallel_coordinate_series.ParallelCoordinateSeries(chart: Chart)[source]¶
Bases:
Series,SeriesWithAddEventListener,SeriesWithCursorRepresents a single series within a ParallelCoordinateChart.
This series is associated with one ParallelCoordinateChart and is used to visualize data across the chart’s axes.
- get_color() dict[source]¶
Get color of the series.
- Returns:
Color as {‘r’: int, ‘g’: int, ‘b’: int, ‘a’: int}
- Return type:
dict
Notes
Call this in live mode, e.g.
chart.open(live=True)Example
>>> series = chart.add_series() >>> series.set_color((255, 0, 0)) >>> color = series.get_color() >>> print(color) # {'r': 255, 'g': 0, 'b': 0, 'a': 255}
- get_data() dict[str, float] | None[source]¶
Retrieve the data of the series.
The data is returned as a dictionary mapping axis names to their corresponding values.
- Returns:
A dictionary of axis-value pairs if data is set, otherwise None.
- Return type:
dict[str, float] | None
- set_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set a color fill for the series.
- Parameters:
color (Color) – Color of the series. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_data(data: dict[str, float])[source]¶
Set data points for the series.
Data is provided as a dictionary mapping axis names to values. Each axis name must match the axes defined in the associated ParallelCoordinateChart.
- Parameters:
data (dict[str, float]) – A dictionary where the keys are axis names and the values are the corresponding data values.
- Returns:
The instance of the series for fluent interface.
lightningchart.series.point_line_series module¶
- class lightningchart.series.point_line_series.PointLineSeries(chart: Chart, 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, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithAddDataXY,SeriesWith2DPoints,SeriesWith2DLines,SeriesWithIndividualPoint,PointLineAreaSeries,PointSeriesStyle,SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing 2D lines with datapoints.
lightningchart.series.point_line_series_3d module¶
- class lightningchart.series.point_line_series_3d.PointLineSeries3D(chart: Chart, 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)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithAddDataXYZ,SeriesWith3DPoints,SeriesWith3DLines,SeriesWith3DShading,ComponentWithLinePaletteColoring,SeriesWithClear,SeriesWithAddEventListener,SeriesWithXYZAxes,SeriesWithCursorSeries for visualizing 3D lines with datapoints.
lightningchart.series.point_series module¶
- class lightningchart.series.point_series.PointSeries(chart: Chart, 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, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithAddDataXY,SeriesWith2DPoints,SeriesWithIndividualPoint,PointLineAreaSeries,PointSeriesStyle,SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing 2D datapoints.
lightningchart.series.point_series_3d module¶
- class lightningchart.series.point_series_3d.PointSeries3D(chart: Chart, 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)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithAddDataXYZ,SeriesWith3DPoints,SeriesWith3DShading,SeriesWithClear,SeriesWithAddEventListener,SeriesWithXYZAxes,SeriesWithCursorSeries for visualizing 3D datapoints.
- set_individual_point_color_enabled(enabled: bool)[source]¶
Enable or disable individual point color attributes for a 3D series. When enabled, the JS side will update the point style to use IndividualPointFill; otherwise, it will revert to a default SolidFill color.
- Parameters:
enabled (bool) – True to enable individual point coloring, False to disable.
- Returns:
The instance of the series for fluent interfacing.
- Return type:
self
lightningchart.series.polar_area_series module¶
- class lightningchart.series.polar_area_series.PolarAreaSeries(chart: Chart, theme: Themes = Themes.Light, name: str = None, automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Bases:
ComponentWithPaletteColoring,Series,SeriesWithAddEventListener,GetPolarData,SolveNearestMixin,SeriesWithCursorSeries type for visualizing polar area data.
- set_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set a color of the series.
- Parameters:
color (Color) – Color of the band. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_connect_data_automatically_enabled(enabled: bool)[source]¶
Set automatic connection of first and last data points enabled or not.
- Parameters:
enabled – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_data(data: list[dict])[source]¶
Set the data for the series.
- Parameters:
data (list[dict]) – A list of dictionaries, each containing: - ‘angle’ (float): The angle in degrees. - ‘amplitude’ (float): The amplitude at that angle.
Example
>>> series.set_data([ ... {'angle': 0, 'amplitude': 5}, ... {'angle': 90, 'amplitude': 10}, ... {'angle': 180, 'amplitude': 7.5}, ... {'angle': 270, 'amplitude': 3}, ... ])
- 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)[source]¶
Set Stroke style of the series.
- 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.
lightningchart.series.polar_heatmap_series module¶
- class lightningchart.series.polar_heatmap_series.PolarHeatmapSeries(chart: Chart, sectors: int, annuli: int, data_order: str, amplitude_start: int | float = 0, amplitude_end: int | float = 1, amplitude_step: int | float = 0, legend: LegendOptions | None = None)[source]¶
Bases:
ComponentWithPaletteColoring,SeriesWithIntensityInterpolation,SeriesWithAddEventListener,SolveNearestMixin,SeriesWithCursorSeries for visualizing a Polar Heatmap with a static sector and annuli count.
- invalidate_intensity_values(values: list[list[int | float]], i_annulus: int = None, i_sector: int = None)[source]¶
Invalidate range of heatmap intensity values starting from first sector and annulus.
- Parameters:
values – Intensity value matrix.
i_annulus – First affected annulus.
i_sector – First affected sector.
- Returns:
The instance of the class for fluent interface.
- set_auto_scrolling_enabled(enabled: bool = True)[source]¶
Set whether series is taken into account with automatic scrolling and fitting of attached axes.
- Parameters:
enabled – Boolean flag.
- Returns:
The instance of the class for fluent interface.
lightningchart.series.polar_line_series module¶
- class lightningchart.series.polar_line_series.PolarLineSeries(chart: Chart, theme: Themes = Themes.Light, name: str = None, automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWith2DLines,SeriesWithAddEventListener,GetPolarData,SolveNearestMixin,SeriesWithCursorSeries type for visualizing polar line data.
- set_data(data: list[dict])[source]¶
Set the data for the series.
- Parameters:
data (list[dict]) – A list of dictionaries, each containing: - ‘angle’ (float): The angle in degrees. - ‘amplitude’ (float): The amplitude at that angle.
Example
>>> series.set_data([ ... {'angle': 0, 'amplitude': 5}, ... {'angle': 90, 'amplitude': 10}, ... {'angle': 180, 'amplitude': 7.5}, ... {'angle': 270, 'amplitude': 3}, ... ])
- 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)[source]¶
Set Stroke style of the series.
- 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.
lightningchart.series.polar_point_line_series module¶
- class lightningchart.series.polar_point_line_series.PolarPointLineSeries(chart: Chart, theme: Themes = Themes.Light, name: str = None, automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWith2DLines,SeriesWith2DPoints,SeriesWithAddEventListener,GetPolarData,SolveNearestMixin,SeriesWithCursor- enable_individual_point_colors()[source]¶
Enable individual point coloring. Required for using ‘color’ properties in data points with set_data.
- Returns:
The instance of the class for fluent interface.
- set_data(data: list[dict])[source]¶
Set the data for the series.
- Parameters:
data (list[dict]) – A list of dictionaries, each containing: - ‘angle’ (float): The angle in degrees. - ‘amplitude’ (float): The amplitude at that angle. - optional ‘color’ (Color): color property
Example
>>> series.set_data([ ... {'angle': 0, 'amplitude': 5}, ... {'angle': 90, 'amplitude': 10}, ... {'angle': 180, 'amplitude': 7.5}, ... {'angle': 270, 'amplitude': 3}, ... ])
- 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)[source]¶
Set Stroke style of the series.
- 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.
lightningchart.series.polar_point_series module¶
- class lightningchart.series.polar_point_series.PolarPointSeries(chart: Chart, theme: Themes = Themes.Light, name: str = None, automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWith2DPoints,PolarPointStyle,SeriesWithAddEventListener,GetPolarData,SolveNearestMixin,SeriesWithCursorSeries type for visualizing polar point data.
- enable_individual_point_colors()[source]¶
Enable individual point coloring. Required for using ‘color’ properties in data points with set_data.
- Returns:
The instance of the class for fluent interface.
- set_auto_scrolling_enabled(enabled: bool = True)[source]¶
Set whether series is taken into account with automatic scrolling and fitting of attached axes.
- Parameters:
enabled – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_data(data: list[dict])[source]¶
Set the data for the series.
- Parameters:
data (list[dict]) – A list of dictionaries, each containing: - ‘angle’ (float): The angle in degrees. - ‘amplitude’ (float): The amplitude at that angle. - optional ‘color’ (Color): color property
Example
>>> series.set_data([ ... {'angle': 0, 'amplitude': 5}, ... {'angle': 90, 'amplitude': 10}, ... {'angle': 180, 'amplitude': 7.5}, ... {'angle': 270, 'amplitude': 3}, ... ])
- Returns:
The instance of the class for fluent interface.
lightningchart.series.polar_polygon_series module¶
- class lightningchart.series.polar_polygon_series.PolarPolygon(series: PolarPolygonSeries)[source]¶
Bases:
objectPolygon object in the PolarPolygonSeries.
- set_geometry(points: list[dict])[source]¶
Set polygon geometry as a list of PolarPoints. NOTE: points have to be in either clockwise or counter-clockwise order. The polygon coordinates should also not intersect with themselves.
- Parameters:
points (list[dict]) – A list of dictionaries, each containing: - ‘angle’ (float): The angle in degrees. - ‘amplitude’ (float): The amplitude at that angle.
Example
>>> series.set_geometry([ ... {'angle': 0, 'amplitude': 5}, ... {'angle': 90, 'amplitude': 10}, ... {'angle': 180, 'amplitude': 7.5}, ... {'angle': 270, 'amplitude': 3}, ... ])
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.polar_polygon_series.PolarPolygonSeries(chart: Chart, theme: Themes = Themes.Light, name: str = None, automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Bases:
Series,SeriesWithAddEventListener,SolveNearestMixin,SeriesWithCursorSeries type for visualizing a collection of polygons inside the Polar coordinate system.
- set_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set a color of the series.
- Parameters:
color (Color) – Color of the band. Use ‘transparent’ or None to hide.
- 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)[source]¶
Set Stroke style of the series.
- 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.
lightningchart.series.polygon_series module¶
- class lightningchart.series.polygon_series.PolygonFigure(series: PolygonSeries, points: list[dict])[source]¶
Bases:
objectClass representing a visual polygon figure in the PolygonSeries.
- set_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set a color of the polygon.
- Parameters:
color (Color) – Color of the polygon. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_dimensions(points: list[dict])[source]¶
Set new dimensions for figure.
- Parameters:
points – List of polygon coordinates
- 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)[source]¶
Set Stroke style of the polygon.
- 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.series.polygon_series.PolygonSeries(chart, automatic_color_index: int = None, axis_x: Axis = None, axis_y: Axis = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithClear,SeriesWithDrawOrder,FigureSeries,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing polygons in a 2D space.
lightningchart.series.rectangle_series module¶
- class lightningchart.series.rectangle_series.RectangleFigure(series: RectangleSeries, dimensions: dict)[source]¶
Bases:
RectangleSeriesStyleClass representing a visual rectangle figure in the RectangleSeries.
- set_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set a color of the rectangle figure.
- Parameters:
color (Color) – Color of the rectangle. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_dimensions(x1: int | float, y1: int | float, x2: int | float, y2: int | float)[source]¶
Set new dimensions for the rectangle figure.
- Parameters:
x1 – X coordinate of rectangles bottom-left corner.
y1 – Y coordinate of rectangles bottom-left corner.
x2 – X coordinate of rectangles top-right corner.
y2 – Y coordinate of rectangles top-right corner.
- 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)[source]¶
Set Stroke style of the rectangle.
- 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.series.rectangle_series.RectangleSeries(chart, automatic_color_index: int = None, axis_x: Axis = None, axis_y: Axis = None, solve_plane: str = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithClear,SeriesWithDrawOrder,FigureSeries,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing rectangles in a 2D space.
- add(x1: int | float, y1: int | float, x2: int | float, y2: int | float)[source]¶
Add new figure to the series.
- Parameters:
x1 – X coordinate of rectangles bottom-left corner.
y1 – Y coordinate of rectangles bottom-left corner.
x2 – X coordinate of rectangles top-right corner.
y2 – Y coordinate of rectangles top-right corner.
- Returns:
The instance of the class for fluent interface.
lightningchart.series.segment_series module¶
- class lightningchart.series.segment_series.SegmentFigure(series: SegmentSeries, dimensions: dict)[source]¶
Bases:
objectClass representing a visual segment figure in the SegmentSeries.
- set_dimensions(start_x: float, start_y: float, end_x: float, end_y: float)[source]¶
Set new dimensions for figure.
- Parameters:
start_x – X value of start location
start_y – Y value of start location
end_x – X value of end location
end_y – Y value of end location
- 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)[source]¶
Set Stroke style of the figure.
- 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.series.segment_series.SegmentSeries(chart, automatic_color_index: int = None, axis_x: Axis = None, axis_y: Axis = None, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithClear,SeriesWithDrawOrder,FigureSeries,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing Segments in a 2D space.
- add_segment(start_x: int | float, start_y: int | float, end_x: int | float, end_y: int | float)[source]¶
Add new figure to the series.
- Parameters:
start_x – X value of start location
start_y – Y value of start location
end_x – X value of end location
end_y – Y value of end location
- Returns:
The instance of the class for fluent interface.
lightningchart.series.spline_series module¶
- class lightningchart.series.spline_series.SplineSeries(chart: Chart, 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, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithAddDataXY,SeriesWith2DLines,SeriesWith2DPoints,SeriesWithIndividualPoint,PointLineAreaSeries,SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing 2D splines.
lightningchart.series.step_series module¶
- class lightningchart.series.step_series.StepSeries(chart: Chart, 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, legend: LegendOptions | None = None)[source]¶
Bases:
SeriesWithAddDataPoints,SeriesWithAddDataXY,SeriesWith2DLines,SeriesWith2DPoints,SeriesWithIndividualPoint,PointLineAreaSeries,SeriesWithClear,SeriesWithDrawOrder,SeriesWithAddEventListener,SeriesWithXYAxes,SeriesWithCursorSeries for visualizing 2D steps.
lightningchart.series.surface_grid_series module¶
- class lightningchart.series.surface_grid_series.SurfaceGridSeries(chart: Chart, columns: int, rows: int, data_order: str = 'columns', automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Bases:
ComponentWithPaletteColoring,SeriesWithWireframe,SeriesWithInvalidateHeight,SeriesWithIntensityInterpolation,SeriesWithCull,SeriesWith3DShading,SeriesWithClear,SeriesWithAddEventListener,SeriesWithXYZAxes,SeriesWithCursorSeries for visualizing 3D surface data in a grid.
- invalidate_intensity_values(data: list[list[int | float]], column_index: int = None, row_index: int = None, sample_index: int = None)[source]¶
Invalidate range of surface intensity values starting from first column and row.
- Parameters:
data (list[list[int | float]]) – a number matrix.
column_index (int) – Index of first invalidated column.
row_index (int) – Index of first invalidated row.
sample_index (int) – The location along scrolling dimension is identified by a sample index. Sample index 0 would reference the first sample in the heatmap, whereas 1 the second sample.
- Returns:
The instance of the class for fluent interface.
- set_contours(value_source: str = 'y', levels: list[dict] = None)[source]¶
Set contour lines for 3D surface. Note: labels are not supported.
- Parameters:
value_source – Data source for contours (‘y’ for height, ‘intensity’ for color values)
levels – List of contour level dicts with: - value (float, required): Contour threshold - stroke_style (dict, optional): Line style with ‘thickness’ and ‘color’
- set_end(x: int | float, z: int | float)[source]¶
Set end coordinate of surface on its X and Z axis where the last surface sample will be positioned.
- Parameters:
x – x-coordinate.
z – z-coordinate.
- Returns:
The instance of the class for fluent interface.
lightningchart.series.surface_scrolling_grid_series module¶
- class lightningchart.series.surface_scrolling_grid_series.SurfaceScrollingGridSeries(chart: Chart, columns: int, rows: int, scroll_dimension: str = 'columns', automatic_color_index: int = None, legend: LegendOptions | None = None)[source]¶
Bases:
ComponentWithPaletteColoring,SeriesWithWireframe,SeriesWithIntensityInterpolation,SeriesWithCull,SeriesWithAddValues,SeriesWith3DShading,SeriesWithClear,SeriesWithAddEventListener,SeriesWithXYZAxes,SeriesWithCursorSeries for visualizing 3D surface data in a grid with automatic scrolling features.
Module contents¶
- class lightningchart.series.ComponentWithLinePaletteColoring[source]¶
Bases:
object- set_palette_line_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]¶
Define a palette for dynamically looked up fill coloring in the series.
- Parameters:
steps (list[dict]) – List of {“value”: number, “color”: Color, ‘label’: ‘Label’} dictionaries.
interpolate (bool) – Enables automatic linear interpolation between color steps.
look_up_property (str) – “value” | “x” | “y” | “z”
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.
- class lightningchart.series.ComponentWithPaletteColoring[source]¶
Bases:
object- set_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set a color fill for the series.
- Parameters:
color (Color) – Color of the series. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_empty_color_fill()[source]¶
Set empty color fill for the series.
- Returns:
The instance of the class for fluent interface.
- set_palette_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]¶
Define a palette for dynamically looked up fill coloring.
- Parameters:
steps – List of {“value”: number, “color”: Color, ‘label’: ‘Label’}.
look_up_property – “value” | “x” | “y” | “z”
interpolate – Linear interpolation between steps.
percentage_values – Values as percentages vs explicit.
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:
Self for chaining.
- class lightningchart.series.ComponentWithPointPaletteColoring[source]¶
Bases:
object- set_palette_point_coloring(steps: list[dict[str, Any]], 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]¶
Define a palette for dynamically looked up fill coloring in the series.
- Parameters:
steps (list[dict]) – List of {“value”: number, “color”: Color, ‘label’: ‘Label’} dictionaries.
interpolate (bool) – Enables automatic linear interpolation between color steps.
look_up_property (str) – “value” | “x” | “y” | “z”
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.
- class lightningchart.series.ComponentWithRangePaletteColoring[source]¶
Bases:
object- set_high_palette_coloring(steps: list[dict[str, Any]], 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]¶
Define a palette for dynamically looked up fill coloring in the series.
- Parameters:
steps (list[dict]) – List of {“value”: number, “color”: Color, ‘label’: ‘Label’} dictionaries.
interpolate (bool) – Enables automatic linear interpolation between color steps.
look_up_property (str) – “value” | “x” | “y” | “z”
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_low_palette_coloring(steps: list[dict[str, Any]], 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]¶
Define a palette for dynamically looked up fill coloring in the series.
- Parameters:
steps (list[dict]) – List of {“value”: number, “color”: Color, ‘label’: ‘Label’} dictionaries.
interpolate (bool) – Enables automatic linear interpolation between color steps.
look_up_property (str) – “value” | “x” | “y” | “z”
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.
- class lightningchart.series.FigureSeries[source]¶
Bases:
object- set_highlight_on_hover(enabled: bool, highlight_mode: str = None)[source]¶
Set highlight on mouse hover enabled or disabled.
- Parameters:
enabled – Boolean flag to enable/disable highlighting.
highlight_mode – Specific highlight behavior. Options: - ‘noHighlighting’: No highlighting on user interaction - ‘onHover’: Entire series highlights on hover - ‘onHoverIndividual’: Only specific figure highlights (for figure series)
Examples
Simple enable/disable >>> series.set_highlight_on_hover(enabled=True) >>> series.set_highlight_on_hover(enabled=False)
Specific highlight modes >>> series.set_highlight_on_hover(enabled=True, highlight_mode=’onHoverIndividual’) >>> series.set_highlight_on_hover(enabled=True, highlight_mode=’noHighlighting’)
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.PointLineAreaSeries(chart: Chart)[source]¶
Bases:
Series,ComponentWithPointPaletteColoring,ComponentWithLinePaletteColoring- alter_samples(index: int | float, samples: dict = None, count: int | float = None, offset: int | float = None, start: int | float = None, step: int | float = None, **kwargs)[source]¶
Alter existing samples in the data set. This method also supports automatically appending samples when attempting to alter samples that don’t exist in data set.
This method alters existing samples by referencing sample indexes. This simply refers to an incrementing counter of when each sample was first introduced. For example, 0 refers to first sample that was added to data set. When data cleaning is enabled, sample indexes do NOT shift. They always point to unique samples, even if old samples are removed.
- Parameters:
index – First altered sample index.
samples (dict) – Dictionary of data properties (e.g., {‘xValues’: […], ‘yValues’: […]})
count (int | float) – Number of samples to process
offset (int | float) – Start reading from this index in input arrays
start (int | float) – Starting X value for progressive data
step (int | float) – X increment for progressive data
**kwargs – Multiple parameter formats supported: x_values (list[int | float]): List of x values. y_values (list[int | float]): List of y values. lookup_values (list[int | float]): List of lookup values. ids (list[int | float]): List of ids. sizes (list[int | float]): List of size values. rotations (list[int | float]): List of rotation values. colors (list[str]): List of HEX strings (NOT COLOR OBJECTS!)
- Returns:
The instance of the class for fluent interface.
Example
- Altering samples starting from index 1:
>>> series.alter_samples( ... index=1, # Start from second sample (index 1) ... y_values=[20, 25], # Change y values of samples at index 1 and 2 ... colors=["#00ffff", "#ffaa00"] # Change colors of samples at index 1 and 2 ... )
- alter_samples_by_match(match_key: str, match_values: list[int | float], x_values: list[int | float | str] = None, y_values: list[int | float] = None, colors: list[str] = None, ids: list[int | float] = None, lookup_values: list[int | float] = None, rotations: list[int | float] = None, sizes: list[int | float] = None)[source]¶
Alter existing samples by matching any property key and values.
- Parameters:
match_key – Property to match against (e.g. “x_values”, “ids”, “lookup_values”)
match_values – Values to match for sample selection
ids_to_alter (list[int | float]) – List of ids to alter.
x_values (list[int | float]) – List of x values.
y_values (list[int | float]) – List of y values.
colors (list[str]) – List of HEX strings (NOT COLOR OBJECTS!)
ids (list[int | float]) – List of ids.
lookup_values (list[int | float]) – List of lookup values.
rotations (list[int | float]) – List of rotation values.
sizes (list[int | float]) – List of size values.
- Returns:
The instance of the class for fluent interface.
- Altering samples:
>>> series.alter_samples_by_match( ... match_key="ids", ... match_values=[101, 103], ... y_values=[20, 5], ... )
- append_json(data_array, whitelist=None, blacklist=None, start=None, step=None)[source]¶
Add several samples from dictionaries/JSON objects.
- Parameters:
data_array – Array of dictionaries representing samples
whitelist – Optional list of property names to include.
blacklist – Optional list of property names to exclude.
start – Optional start index.
step – Optional step value.
Examples
Basic x/y coordinates >>> series = chart.add_point_series() … data = [ … {“x”: 0, “y”: 10}, … {“x”: 1, “y”: 15}, … {“x”: 2, “y”: 12} … ] … series.append_json(data)
Per-point colors and sizes (requires data mapping) >>> series = chart.add_point_series(colors=True, sizes=True) … series.set_individual_point_color_enabled(True) … series.set_data_mapping({ … ‘x’: ‘timestamp’, … ‘y’: ‘temperature’, … ‘color’: ‘color’, … ‘size’: ‘size’ … }) … data = [ … {“timestamp”: 0, “temperature”: 20, “color”: “#ff0000”, “size”: 15}, … {“timestamp”: 1, “temperature”: 25, “color”: “#00ff00”, “size”: 18}, … {“timestamp”: 2, “temperature”: 22, “color”: “#0000ff”, “size”: 12} … ] … series.append_json(data)
Using custom property names with mapping >>> series = chart.add_point_series() … series.set_data_mapping({‘x’: ‘time’, ‘y’: ‘value’}) … data = [ … {“time”: 1000, “value”: 42, “label”: “Point A”}, … {“time”: 2000, “value”: 55, “label”: “Point B”} … ] … series.append_json(data)
Using whitelist to include only specific properties >>> series = chart.add_point_series() … data = [ … {“x”: 0, “y”: 10, “unwanted”: 999, “spam”: “ignore”}, … {“x”: 1, “y”: 15, “unwanted”: 888, “spam”: “ignore”} … ] … series.append_json(data, whitelist=[‘x’, ‘y’])
Using blacklist to exclude unwanted properties >>> series = chart.add_point_series() … data = [ … {“x”: 0, “y”: 10, “debug_info”: “test”, “internal_id”: 123}, … {“x”: 1, “y”: 15, “debug_info”: “test”, “internal_id”: 456} … ] … series.append_json(data, blacklist=[‘debug_info’, ‘internal_id’])
Using start/step for automatic indexing >>> series = chart.add_point_series() … series.set_data_mapping({‘x’: ‘index’, ‘y’: ‘value’}) … data = [ … {“value”: 10}, … {“value”: 15}, … {“value”: 12} … ] Auto-generate x values: 100, 105, 110 >>> series.append_json(data, start=100, step=5)
- append_sample(sample: dict = None, x: int | float | str = None, y: int | float = None, lookup_value: int | float = None, id: int | float = None, size: int | float = None, rotation: int | float = None, color: str = None, blacklist: list[str] = None, whitelist: list[str] = None, start: int | float = None, step: int | float = None)[source]¶
Add one sample to data set.
- Parameters:
sample (dict) – Sample data as dictionary (e.g., {‘x’: 0, ‘y’: 10})
x (int | float | str) – Single x value
y (int | float) – Single y value
lookup_value (int | float) – Single lookup value
id (int | float) – Single id
size (int | float) – Single size value
rotation (int | float) – Single rotation value
color (str) – Single HEX color value
blacklist (list[str]) – Properties to exclude
whitelist (list[str]) – Properties to include only
start (int | float) – Starting value for auto-increment
step (int | float) – Step value for auto-increment
Examples
Individual parameters: >>> series.append_sample(x=0, y=10, color=’#ff0000’, size=15, rotation=45, lookup_value=0.8, id=1)
Dictionary format: >>> series.append_sample({‘x’: 1, ‘y’: 15, ‘color’: ‘#00ff00’, ‘size’: 20, ‘rotation’: 90, ‘lookupValue’: 0.6, ‘id’: 2})
Mixed format (dict + individual): >>> series.append_sample({‘x’: 2, ‘y’: 12}, color=’#0000ff’, size=10)
Whitelist filtering (only include specified properties): >>> series.append_sample( … {‘x’: 3, ‘y’: 18, ‘color’: ‘#ffff00’, ‘size’: 25, ‘extraData’: 999}, … whitelist=[‘x’, ‘y’, ‘color’] … )
Blacklist filtering (exclude specified properties): >>> series.append_sample( … {‘x’: 4, ‘y’: 8, ‘color’: ‘#ff00ff’, ‘size’: 30, ‘rotation’: 180}, … blacklist=[‘size’] … )
Auto-increment with start/step: >>> series = chart.add_point_series( … schema={ … ‘x’: {‘auto’: True, ‘pattern’: ‘progressive’}, # Auto-increment x … ‘temperature’: {} … } … ) … series.set_data_mapping({‘x’: ‘x’, ‘y’: ‘temperature’}) … series.append_sample({‘temperature’: 25}, start=5, step=0.5)
- append_samples(samples: dict = None, count: int | float = None, offset: int | float = None, offset_colors: int | float = None, offset_ids: int | float = None, offset_lookup_values: int | float = None, offset_rotations: int | float = None, offset_sizes: int | float = None, start: int | float = None, step: int | float = None, **kwargs)[source]¶
Add a list of samples to data set.
- Parameters:
samples (dict) – Dictionary of data properties (e.g., {‘xValues’: […], ‘yValues’: […]})
count (int | float) – Number of samples to read from input arrays
offset (int | float) – Start reading from this index in input arrays
offset_colors (int | float) – Start reading colors from this index
offset_ids (int | float) – Start reading ids from this index
offset_lookup_values (int | float) – Start reading lookup values from this index
offset_rotations (int | float) – Start reading rotations from this index
offset_sizes (int | float) – Start reading sizes from this index
start (int | float) – Starting X value for progressive data
step (int | float) – X increment for progressive data
**kwargs –
Multiple parameter formats supported:
Coordinates: x, y, x_values, y_values Colors: color, colors Sizes: size, sizes Rotations: rotation, rotations Lookup values: lookup, lookup_value, lookup_values IDs: ids
- Returns:
The instance for fluent interface.
Examples
Basic usage with coordinate arrays: >>> series.append_samples({ … ‘xValues’: [0, 1, 2], … ‘yValues’: [10, 15, 12] … })
With color array (must match data length): >>> series.append_samples({ … ‘xValues’: [0, 1, 2], … ‘yValues’: [10, 15, 12], … ‘colors’: [‘#ff0000’, ‘#00ff00’, ‘#0000ff’] … })
Progressive data (automatic X values): >>> series.append_samples( … {‘yValues’: [10, 15, 12]}, … start=0, step=1 … )
Multiple symmetric properties: >>> series.append_samples({ … ‘xValues’: [0, 1, 2], … ‘yValues’: [10, 15, 12], … ‘sizes’: [5, 8, 6], … ‘ids’: [100, 101, 102] … })
Single color for all points: >>> series.append_samples({ … ‘x’: [0, 1, 2], … ‘y’: [0, 10, 5], … ‘colors’: ‘#ff0000’ … })
Using list: >>> series.append_samples( … x = [0, 1, 2], … y=[10, 15, 12], … colors=[‘#ff0000’, ‘#00ff00’, ‘#0000ff’] … )
With rotations and lookup values: >>> series.append_samples({ … ‘xValues’: [0, 1, 2, 3], … ‘yValues’: [10, 15, 12, 18], … ‘rotations’: [0, 45, 90, 135], … ‘lookupValues’: [0.1, 0.5, 0.8, 0.3] … })
Using offset to slice arrays: >>> series.append_samples(samples={ … ‘xValues’: [0, 1, 2, 3, 4, 5], … ‘yValues’: [10, 15, 12, 18, 20, 25] … }, offset=2, count=3) # Uses elements [2,3,4]
Different offsets for different properties: >>> series.append_samples({ … ‘xValues’: [0, 1, 2, 3, 4, 5], … ‘yValues’: [10, 15, 12, 18, 20, 25], … ‘colors’: [(255, 0, 0), “#00ff00”, “#0000ff”, “yellow”, ‘#ff00ff’], … ‘sizes’: [5, 8, 6, 10, 12, 7] … }, offset=1, offsetColors=0, offsetSizes=2, count=3) # Uses x[1:4], y[1:4], colors[0:3], sizes[2:5]
Using offsets: >>> series.append_samples(x=[0,1,2,3,4], y=[10,15,12,18,20], … colors=[‘#ff0000’,’#00ff00’,’#0000ff’,’#ffff00’], … offset=1, count=3, offset_colors=0)
- read_back(only_in_range: dict | None = None, as_numpy: bool = True, colors: str | None = None, palette_steps: bool = False)[source]¶
Read back the current contents of the data set.
- Parameters:
only_in_range – dict | None, default None Filter by X-range (progressive axis). Format: {‘start’: <x_min>, ‘end’: <x_max>}.
as_numpy – bool, default True If True, TypedArrays are decoded to NumPy arrays; otherwise Python lists.
colors – {“uint32”,”hex”,”hex_rgba”,”rgb”,”html”} | None, default None If not None, request per-point colors : - “uint32”: keep/convert to np.uint32 (packed RGBA as in LCJS). - “hex”: add colorsHex as “#RRGGBB”. - “hex_rgba”: add colorsHex as “#RRGGBBAA”. - “rgb”: add colorsRGB as “rgb(…)” or “rgba(…)”. - “html”: add colorsHTML using a CSS name if exact (alpha==255), else hex/rgba fallback. .. tip:: With paletted (dynamic) coloring, per-point colors don’t exist natively.
palette_steps – bool, default False If True, return a palette summary (the LUT step colors and their threshold values) instead of per-point colors (useful when you defined a few discrete colors and only want that range description).
Examples
Read only X in [0, 100] >>> data = series.read_back(only_in_range={‘start’: 0, ‘end’: 100})
Read visible X-range (if your wrapper exposes get_interval()) xmin, xmax = chart.get_default_x_axis().get_interval() data = series.read_back(only_in_range={‘start’: xmin, ‘end’: xmax})
Get per-point colors as HTML color names/values >>> data = series.read_back(colors=”html”)
Get only the LUT step colors (no per-point array) >>> data = series.read_back(palette_steps=True)
- Returns:
dict with xValues, yValues, colors, sizes, rotations, lookupValues, iSampleFirst, paletteSteps, paletteInterpolate and lookUpProperty where all TypedArrays are decoded to NumPy arrays (or lists).
- set_curve_preprocessing(type: str, step: str = None, resolution: int | float = 20)[source]¶
Set curve preprocessing mode.
- Parameters:
type – “step” | “spline” |
step – “before” | “middle” | “after”
resolution – Number of interpolated coordinates between two real data points.
- Returns:
The instance of the class for fluent interface.
- set_data_mapping(mapping)[source]¶
Set data mapping for x, y coordinates. Data mapping specifies how data properties of the schema should be used.
- Parameters:
mapping – Dict like {‘x’: ‘timestamp’, ‘y’: ‘value’}
- set_max_sample_count(max_sample_count: int, automatic: bool = True)[source]¶
All real-time use cases (where data points are pushed in periodically) must define a “max sample count”. This allocates the required amount of memory beforehand, which is crucial to get the best performance.
- Parameters:
max_sample_count (int) – After this sample count is reached, the oldest samples will start dropping out.
automatic (bool) – If true, the chart will first allocate only small amount of memory, and progressively increase memory allocation as samples come in until eventually limiting to max_sample_count.
- Returns:
The instance of the class for fluent interface.
- set_samples(samples: dict = None, count: int | float = None, offset: int | float = None, start: int | float = None, step: int | float = None, **kwargs)[source]¶
Re-specify all values in the data set. This is a convenience method that is fundamentally equal to:
series.clear().append_samples( … )
- Parameters:
samples (dict) – Dictionary of data properties (e.g., {‘xValues’: […], ‘yValues’: […]})
start (int | float)
step (int | float)
count (int | float)
offset (int | float)
**kwargs – Multiple parameter formats supported: x_values (list[int | float]): List of x values. y_values (list[int | float]): List of y values. lookup_values (list[int | float]): List of lookup values. ids (list[int | float]): List of ids. sizes (list[int | float]): List of size values. rotations (list[int | float]): List of rotation values. colors (list[str]): List of HEX strings (NOT COLOR OBJECTS!)
- Returns:
The instance of the class for fluent interface.
Example
With count and offset: >>> series.set_samples( … samples={ … ‘xValues’: [0, 1, 2, 3, 4, 5, 6], # 7 values … ‘yValues’: [5, 10, 15, 20, 25, 30, 35], … ‘colors’: [“#aa0000”, “#00aa00”, “#0000aa”, “#aaaa00”, “#aa00aa”, “#00aaaa”, “#aaaaaa”] … }, … offset=1, # Skip first value … count=4 # Use only 4 values after offset … )
- class lightningchart.series.PointSeriesStyle(chart: Chart)[source]¶
Bases:
Series- set_custom_point_shape(source: str)[source]¶
Set a custom shape for the Series points using an image.
- Parameters:
source (str) – The source of the image, either a file path or a URL.
- Returns:
The Series instance for a fluent interface.
- Return type:
self
Example
>>> series.set_custom_point_shape("D:/path/to/local_image.png") >>> series.set_custom_point_shape("https://example.com/icon.png")
- set_point_image_style(source: str)[source]¶
Set the point fill style of the Series with an image.
- Parameters:
source (str) – The source of the image, either a file path or a URL.
- Returns:
The Series instance for fluent interface.
- Return type:
self
Example
>>> series.set_point_image_style("D:/path/to/local_image.png") >>> series.set_point_image_style("https://example.com/image.jpg")
- set_point_video_style(video_source: str)[source]¶
Sets the point fill style of a series to a video.
- Parameters:
video_source (str) – Path or URL to the video file (MP4 or WEBM).
- Returns:
The instance of the class for method chaining.
- Return type:
self
Example
>>> series.set_point_video_style("D:/path/to/local_video.mp4") >>> series.set_point_video_style("https://example.com/video.mp4")
- class lightningchart.series.PolarPointStyle(chart: Chart)[source]¶
Bases:
Series- set_custom_point_shape(source: str)[source]¶
Set a custom shape for the Series points using an image.
- Parameters:
source (str) – The source of the image, either a file path or a URL.
- Returns:
The Series instance for a fluent interface.
- Return type:
self
Example
>>> series.set_custom_point_shape("D:/path/to/local_image.png") >>> series.set_custom_point_shape("https://example.com/icon.png")
- set_point_image_style(source: str)[source]¶
Set point fill style of the Series with polar coordinates.
- Parameters:
source (str) – The source of the image (local file or URL).
- Returns:
The instance for fluent interface.
- Return type:
self
Examples
>>> series.set_point_image_style("D:/path/image.png", ) >>> series.set_point_image_style("https://example.com/image.jpg")
- set_point_video_style(video_source: str)[source]¶
Sets the polar point fill style to a video using a Base64-encoded video as the source.
- Parameters:
video_source (str) – Path to the video file (MP4 or WEBM) or a URL.
- Returns:
The instance for fluent interfacing.
- Return type:
self
Example
>>> series.set_point_video_style("D:/path/to/local_video.mp4") >>> series.set_point_video_style("https://example.com/video.mp4")
- class lightningchart.series.RectangleSeriesStyle(chart: Chart)[source]¶
Bases:
Series- set_image_style(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
>>> series.set_rectangle_image_style("D:/path/to/local_image.png") >>> series.set_rectangle_image_style("https://example.com/image.jpg")
- set_video_style(video_source: str, fit_mode: str = 'Stretch', 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 by updating the area fill style.
- Parameters:
- Returns:
The instance of the class for method chaining.
- Return type:
self
Example
>>> series.set_rectangle_video_style("D:/path/to/local_video.mp4") >>> series.set_rectangle_video_style("https://example.com/video.mp4")
- class lightningchart.series.Series(chart: Chart)[source]¶
Bases:
object- set_cursor_enabled(enabled: bool)[source]¶
Configure whether cursors should pick on this particular series or not.
- Parameters:
enabled (bool) – Boolean flag.
- Returns:
The instance of the class for fluent interface.
- set_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_highlight(highlight: bool | int | float)[source]¶
Set state of component highlighting.
- Parameters:
highlight (bool | int | float) – Boolean or number between 0 and 1, where 1 is fully highlighted.
- Returns:
The instance of the class for fluent interface.
- set_name(name: str)[source]¶
Sets the name of the Component updating attached LegendBox entries.
- Parameters:
name (str) – Name of the component.
- Returns:
The instance of the class for fluent interface.
- set_pointer_events(enabled: bool)[source]¶
Set whether element can be target of pointer events or not. Disabling pointer events means that the objects below this component can be interacted through it.
- Parameters:
enabled (bool) – Specifies state of mouse interactions.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWith2DLines(chart: Chart)[source]¶
Bases:
Series- set_dashed(pattern: str = 'Dashed', thickness: int | float = None, color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None = None)[source]¶
Change the line stroke style to dashed line.
- Parameters:
pattern (str) – “DashDotted” | “Dashed” | “DashedEqual” | “DashedLoose” | “Dotted” | “DottedDense”
thickness (int | float) – Thickness of the line. Use -1 thickness to enable primitive line rendering.
color (Color) – The color of the line (optional). 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 color of a 2D line series.
- Parameters:
color (Color) – The color of the line. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWith2DPoints(chart: Chart)[source]¶
Bases:
Series- set_point_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color of all 2D datapoints within a series.
- Parameters:
color (Color) – The color of the points. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- set_point_rotation(degrees: int | float)[source]¶
Set the rotation of all 2D datapoints within a series.
- Parameters:
degrees (int | float) – Rotation in degrees.
- Returns:
The instance of the class for fluent interface.
- set_point_shape(shape: str = 'circle')[source]¶
Set shape of displayed points.
- Parameters:
shape (str) – “arrow” | “circle” | “cross” | “diamond” | “minus” | “plus” | “square” | “star” | “triangle”
- Returns:
The instance of the class for fluent interface.
- set_point_size(size: int | float)[source]¶
Set the size of all 2D datapoints within a series.
- Parameters:
size (int | float) – Size of a single datapoint in pixels.
- Returns:
The instance of the class for fluent interface.
- set_point_stroke_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]¶
Configure stroke style for line drawn around edges of the points.
- 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.
- class lightningchart.series.SeriesWith3DLines(chart: Chart)[source]¶
Bases:
Series- set_line_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color of a 3D line series.
- Parameters:
color (Color) – The color of the line. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWith3DPoints(chart: Chart)[source]¶
Bases:
Series- set_palette_point_colors(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]¶
Define a palette for dynamically looked up fill coloring for the points.
- Parameters:
steps (list[dict]) – List of {“value”: number, “color”: Color, ‘label’: ‘Label’} dictionaries.
interpolate (bool) – Enables automatic linear interpolation between color steps.
look_up_property (str) – “value” | “x” | “y” | “z”
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_point_color(color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color | None)[source]¶
Set the color of all 3D datapoints within a series.
- Parameters:
color (Color) – Color of the points. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWith3DShading(chart: Chart)[source]¶
Bases:
Series- set_color_shading_style(phong_shading: bool = True, specular_reflection: float = 0.5, specular_color: str | int | tuple[int, int, int] | tuple[int, int, int, int] | dict[str, int] | Color = '#ffffff')[source]¶
Set Color Shading Style for series.
- Parameters:
phong_shading (bool) – If True, use Phong shading style. If False, use simple shading style.
specular_reflection (float) – Controls specular reflection strength. Value ranges from 0 to 1. Default is 0.5.
specular_color (Color) – Specular highlight color.
- Returns:
The instance of the class for fluent interface.
- set_depth_test_enabled(enabled: bool)[source]¶
Set 3D depth test enabled for this series. By default, this is enabled, meaning that any series that is rendered after this series and is behind this series will not be rendered. Can be disabled to alter 3D rendering behavior.
- Parameters:
enabled (bool) – Depth test enabled?
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithAddArray(chart: Chart)[source]¶
Bases:
Series- add_array_x(array: list[int | float])[source]¶
Append new data points into the series by only supplying X coordinates.
- Parameters:
array (list[int | float]) – List of numbers | Pandas DataFrame column | NumPy array
- Returns:
The instance of the class for fluent interface.
- add_array_y(array: list[int | float])[source]¶
Append new data points into the series by only supplying Y coordinates.
- Parameters:
array (list[int | float]) – List of numbers | Pandas DataFrame column | NumPy array
- Returns:
The instance of the class for fluent interface.
- add_arrays_xy(array_x: list[int | float], array_y: list[int | float])[source]¶
Append new data points into the series by supplying X and Y coordinates in two separated arrays.
- Parameters:
array_x (list[int | float]) – List of numbers | Pandas DataFrame column | NumPy array
array_y (list[int | float]) – List of numbers | Pandas DataFrame column | NumPy array
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithAddDataPoints(chart: Chart)[source]¶
Bases:
Series- add_dict_data(data: dict[str, int | float] | list[dict[str, int | float]])[source]¶
Append a single datapoint or list of datapoints into the series.
- Parameters:
data (dict[str, int | float] | list[dict[str, int | float]]) – List of datapoints or a single datapoint.
Examples
Single 2D point >>> series.add_dict_data({“x”: 0, “y”: 10})
Multiple 2D points >>> series.add_dict_data([ … {“x”: 0, “y”: 10}, … {“x”: 1, “y”: 15} … ])
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithAddDataXY(chart: Chart)[source]¶
Bases:
Series- add(*args: object, **kwargs: object)[source]¶
Add xy-data to the series. Can be used in two ways:
`series.add(x, y)`, where x and y are lists containing numbers.`series.add(data)`, where data is array of dictionaries with x and y keys.
- Additional parameters:
colors: List of colors for each point sizes: List of sizes for each point rotations: List of rotations for each point ids: List of IDs for each point lookup_values: List of lookup values for each point
Examples
Basic coordinate lists >>> series.add([0, 1, 2], [10, 15, 12])
Using kwargs >>> series5.add( … x=[0, 1, 2, 3], … y=[10, 15, 12, 18], … colors=[‘#ff0000’, ‘#00ff00’, ‘#0000ff’, ‘#ffff00’], … sizes=[5, 10, 15, 8], … rotations=[0, 45, 90, 135], … ids=[100, 101, 102, 103], … lookup_values=[0.1, 0.5, 0.8, 0.3] … )
JSON data with colors >>> json_data = [ … {“x”: 0, “y”: 10, “color”: “#ff0000”, “size”: 15}, … {“x”: 1, “y”: 15, “color”: “#00ff00”, “size”: 20}, … {“x”: 2, “y”: 12, “color”: “#0000ff”, “size”: 18}, … {“x”: 3, “y”: 18, “color”: “#ffff00”, “size”: 12} … ] … series7.add(json_data)
Different color formats >>> series9.add( … x=[0, 1, 2, 3, 4], … y=[10, 15, 12, 18, 14], … colors=[ … ‘#ff0000’, # Hex string … ‘red’, # CSS color name … (0, 255, 0), # RGB tuple … {‘r’: 0, ‘g’: 0, ‘b’: 255}, # RGB dict … 16777215 # Integer … ] … )
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithAddDataXYZ(chart: Chart)[source]¶
Bases:
Series- add(*args, **kwargs)[source]¶
Add xyz-data to the series. Can be used in two ways:
`series.add(x, y, z)`, where x, y, and z are lists containing numbers.`series.add(data)`, where data is array of dictionaries with x, y, and z keys with numerical values.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithAddEventListener[source]¶
Bases:
object- add_event_listener(event: str, handler: callable | None = None, throttle_ms: int = 0, once: bool = False) str[source]¶
Add event listener to series.
- Parameters:
event – Event name (‘click’, ‘pointermove’, ‘pointerdown’, etc.)
handler – Python callback receiving event data
throttle_ms – Minimum delay between callbacks in milliseconds
once – If True, listener removes itself after first trigger
- Returns:
callback_id identifying the registered handler
- class lightningchart.series.SeriesWithAddIntensityValues(chart: Chart)[source]¶
Bases:
Series- add_intensity_values(new_data_points: list[list[int | float]])[source]¶
Push a Matrix of intensity values into the Heatmap grid. Each value describes one cell in the grid.
- Parameters:
new_data_points (list[list[int | float]]) – a number matrix.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithAddValues(chart: Chart)[source]¶
Bases:
Series- add_values(y_values: list[list[int | float]] = None, intensity_values: list[list[int | float]] = None)[source]¶
Append values to the Surface Scrolling Grid Series.
The series type can contain between 1 and 2 different data sets (Y values and Intensity values). This same method is used for managing both types of data;
- Parameters:
y_values (list[list[int | float]]) – a number matrix.
intensity_values (list[list[int | float]]) – a number matrix.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithCursor[source]¶
Bases:
objectMixin for series cursor functionality (Series2D, Series3D, PolarSeries, etc.).
- get_cursor_enabled() bool[source]¶
Get whether cursor picking is enabled for this series.
- Returns:
True if cursor is enabled for this series.
- Return type:
bool
- get_cursor_formatting_override() bool[source]¶
Check if a cursor formatting override is set.
- Returns:
True if an override is set.
- Return type:
bool
- set_cursor_enabled(enabled: bool = True)[source]¶
Enable or disable cursor picking on this series.
When disabled, the chart cursor will not snap to or display information about this series.
- Parameters:
enabled (bool) – True to enable cursor on this series.
- Returns:
The instance of the class for fluent interface.
Example
>>> series.set_cursor_enabled(False) # Cursor ignores this series
- set_cursor_formatting_override(handler: Callable[[dict, list[list[str]]], list[list[str]]] | None = None)[source]¶
Set custom cursor formatting for this series. Allows customizing how this series appears in the cursor result table.
- Parameters:
handler (callable | None) –
Callback receiving a single dict with keys:
event_data[‘hit’] (dict): Solve result with pointed data.
Properties vary by series type:
- XY Series (LineSeries, PointSeries, etc.):
x, y: Coordinates
iSample: Sample index
seriesName: Series name
- Polar Series (PolarLineSeries, PolarAreaSeries, etc.):
angle: Angle in degrees
amplitude: Amplitude value
seriesName: Series name
- Polar Heatmap Series:
angle: Angle in degrees
amplitude: Amplitude value
seriesName: Series name
- 3D Series (PointSeries3D, LineSeries3D, MeshModel, etc.):
x, y, z: 3D coordinates
seriesName: Series name
- ParallelCoordinate Series:
value: Value at hit axis
axisName: Name of hit axis
seriesName: Series name
event_data[‘before’] (list[list[str]]): Default formatting rows.
Each row is a list of strings.
Returns list[list[str]]: Rows for result table. Each row should be [label, separator, value] (3 elements) or [text] (1 element for header/title rows).
Set handler to None to remove override.
- Returns:
The series instance for fluent interface.
Example
ChartXY with custom data: >>> def format_cursor(event_data): … hit = event_data.get(‘hit’, {}) … i_sample = hit.get(‘iSample’) … if i_sample is not None: … data = custom_data[int(i_sample)] … return [ … [“Series”, “”, hit.get(“seriesName”, “”)], … [“X”, “”, f”{hit.get(‘x’, 0.0):.2f}”], … [“Y”, “”, f”{hit.get(‘y’, 0.0):.2f}”], … [“Category”, “”, data[‘category’]], … [“Score”, “”, str(data[‘score’])], … ] >>> series.set_cursor_formatting_override(format_cursor)
PolarChart:
>>> def format_polar_cursor(event_data): ... hit = event_data.get('hit', {}) ... return [ ... ["Series", "", hit.get("seriesName", "")], ... ["Angle", "", f"{hit.get('angle', 0.0):.2f}°"], ... ["Amplitude", "", f"{hit.get('amplitude', 0.0):.2f}"], ... ] >>> series.set_cursor_formatting_override(format_polar_cursor)
Chart3D:
>>> def format_3d_cursor(event_data): ... hit = event_data.get('hit', {}) ... return [ ... ["Series", "", hit.get("seriesName", "")], ... ["X", "", f"{hit.get('x', 0.0):.2f}"], ... ["Y", "", f"{hit.get('y', 0.0):.2f}"], ... ["Z", "", f"{hit.get('z', 0.0):.2f}"], ... ] >>> mesh_model.set_cursor_formatting_override(format_3d_cursor)
ParallelCoordinateChart:
>>> def format_parallel_cursor(event_data): ... hit = event_data.get('hit', {}) ... return [ ... ["Axis", "", hit.get('axisName', '')], ... ["Value", "", f"{hit.get('value', 0.0):.4f}"], ... ["Note", "", "Custom info"], ... ] >>> for series in chart.get_series(): ... series.set_cursor_formatting_override(format_parallel_cursor)
Remove override:
>>> series.set_cursor_formatting_override(None)
- class lightningchart.series.SeriesWithDrawOrder[source]¶
Bases:
object- set_draw_order(index: int | float)[source]¶
Configure draw order of the series. The drawing order of series inside same chart can be configured by configuring their draw order index. This is a simple number that indicates which series is drawn first, and which last. The values can be any number, even a decimal. Higher number results in series being drawn closer to the top. By default, each series is assigned a running counter starting from 0 and increasing by 1 for each series.
- Parameters:
index (int | float) – The draw order index.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithIndividualPoint(chart: Chart)[source]¶
Bases:
Series- set_individual_point_color_enabled(enabled: bool)[source]¶
Enable or disable individual point color attributes. When enabled, each added data point can be associated with a color attribute.
- Parameters:
enabled (bool) – Individual point values enabled or disabled.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithIntensityInterpolation(chart: Chart)[source]¶
Bases:
Series- set_intensity_interpolation(enabled: bool)[source]¶
Set surface intensity interpolation mode.
- Parameters:
enabled (bool) – If True, each pixel is colored based on a bi-linearly interpolated intensity value based on the 4 closest real intensity values.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithInvalidateData(chart: Chart)[source]¶
Bases:
Series- add(data: dict[str, int | float] | list[dict[str, int | float]])[source]¶
Method for invalidating Box data. Accepts an Array of BoxDataCentered objects. Properties that must be defined for each NEW Box:
“xCenter”, “yCenter”, “zCenter” | coordinates of Box in Axis values.
“xSize”, “ySize”, “zSize” | size of Box in Axis values.
- Parameters:
data (dict[str, int | float] | list[dict[str, int | float]]) – List of BoxDataCentered objects.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithInvalidateHeight(chart: Chart)[source]¶
Bases:
Series- invalidate_height_map(data: list[list[int | float]], column_index: int = None, row_index: int = None)[source]¶
Invalidate range of surface height values starting from first column and row. These values correspond to coordinates along the Y axis.
- Parameters:
data (list[list[int | float]]) – a number matrix of height values.
column_index (int) – Index of the first column to be validated.
row_index (int) – Index of the first row to be validated.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithWireframe(chart: Chart)[source]¶
Bases:
Series- hide_wireframe()[source]¶
Hide the wireframe.
- Returns:
The instance of the class for fluent interface.
- set_wireframe_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 style of wireframe of the series.
- Parameters:
thickness (int | float) – Thickness of the wireframe.
color (Color) – Color of the wireframe. Use ‘transparent’ or None to hide.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SeriesWithXYAxes(chart, axis_x=None, axis_y=None)[source]¶
Bases:
SeriesMixin for XY series that have axes.
- class lightningchart.series.SeriesWithXYZAxes(chart, axis_x=None, axis_y=None, axis_z=None)[source]¶
Bases:
SeriesMixin for XYZ series that have axes.
- property axis_x: DefaultAxis3D¶
Get X axis this series is attached to.
- property axis_y: DefaultAxis3D¶
Get Y axis this series is attached to.
- property axis_z: DefaultAxis3D¶
Get Z axis this series is attached to.
- class lightningchart.series.SeriesWithoutCursorEnabled[source]¶
Bases:
object- set_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_highlight(highlight: bool | int | float)[source]¶
Set state of component highlighting.
- Parameters:
highlight (bool | int | float) – Boolean or number between 0 and 1, where 1 is fully highlighted.
- Returns:
The instance of the class for fluent interface.
- set_name(name: str)[source]¶
Sets the name of the Component updating attached LegendBox entries.
- Parameters:
name (str) – Name of the component.
- Returns:
The instance of the class for fluent interface.
- set_pointer_events(enabled: bool)[source]¶
Set whether element can be target of pointer events or not. Disabling pointer events means that the objects below this component can be interacted through it.
- Parameters:
enabled (bool) – Specifies state of mouse interactions.
- Returns:
The instance of the class for fluent interface.
- class lightningchart.series.SolveNearestMixin[source]¶
Bases:
object- solve_nearest(client_x: int | float = None, client_y: int | float = None, solve_mode: str = 'show-nearest') list[dict][source]¶
Solve the nearest data point to a given screen coordinate.
- Parameters:
client_x (int | float, optional) – X coordinate in client/screen pixels.
client_y (int | float, optional) – Y coordinate in client/screen pixels.
solve_mode (str) – Behavior mode - ‘show-nearest’ : show the nearest value to reference location. - ‘show-nearest-interpolated’ : show the nearest interpolated value to reference location. - ‘show-pointed’ : show the exact pointed value (directly under user pointer). - ‘show-pointed-interpolated’ : show the pointed interpolated value (directly under user pointer). - ‘show-all’ : show values from all trackables simultaneously. - ‘show-all-interpolated’ : show interpolated values from all trackables simultaneously.
- Returns:
- Results containing (based on chart/series type):
x (float): X coordinate (ChartXY)
y (float): Y coordinate (ChartXY)
angle (float): Angle in degrees [0, 360] (Polar)
amplitude (float): Amplitude value (Polar)
sector (int): Sector index (PolarHeatmap)
annulus (int): Annulus index (PolarHeatmap)
intensity (float): Intensity value (PolarHeatmap)
color (str | None): Point color as rgba string
series (str | None): Series name
- Return type:
list[dict]