Skip to main content

Module chart_data

Module chart_data 

Source
Expand description

Prepare chart data from LazyFrame: select x/y columns, collect, and convert to (f64, f64) points. All prepare_* and collect_* functions take a row_limit to cap materialized rows (default from config).

Structs§

BoxPlotData
BoxPlotStats
Box plot stats for a column.
ChartDataResult
Result of preparing chart data: series points and x-axis kind for label formatting.
ChartXRangeResult
Result of loading only the x column: min/max for axis bounds and temporal kind.
HeatmapData
Heatmap data for two numeric columns.
HistogramBin
Histogram bin (center and count).
HistogramData
Histogram data for a single column.
KdeData
KdeSeries
KDE series and bounds.

Enums§

XAxisTemporalKind
Describes how x-axis numeric values map to temporal types for label formatting.

Functions§

format_axis_label
Format a numeric axis tick (for y-axis or generic numeric).
format_x_axis_label
Format x-axis tick: dates/datetimes/times when kind is temporal, else numeric. Used by chart widget and export.
prepare_box_plot_data
Prepare box plot stats for one or more numeric columns. Uses a single collect for all columns.
prepare_chart_data
Prepares chart data from the current LazyFrame. Returns series data and x-axis kind. X is cast to f64 (temporal types as ordinal). Drops nulls and limits to row_limit rows.
prepare_chart_x_range
Loads only the x column and returns its min/max (for axis display when no y is selected). Limits to row_limit rows then scans for min/max (single column materialized).
prepare_heatmap_data
Prepare heatmap data for two numeric columns.
prepare_histogram_data
Prepare histogram data for a numeric column.
prepare_kde_data
Prepare KDE data for one or more numeric columns. Uses a single collect for all columns.
x_axis_temporal_kind_for_column
Returns the x-axis temporal kind for a column from the schema (for axis label formatting when no data is loaded yet).