Skip to main content

recommend_charts

Function recommend_charts 

Source
pub fn recommend_charts(
    s: &Session,
    p: &Value,
) -> Result<Vec<(&'static str, &'static str, &'static str)>>
Expand description

Chart types that suit the shape of the data, best first, as (type, subtype, label) for insert.chart. Our own heuristic from the shape of the block (series count, points per series, text categories, negative values), not a copy of Excel’s ranking: two numeric columns without labels → scatter; one short series → column, pie, bar; long series → line; several series → clustered and stacked columns and bars, line.