Expand description
Prepare chart data from a LazyFrame: read the chart’s columns, then make points,
bins or statistics. Every chart reads through read_columns: up to a row limit,
spread across the table by the analysis sampler (not its first rows), returning
RowsRead so the chart can say when it shows a sample.
Structs§
- Aggregate
Spec - What an aggregated line or scatter chart groups by and makes of the rows.
- Bar
- One bar: its category (
Nonefor null) and value. Split by color, a row of bars per group (Nonefor an empty group), valued at their total. - BarAggregate
- What an aggregated bar chart groups by and makes of the rows.
- BarData
- A bar chart: one bar per category, in order, up to
BAR_CAP. - BoxMarks
- A box and its whiskers as line segments, the box
halfeither side ofcenterand the capscapeither side; Y in data values, X in whatever unitcenteris. - BoxPlot
Data - BoxPlot
Stats - Box plot stats for a column.
- Chart
Data Result - Result of preparing chart data: series points and x-axis kind for label formatting.
- Chart
Sampling - How a chart reads its rows.
- ChartX
Range Result - The X column’s range alone, for a line or scatter chart’s axes before any Y.
- Clipped
- A range that left values out: which, and how many.
- Color
Split - A color split: the column and the values given a group each, in color order (
Nonefor nulls). Withother, all other values form one more group,OTHER. - Grouped
Series - Series of a line or scatter chart, each named: a Y column’s or a color group’s.
- Heatmap
Data - Heatmap data for two numeric columns.
- Held
Rows - The rows a chart last read from one view: other bins, ranges, bandwidths or charts over the same columns draw from them, describing one sample. Shared with the reading worker; the view’s owner starts a new one when the view changes.
- Histogram
Bin - Histogram bin (center and count).
- Histogram
Data - Histogram data for a single column.
- Histogram
Group - One group’s bins of a histogram split by a color: its count (or share) per bin, on the bins of the whole.
- KdeData
- KdeSeries
- KDE series and bounds.
- Rows
Read - What a chart read: the rows the table has, and how many of them were sampled when that was fewer.
- Value
Rows - A column’s values with the rows holding each, most rows first (equal counts in the column’s order), counted over the whole view.
Enums§
- BarOrder
- The order of a bar chart’s bars, top to bottom.
- Value
Range - Which values a histogram, box plot or KDE draws. Outliers far from the body squash it into a bin or two; a percentile range leaves them out and says how many.
- XAxis
Temporal Kind - Describes how x-axis numeric values map to temporal types for label formatting.
Constants§
- AGGREGATE_
POINTS_ MAX - Most points an aggregated chart keeps. Past this X is close to a value per row, and a time bucket is what it needs.
- BAR_CAP
- Most bars a bar chart prepares; the rest are counted, not drawn. More than a tall terminal shows, few enough that an export stays legible.
- COUNT_
CATEGORY_ CAP - Categories a count keeps before it stops: past this the column is an identifier, not a category, and a count per value would hold as much as the table.
- OTHER
- The name of the group of every value not given one of its own.
Functions§
- accumulate
- Make
pointscumulative along X: a running sum, or returns compounded (each value a rate; the point is what 1 grew to, less 1). - chart_
notes - The chart’s notes under the plot, one line each: that it is a sample (with its seed) and how many values a range left out. Empty when it shows everything.
- color_
groups - The groups a color makes: the values picked, in the order picked, or else the
largest by rows; at most
most, one per series color. - drawing_
order - The order
nseries are drawn in: Other first, under the series drawn over it. - group_
label - A group’s name as a legend writes it.
- is_
category_ dtype - Column types a bar chart takes as its category: text, categories, booleans and integers. A float or a timestamp is a measure, not a category.
- other_
at - Where Other is among
nseries: the last, when there is one. - prepare_
aggregate_ xy - A line or scatter of Y aggregated per X (per time bucket for temporal X) and per
color group, in one lazy group-by over the view. A count needs no Y; other aggregates
draw a series per Y column (or color group of the first). Cumulative: each point is
the running total through its X, per series: a running sum, or compounded rates
(1 + y1)(1 + y2)... - 1(via summedln(1 + y)); the aggregate is ignored, except a count runs as a row count. - prepare_
bar_ aggregate - A bar chart of
valueaggregated per category (and color group) in one lazy group-by; a count needs no value column, and uncolored is the exact count chart. - prepare_
bar_ counts - A bar chart of rows per category, exact: the whole view is counted in one streamed
pass keeping only counts (or the held rows, if they are the whole view). Past
COUNT_CATEGORY_CAPcategories the count stops and says so. - prepare_
bar_ data - A bar chart, one bar per row: category from
category, length fromvalue. Expects a grouped result and refuses a repeated category rather than guess. A null category is its own bar; a null value is left out, counted inno_value. - prepare_
box_ by - Prepare one box of
columnper group ofby: a box per category. The range is each group’s own, as each box describes its group. - prepare_
box_ plot_ data - The box plot of one numeric column.
- prepare_
chart_ data - XY series from the LazyFrame, X cast to f64 (temporals as ordinals). Nulls drop per
series (a null X drops the row, a null Y breaks that series’ line). Points in X
order, ties in table order. With
envelope, a view larger than the sample size is cut into steps, each drawing its low and high Y, keeping peaks a sample would miss; it reads twice, so only whereChartSampling::full_passesallows, stopping onChartSampling::cancel. - prepare_
chart_ x_ range - Loads only the x column and returns its min/max (for axis display when no y is selected).
- prepare_
heatmap_ data - Prepare heatmap data for two numeric columns. A row counts when both are present.
- prepare_
histogram_ by - A histogram of
column, split bycolorinto groups on the same bins. Withshare, a bin is its share of its group’s rows so groups of different sizes compare. The range is the whole column’s, so every group clips alike. - prepare_
kde_ by - Prepare one density curve of
columnper group ofcolor. The range is the whole column’s, so every curve is clipped alike. - prepare_
kde_ data - The density curve of one numeric column.
- prepare_
xy_ by - A line or scatter chart of
ysplit bycolor, from the rows a chart samples: one series per group, in X order, each breaking where its Y has no value. - segments
- A series split at its breaks: the runs a line joins.
- value_
rows - Count
column’s values over the whole view, or take the count held for it: one streamed pass that keeps a count per value, the one a bar chart of counts makes. - x_
axis_ label_ at - An x tick at detail
level(0 fullest),Nonepast the shortest form. Narrow axes step down until labels fit: a date to year-month then year (or month-day whenboundsfall in one year); a datetime to its date (or the minute within one day); a time to the minute. Numbers, and times out of range, usenumbers. - 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).