API reference: charts
Charts are LibreOffice's embedded chart objects. The chart functions are in a submodule:
using OpenDocumentSpreadsheets.ChartsA few names are also available at the top level: getCharts, getChart, getChartData, getChartRanges, getChartType, getChartSchema and the chart types.
The functions read a chart as it is now: after the edits and structural operations made since the file was read. A series' values are read from its cells, as LibreOffice draws them.
OpenDocumentSpreadsheets.Charts — Module
OpenDocumentSpreadsheets.ChartsCharts: LibreOffice's embedded chart objects. Make, format and read a file's charts, with LibreOffice's behaviour.
using OpenDocumentSpreadsheets.ChartsA chart is an object (Object 1/content.xml) framed in a sheet. The functions read it as it is now, after the edits and structural operations made since the file was read.
Creating charts
A chart added here takes LibreOffice's default look (its colours, symbols, fonts and legend). It is a frame anchored in its first cell and resizing with its cells, and its references follow inserts, deletes and sheet operations as LibreOffice moves them.
OpenDocumentSpreadsheets.Charts.addChart — Function
addChart(ws::Worksheet, kind::Symbol; anchor, title = nothing, xtitle = nothing, ytitle = nothing,
subtitle = nothing, threeD = false, deep = false) -> Chart (a ChartEx for :histogram)A new chart of kind over the cells of anchor ("F2:M18"), with no series yet (add them with addSeries): a frame in the first cell, resizing with its cells up to the last, and an object in LibreOffice's default look.
kind = :histogram makes LibreOffice's histogram, which counts the values of its one series in bins: it returns a ChartEx, and takes only anchor, title, subtitle, xtitle and ytitle. See addSeries and setSeriesBinning.
kind is one of :column, :bar, :stackedColumn, :stackedBar, :percentStackedColumn, :percentStackedBar, :line, :lineMarkers, :stackedLine, :percentStackedLine, :stackedLineMarkers, :percentStackedLineMarkers, :area, :stackedArea, :percentStackedArea, :pie, :doughnut, :scatter, :bubble, :radar, :filledRadar, :combo (LibreOffice's column and line chart), :pieOfPie, :barOfPie, and the stock charts :stock (low, high, close), :stockOHLC (open, low, high, close, as candlesticks), :stockVolume and :stockVolumeOHLC (a volume series first, in columns on the left axis). A stock chart's series are added in that order.
title is text (nothing or false: none; LibreOffice has no automatic title). xtitle and ytitle title the axes (not on a pie or doughnut). LibreOffice's titles can't follow a cell: a CellRef is an error.
More options:
subtitle;threeDanddeepfor a 3-D chart;dataTable = truefor a data table under the plot;interpolationof line, XY and radar lines::straight,:smooth,:bspline,:stepStart,:stepEnd,:stepCenterX,:stepCenterY;emptyCells::gap,:zeroor:span(joined over);includeHidden: whether hidden cells are drawn;sortByX: an XY chart's points sorted by x;startAngleof a pie or doughnut: degrees anticlockwise from three o'clock (LibreOffice's; 90 starts at twelve);data, LibreOffice's chart wizard: a range whose series are made at once, in columns or rows (seriesIn = :columnsor:rows), the first row and column holding names and categories (firstRowLabels,firstColumnLabels, bothtrueby default).
using OpenDocumentSpreadsheets.Charts
ods = openods("budget.ods"; mode = "rw")
sh = ods["Costs"]
c = addChart(sh, :column; anchor = "E2:L18", title = "Costs by month", ytitle = "Amount")
addSeries(c, "B2:B13"; categories = "A2:A13", name_ref = "B1")
addChart(ods["Income"], :line; anchor = "E2:L18", data = "A1:B13") # its series from a range
saveods(ods)addChart(ods::ODSFile, kind::Symbol; sheetname = "", title = nothing, xtitle = nothing, ytitle = nothing,
kw...) -> ChartA chart on a new chart sheet (a ChartEx for :histogram): LibreOffice's form of one, an ordinary sheet named sheetname (by default Chart1, Chart2, …) holding the chart anchored to the page, after the other sheets. Add its series with addSeries, naming their sheet ("Data!B2:B7"). The other keywords are addChart's, but data (whose cells would be the chart sheet's).
OpenDocumentSpreadsheets.Charts.addSeries — Function
addSeries(c::Chart, values; categories = nothing, name = nothing, name_ref = nothing, bubble_sizes = nothing,
markers = nothing, smooth = nothing, line = nothing, color = nothing, group = nothing) -> ChartAdds a series to a chart, in LibreOffice's form:
values(andcategories,name_ref,bubble_sizes) are references:"Data.B2:B7","Data!B2:B7","B2:B7"(on the chart's sheet), or a range object.categoriesare the x axis's (a chart's, not a series': a different range later is an error), or an XY or bubble series' x values.bubble_sizesis required on a bubble chart.nameis the series' name as text (loext:label-string),name_refa cell holding it.markers(true,falseor a symbol::circle,:square,:diamond,:triangle,:x,:plus,:star,:dash,:dot,:none,:auto, and LibreOffice's:arrowDown,:arrowLeft,:bowTie,:hourglass,:loStar,:vBar) on line, radar and XY series;:pictureis an error (no picture).smoothon line and XY series: LibreOffice smooths a chart's lines all or none, so a series that differs from those before is an error.linejoins an XY series' points.color(hex, a colour name, or a theme colour such as:accent1) is the series' colour (not on a pie or doughnut, whose points are coloured one by one).group(:columnor:line) is required on a:combochart and refused elsewhere.
using OpenDocumentSpreadsheets.Charts
ods = openods("budget.ods"; mode = "rw")
sh = ods["Income"]
sh["D1"] = "Target"
for r in 2:13; sh[r, 4] = 1100.0; end
c = addChart(sh, :lineMarkers; anchor = "F2:M18")
addSeries(c, "B2:B13"; categories = "A2:A13", name_ref = "B1", color = "1F4E79")
addSeries(c, "D2:D13"; name = "Target", markers = false)
saveods(ods)addSeries(c::ChartEx, values; name = nothing, name_ref = nothing) -> ChartExAdds a histogram's series: the cells whose values it counts ("Data.B2:B201", "B2:B201" on the chart's sheet, or a range object), with its name as text (name) or from a cell (name_ref). A histogram has one series, and no categories: LibreOffice draws its bins from its values.
OpenDocumentSpreadsheets.Charts.makeCombo — Function
makeCombo(c::Chart) -> ChartMakes a :column, :stackedColumn or :line chart of two or more series LibreOffice's column and line chart: its last series becomes a line on a secondary y axis, the others clustered columns.
OpenDocumentSpreadsheets.Charts.deleteChart — Function
deleteChart(c::AbstractChart) -> NothingRemoves a chart: its frame and, at the next save, its object. A chart anchored to the page (not to a cell) can't be removed, as pictures on the page can't.
Histograms and chart sheets
addChart(…, :histogram) makes a histogram, and addSeries adds its one series; its handle is a ChartEx. addChartEx makes the same chart in one call; the other kinds it names are charts LibreOffice doesn't have, so asking for them is an error. A chart sheet is an ordinary sheet holding one chart anchored to the page.
OpenDocumentSpreadsheets.Charts.addChartEx — Function
addChartEx(ws::Worksheet, kind::Symbol, values; anchor, categories = nothing, name = nothing,
name_ref = nothing, title = nothing) -> ChartEx
addChartEx(ods::ODSFile, kind::Symbol, values; sheetname = "", …) -> ChartExA histogram of values (kind = :histogram), on a sheet or on a new chart sheet: the same as addChart(ws, :histogram; anchor, title) followed by addSeries(h, values; name, name_ref), the form these docs use. The other kinds, :waterfall, :funnel, :treemap, :sunburst, :pareto and :boxWhisker, are charts LibreOffice doesn't have, so they are errors. A histogram takes no categories, and LibreOffice draws its bins from its values (set them with setSeriesBinning, under setSeriesName).
A chart sheet is LibreOffice's form of one: an ordinary sheet, named sheetname (by default Chart1, Chart2, …), holding the chart anchored to the page. Its references name their sheet ("Data!B2:B7"), since the chart sheet's cells hold nothing.
OpenDocumentSpreadsheets.Charts.addChart — Method
addChart(ods::ODSFile, kind::Symbol; sheetname = "", title = nothing, xtitle = nothing, ytitle = nothing,
kw...) -> ChartA chart on a new chart sheet (a ChartEx for :histogram): LibreOffice's form of one, an ordinary sheet named sheetname (by default Chart1, Chart2, …) holding the chart anchored to the page, after the other sheets. Add its series with addSeries, naming their sheet ("Data!B2:B7"). The other keywords are addChart's, but data (whose cells would be the chart sheet's).
OpenDocumentSpreadsheets.Charts.getChartSeriesCount — Function
getChartSeriesCount(c::ChartEx) -> Int
getSeriesLayout(c::ChartEx, i) -> Symbol
getSeriesName(c::ChartEx, i) / getSeriesNameRange(c::ChartEx, i)
getChartDataBlocks(c::ChartEx) / getSeriesData(c::ChartEx, i)
getSeriesHidden(c::ChartEx, i) / getSeriesAxisIds(c::ChartEx, i) / getChartAxisIds(c::ChartEx)
getLabelPosition(c::ChartEx, i) / getSeriesBinning(c::ChartEx, i)A histogram's series: its layout is :clusteredColumn, its data one dimension of values (data blocks numbered from 0, one per series), its axes [0, 1]; it is never hidden. Its binning is LibreOffice's: a width or a count, or :auto for both when LibreOffice chooses. pareto = true is an error: LibreOffice has no pareto charts.
OpenDocumentSpreadsheets.Charts.setSeriesName — Function
setSeriesName(c::ChartEx, i, name) -> ChartEx
setSeriesBinning(c::ChartEx, i; binSize = nothing, binCount = nothing, intervalClosed = nothing,
underflow = nothing, overflow = nothing) -> ChartExA histogram's series name (text), and its bins: a width (binSize) or a count (binCount), or :auto (LibreOffice chooses); :inherit is :auto. LibreOffice's bins have no closed side, underflow or overflow bin: those are errors. The other setters for a histogram's handle (setSeriesSubtotals, setSeriesAggregation, setSeriesQuartileMethod, setSeriesParentLabelLayout, setSeriesLayoutFlag) are for chart kinds LibreOffice doesn't have: errors.
OpenDocumentSpreadsheets.Charts.getSeriesSubtotals — Function
getSeriesSubtotals(c::ChartEx, i) / getSeriesAggregation(c::ChartEx, i) / getSeriesQuartileMethod(c::ChartEx, i)
getSeriesParentLabelLayout(c::ChartEx, i) / getSeriesLayoutFlag(c::ChartEx, i, flag)Getters for chart kinds LibreOffice doesn't have (waterfall, box and whisker, treemap): a histogram has none of these settings, so nothing.
OpenDocumentSpreadsheets.Charts.ChartExDimension — Type
ChartExDimension, ChartExData, ChartExBinningA histogram's data and its bins. LibreOffice's histogram has one dimension, its values (kind :num, type :val, formula the ODF range, range its ChartRange); its binning is a bin width or a bin count (intervalClosed, underflow and overflow are always nothing: LibreOffice has none).
OpenDocumentSpreadsheets.Charts.ChartExData — Type
ChartExDimension, ChartExData, ChartExBinningA histogram's data and its bins. LibreOffice's histogram has one dimension, its values (kind :num, type :val, formula the ODF range, range its ChartRange); its binning is a bin width or a bin count (intervalClosed, underflow and overflow are always nothing: LibreOffice has none).
OpenDocumentSpreadsheets.Charts.ChartExBinning — Type
ChartExDimension, ChartExData, ChartExBinningA histogram's data and its bins. LibreOffice's histogram has one dimension, its values (kind :num, type :val, formula the ODF range, range its ChartRange); its binning is a bin width or a bin count (intervalClosed, underflow and overflow are always nothing: LibreOffice has none).
Changing formatting
The setters change LibreOffice's chart styles, for charts added here and for a file's own charts. Each returns the chart, and :inherit removes a setting. What LibreOffice can't store is an error: compound lines, joins and miter limits; a marker's own fill or border; bubble-size labels; text capitals, kerning sizes and outlines; a minor unit that doesn't divide the major one. Theme colours are resolved against the document's theme: LibreOffice keeps colours in a chart, not links to the theme. A line, XY or radar series has one colour, its line's and its symbols'.
OpenDocumentSpreadsheets.Charts.setSeriesFill — Function
setSeriesFill(c::AbstractChart, i, color; transparency = nothing, gradient = nothing, gradientStyle = :linear,gradientAngle = 0, hatch = nothing, hatchAngle = 0) -> Chart
Series i's fill: a colour (hex, a colour name, a theme colour such as :accent1 or a SchemeColor), :none, or :inherit (LibreOffice's default). Also: transparency, 0 to 100 percent; a gradient from color to gradient (another colour), of gradientStyle (:linear, :axial, :radial, :ellipsoid, :square, :rectangular) at gradientAngle degrees; or a hatch (:single, :double, :triple) of lines of color at hatchAngle degrees. A line, XY or radar series has one colour, its line's and its symbols' (LibreOffice's): its fill is its line colour, and :none, transparency, gradients and hatches are errors.
OpenDocumentSpreadsheets.Charts.setSeriesLine — Function
setSeriesLine(c::AbstractChart, i; color, width, dash, cap, compound, join, miterLimit) -> Chart
setSeriesLine(c::AbstractChart, i, :none | :inherit) -> Chart
setSeriesLineColor / setSeriesLineWidth / setSeriesLineDash / setSeriesLineCap(c, i, value) -> Chart
setSeriesLineCompound / setSeriesLineJoin / setSeriesLineMiterLimit(c, i, value) -> errorSeries i's line: a colour, a width in points, a dash (:solid, :dot, :dash, :lgDash (long), :dashDot, :lgDashDot, :lgDashDotDot, :sysDash, :sysDot, :sysDashDot, :sysDashDotDot; the sys ones are denser), a cap (:rnd round, :sq square, :flat). LibreOffice's chart lines have no compound lines, joins or miter limits: those are errors.
OpenDocumentSpreadsheets.Charts.setMarker — Function
setMarker(c::AbstractChart, i; point = nothing, symbol = nothing, size = nothing, fill = nothing, lineColor = nothing,
lineWidth = nothing) -> Chart
setMarkerSymbol(c, i, symbol; point = nothing) / setMarkerSize(c, i, size; point = nothing) -> Chart
setMarkerFill / setMarkerLineColor / setMarkerLineWidth(c, i, value; point = nothing) -> errorA line, XY or radar series' (or point's, from 1) symbol and size (2 to 72 points). Symbols are :circle, :square, :diamond, :triangle, :x, :plus, :star, :dash, :dot, :none, :auto, :arrowDown, :arrowLeft, :bowTie, :hourglass, :loStar and :vBar. LibreOffice draws a symbol in its series' colours: a fill or border of its own is an error.
OpenDocumentSpreadsheets.Charts.setLabelFlag — Function
setLabelFlag(c, i, flag, on) -> ChartWhether series i's labels show flag: :value, :percent, :categoryName, :seriesName, :legendKey. LibreOffice has no bubble-size labels: :bubbleSize is an error.
OpenDocumentSpreadsheets.Charts.setLabelText — Function
setLabelText(c, i, point, text) -> Chart
setLabelDeleted(c, i, point, deleted) -> ChartA point's label: custom text (LibreOffice's custom label fields), or none.
OpenDocumentSpreadsheets.Charts.setChartTitleText — Function
setChartTitleText(c, text) -> Chart
setAxisTitleText(c, ax, text) -> ChartThe chart's (or an axis') title: a string (a line break starts a paragraph) or a DrawingText. LibreOffice's titles can't follow a cell: a CellRef is an error.
OpenDocumentSpreadsheets.Charts.setChartTitleTextProp — Function
setChartTitleTextProp(c, field, value) / setAxisTitleTextProp(c, ax, field, value) / setLegendTextProp(c, field, value)
setAxisTextProp(c, ax, field, value) / setLabelTextProp(c, i, field, value) / setLabelTextProp(c, i, point, field, value)
setGroupLabelTextProp(c, g, field, value) / setChartSpaceTextProp(c, field, value) -> ChartOne text property of a part of the chart. Fields: :size (points), :bold, :italic, :under (:underline), :strike (:strikethrough), :baseline (a fraction of the size), :spacing (points), :fill (:color), :latin (:font), :ea, :cs, :lang; :inherit removes one. LibreOffice's chart text has no capitals setting, kerning size or coloured outline: :caps, :kern and :line are errors. The chart space's text (setChartSpaceTextProp) is set on its series' labels.
OpenDocumentSpreadsheets.Charts.setLegendPos — Function
setLegendPos(c, pos; overlay = nothing, expansion = nothing) -> Chart
setLegendOverlay(c, overlay) -> Chart
setLegendEntryDeleted(c, positions, deleted) -> ChartThe legend's place: :b (bottom), :t, :l, :r, and the corners :tr, :tl, :bl, :br; a corner is a custom position in that corner of the chart. :inherit removes the position, which LibreOffice reads as :r. Whether the legend may overlap the plot area, and the series whose entries are hidden. The first two make a legend if the chart has none. expansion shapes the legend: :wide, :high or :balanced (not for a corner).
OpenDocumentSpreadsheets.Charts.setPlotAreaLine — Function
setPlotAreaLine(c; color, width, dash, cap) -> Chart
setPlotAreaLine(c, :none | :inherit) -> ChartThe plot area's border: LibreOffice's wall.
OpenDocumentSpreadsheets.Charts.setAxisScaling — Function
setAxisScaling(c, ax; orientation, min, max) / setAxisMin / setAxisMax / setAxisOrientation -> Chart
setAxisLogBase(c, ax, 10 | :inherit) -> Chart
setAxisCrosses(c, ax, rule) / setAxisCrossesAt(c, ax, value) -> Chart
setAxisMajorUnit / setAxisMinorUnit(c, ax, value) -> Chart
setAxisTickLabelPos(c, ax, pos) / setAxisMajorTickMark / setAxisMinorTickMark(c, ax, mark) -> Chart
setAxisGridlines(c, ax; major, minor) / setAxisLine(c, ax; …) / setAxisNumberFormatCode(c, ax, code)
setAxisNumberFormatLinked(c, ax, linked) -> ChartAn axis' scale and look, in LibreOffice's form. LibreOffice stores a minor unit as the number of minor intervals in a major one: it needs a major unit it divides.
OpenDocumentSpreadsheets.Charts.setGroupGapWidth — Function
setGroupGapWidth(c, g, pct) / setGroupOverlap(c, g, pct) -> ChartA bar group's gap width (0 to 500 percent) and overlap (−100 to 100), on its y axis' style.
OpenDocumentSpreadsheets.Charts.SchemeColor — Type
SchemeColor(token; lumMod = nothing, lumOff = nothing, satMod = nothing, shade = nothing, tint = nothing,
alpha = nothing)
SchemeColor(token, transforms)A theme colour: a token (:bg1, :tx1, :bg2, :tx2, :accent1 … :accent6, :hlink, :folHlink, or the aliases :lt1, :dk1, :lt2, :dk2) and transforms in percent, applied in order. It resolves to the document's theme (LibreOffice's, for a new document) and is written as LibreOffice's theme reference, so LibreOffice follows a change of theme. LibreOffice keeps lumMod, lumOff, tint and shade; alpha is a fill's transparency; satMod is an error.
Trendlines, error bars and more
Trendlines and error bars, explosion and axis label arrangement. addChart's own options (stock charts, interpolation, empty and hidden cells, the data table, the chart wizard's data and seriesIn) are under addChart.
OpenDocumentSpreadsheets.Charts.addSeriesTrendline — Function
addSeriesTrendline(c, i, kind = :linear; order, period, name, forward, backward, intercept,
displayEquation = false, displayRSquared = false) -> Chart
deleteSeriesTrendlines(c, i) -> ChartA trendline on series i, LibreOffice's Insert ▸ Trend Line: kind :linear, :log, :exp, :power, :poly (with order, 2 to 6) or :movingAvg (with period); its name; extrapolation forward and backward; a forced intercept; the equation and R² shown.
OpenDocumentSpreadsheets.Charts.setSeriesErrorBars — Function
setSeriesErrorBars(c, i; type, value, plus, minus, bars = :both, direction = :y) -> Chart
deleteSeriesErrorBars(c, i) -> ChartError bars on series i, LibreOffice's Insert ▸ Y Error Bars: type :fixed, :percent or :stdDev (with value), :stdErr, or :range (with the cells plus and minus); bars :both, :plus or :minus; direction :y or :x (XY charts).
OpenDocumentSpreadsheets.Charts.setSeriesExplosion — Function
setSeriesExplosion(c, i, pct; point = nothing) -> ChartHow far a pie or doughnut series (or one point) is pulled out, in percent of the radius (LibreOffice's chart:pie-offset).
OpenDocumentSpreadsheets.Charts.setAxisLabelArrangement — Function
setAxisLabelArrangement(c, ax; stagger = nothing, overlap = nothing, breakText = nothing) -> ChartLibreOffice's label options of an axis: stagger (:odd, :even, :none), whether labels may overlap, and whether they may break into lines.
OpenDocumentSpreadsheets.Charts.getSeriesExplosion — Function
getSeriesExplosion(c, i; point = nothing) -> Union{Nothing,Int}How far a pie or doughnut series (or one of its points, from 1) is pulled out, in percent of the radius, as setSeriesExplosion sets it: the point's own, else the series'. nothing when it isn't set.
OpenDocumentSpreadsheets.Charts.getAxisLabelArrangement — Function
getAxisLabelArrangement(c, ax) -> NamedTupleAn axis' label options as setAxisLabelArrangement sets them: stagger (:odd, :even, :none), whether labels may overlap, and whether they may break into lines (breakText); each nothing when it isn't set.
OpenDocumentSpreadsheets.Charts.getLabelDeleted — Function
getLabelDeleted(c, i, point) -> BoolWhether point point (from 1) of series i shows no label, as setLabelDeleted sets it.
Finding charts
OpenDocumentSpreadsheets.Charts.getCharts — Function
getCharts(ws::Worksheet) -> Vector{AbstractChart}
getCharts(ods::ODSFile) -> Vector{AbstractChart}The charts on a sheet, or in a file (sheet by sheet), as they are now: those made in LibreOffice, those it made when it opened a file in another format, and those added here. A histogram is a ChartEx, the others are Charts. A chart anchored to the page reports the cells its position falls in.
OpenDocumentSpreadsheets.Charts.getChart — Function
getChart(ws::Worksheet, name) -> AbstractChart
getChart(ods::ODSFile, name) -> AbstractChartThe chart named name: its object's name ("Object 1"), its path ("Object 1/content.xml"), or its frame's name (the name LibreOffice's Navigator shows). An error lists the names there are.
OpenDocumentSpreadsheets.Charts.getChartKind — Function
getChartKind(c) -> SymbolThe chart's kind, as addChart names it: addChart(sheet, getChartKind(c); …) makes a chart of the same type, as LibreOffice's Chart Type dialog shows it. It works on any chart, whatever made it.
- Column, bar and area charts:
:columnor:bar(bars across), each also:stacked…or:percentStacked…;:area,:stackedArea,:percentStackedArea. - Lines:
:line,:stackedLine,:percentStackedLine, withMarkerswhen the chart's lines have points (:lineMarkers,:stackedLineMarkers, …). - Others:
:pie,:doughnut,:pieOfPie,:barOfPie,:scatter,:bubble,:radar,:filledRadar,:histogram. - Stock charts:
:stock,:stockOHLC(candlesticks),:stockVolume,:stockVolumeOHLC. :combo: a column chart with line series (LibreOffice's column and line), stacked or not.:unknown: a chart LibreOffice reads without a diagram.
A few of LibreOffice's types have no kind of their own and give the nearest: XY with lines only is :scatter, and a net with points is :radar. 3-D isn't part of the kind: getChartTypes gives a 3-D chart's 3-D type.
using OpenDocumentSpreadsheets.Charts
ods = openods("budget.ods"; mode = "rw")
c = addChart(ods["Costs"], :stackedBar; anchor = "E2:L18")
getChartKind(c) # :stackedBar
getChartTypes(c) # [:barChart]OpenDocumentSpreadsheets.Charts.getChartType — Function
getChartType(c::Chart) -> Symbol
getChartType(c::ChartEx) -> SymbolA chart's one group tag (getChartTypes), :combo when it has more than one, :unknown when it has none. A ChartEx is :histogram.
OpenDocumentSpreadsheets.Charts.getChartTypes — Function
getChartTypes(c::Chart) -> Vector{Symbol}The types of the chart's groups of series, one for each type the chart combines. They are broader than addChart's kinds:
addChart kind | getChartTypes |
|---|---|
:column, :bar and their stacked forms | [:barChart] |
:line, :lineMarkers and their stacked forms | [:lineChart] |
:area and its stacked forms | [:areaChart] |
:pie, :doughnut | [:pieChart], [:doughnutChart] |
:pieOfPie, :barOfPie | [:ofPieChart] |
:scatter, :bubble | [:scatterChart], [:bubbleChart] |
:radar, :filledRadar | [:radarChart] |
:stock, :stockOHLC | [:stockChart] |
:stockVolume, :stockVolumeOHLC | [:barChart, :stockChart] |
:combo | [:barChart, :lineChart] |
A 3-D chart (threeD = true) gives the 3-D type: :bar3DChart, :line3DChart, :area3DChart, :pie3DChart. getChartKind gives the addChart kind itself: whether bars run up or across, the stacking and the markers.
OpenDocumentSpreadsheets.Charts.getChartGroups — Function
getChartGroups(c::Chart) -> Vector{ChartGroup}The chart's groups: its series of one type on one pair of axes (LibreOffice's column and line chart has two). ODF has no group element, so raw is nothing.
OpenDocumentSpreadsheets.Charts.getChartTitle — Function
getChartTitle(c::AbstractChart) -> Union{Nothing,String}The chart's title as text (paragraphs joined by "\n"), or nothing when it has none. LibreOffice has no automatic titles and no titles bound to cells.
Series and data
OpenDocumentSpreadsheets.Charts.getChartSeries — Function
getChartSeries(c::AbstractChart) -> Vector{ChartSeries}The chart's series in order, each with its name, categories (x values on XY and bubble charts), values and bubble sizes, read from the cells now.
OpenDocumentSpreadsheets.Charts.getChartRanges — Function
getChartRanges(c::AbstractChart) -> Vector{NamedTuple}
getChartRanges(x::Union{Worksheet,ODSFile}, name) -> Vector{NamedTuple}
getChartRanges(x::Union{Worksheet,ODSFile}) -> Vector{Tuple{String,Vector{NamedTuple}}}The ranges of each series: idx, name, categories, values and bubble_sizes, each a ChartRange. Without a name, every chart's: (chart name, ranges).
LibreOffice keeps a chart's references even when their cells are deleted: they never become #REF!.
OpenDocumentSpreadsheets.Charts.getChartData — Function
getChartData(c::AbstractChart) -> DataTable
getChartData(x::Union{Worksheet,ODSFile}, name) -> DataTableThe chart's data as a DataTable (for DataFrame(...) or any Tables.jl sink), read from its cells now, as LibreOffice draws it: a categories column when every series shares the categories (else a <series>_x column before each series), one column per series (named by the series, else Series<i>), and <series>_size after a bubble series. Shorter columns are padded with missing.
OpenDocumentSpreadsheets.iserror — Method
iserror(r::ChartRef) -> Vector{Bool}
iserror(r::ChartRef, i) -> Bool
geterror(r::ChartRef) -> Vector{String}
geterror(r::ChartRef, i) -> StringWhether each value of a chart reference is an error, and its error text ("" where none). Every error kind is reported, since the values come from the cells.
Reading formatting
A chart's formatting is read from LibreOffice's chart styles into the types the setters take. Fields LibreOffice has no value for are nothing.
Titles, legend and chart
OpenDocumentSpreadsheets.Charts.getChartTitleText — Function
getChartTitleText(c) -> Union{Nothing,DrawingText}The chart's title as rich text: its paragraphs and runs, each run with its span's properties.
OpenDocumentSpreadsheets.Charts.getChartTitleShapeProps — Function
getChartTitleShapeProps(c) -> Union{Nothing,DrawingShapeProps}
getChartTitleTextProps(c) -> Union{Nothing,DrawingText}The title's fill and border, and its text properties.
OpenDocumentSpreadsheets.Charts.getChartTitleRef — Function
getChartTitleRef(c) -> Nothing
getChartTitleRange(c) -> Nothing
getAutoTitleDeleted(c) -> NothingAlways nothing: LibreOffice's titles can't follow a cell, and it has no automatic titles.
OpenDocumentSpreadsheets.Charts.getChartLegend — Function
getChartLegend(c) -> Union{Nothing,XML.Node}The chart:legend element, or nothing when the chart has no legend.
OpenDocumentSpreadsheets.Charts.getLegendPos — Function
getLegendPos(c) -> Union{Nothing,Symbol}:b, :t, :l, :r or :tr, and the other corners :tl, :bl, :br; nothing without a legend. LibreOffice keeps a corner as a custom position: the corner given is the quarter of the chart the legend is in.
OpenDocumentSpreadsheets.Charts.getLegendOverlay — Function
getLegendOverlay(c) -> Union{Nothing,Bool}Whether the legend may overlap the plot area (LibreOffice's loext:overlay).
OpenDocumentSpreadsheets.Charts.getLegendShapeProps — Function
getLegendShapeProps(c) -> Union{Nothing,DrawingShapeProps}
getLegendTextProps(c) -> Union{Nothing,DrawingText}OpenDocumentSpreadsheets.Charts.getLegendEntryDeleted — Function
getLegendEntryDeleted(c, i) -> Union{Nothing,Bool}Whether series i's legend entry is hidden (LibreOffice's loext:hide-legend).
OpenDocumentSpreadsheets.Charts.getPlotAreaShapeProps — Function
getPlotAreaShapeProps(c) -> Union{Nothing,DrawingShapeProps}
getChartSpaceShapeProps(c) -> Union{Nothing,DrawingShapeProps}
getChartSpaceTextProps(c) -> Union{Nothing,DrawingText}The plot area's fill and border (LibreOffice's wall), and the chart's background and text defaults.
Series, points and labels
OpenDocumentSpreadsheets.Charts.getSeriesShapeProps — Function
getSeriesShapeProps(c, i) -> Union{Nothing,DrawingShapeProps}
getSeriesLabelTextProps(c, i) -> Union{Nothing,DrawingText}Series i's fill and line, and its data labels' text properties.
OpenDocumentSpreadsheets.Charts.getSeriesMarker — Function
getSeriesMarker(c, i) -> Union{Nothing,ChartMarker}Series i's symbol, or nothing when its style sets none (LibreOffice's default for the chart type).
OpenDocumentSpreadsheets.Charts.getSeriesGroup — Function
getSeriesGroup(c, i) -> ChartGroup
getGroupAxes(c, g) -> Vector{ChartAxis}
getSeriesAxes(c, i) -> Vector{ChartAxis}The group series i is in, and the axes of a group or a series (none for a pie or doughnut).
OpenDocumentSpreadsheets.Charts.getSeriesDataPoints — Function
getSeriesDataPoints(c, i) -> Vector{ChartDataPoint}
getSeriesDataPoint(c, i, point) -> Union{Nothing,ChartDataPoint}The points of series i that have their own style (point counts from 1; idx from 0).
OpenDocumentSpreadsheets.Charts.getDataPointShapeProps — Function
getDataPointShapeProps(c, d::ChartDataPoint) -> Union{Nothing,DrawingShapeProps}
getDataPointMarker(c, d::ChartDataPoint) -> Union{Nothing,ChartMarker}OpenDocumentSpreadsheets.Charts.getSeriesDataLabels — Function
getSeriesDataLabels(c, i) -> Vector{ChartDataLabel}
getSeriesDataLabel(c, i, point) -> Union{Nothing,ChartDataLabel}The points of series i whose labels differ from the series': those with custom text (a chart:data-label), and those whose style turns every label part off (delete).
OpenDocumentSpreadsheets.Charts.getDataLabelTextProps — Function
getDataLabelTextProps(c, d) / getDataLabelShapeProps(c, d) / getDataLabelText(c, d)
getDataLabelPosition(c, d) / getDataLabelOffset(c, d)A point's label: its text properties, fill and border, custom text (custom label fields), placement (:bestFit, :ctr, :t, :b, :l, :r, :inEnd, :outEnd, :inBase) and offset (nothing: ODF has no offsets).
OpenDocumentSpreadsheets.Charts.getLabelFlag — Function
getLabelFlag(c, i, flag) -> Union{Nothing,Bool}Whether series i's labels show flag: :value, :percent, :categoryName, :seriesName or :legendKey; nothing when its style doesn't say. LibreOffice has no bubble-size labels: :bubbleSize is always nothing.
OpenDocumentSpreadsheets.Charts.getSeriesFill — Function
getSeriesFill(c, i; point = nothing) -> Effective{DrawingFill}
getSeriesLine(c, i; point = nothing) -> Effective{DrawingLine}
getMarkerFill(c, i, point) -> Effective{DrawingFill}The fill or line series i (or one of its points) is drawn with, found through LibreOffice's cascade: the point's style, then the series'. LibreOffice draws a symbol in its series' colours, so a marker's fill is the series' fill.
OpenDocumentSpreadsheets.Charts.getLabelTextProp — Function
getLabelTextProp(c, i, field) -> EffectiveOne text property of series i's labels (a field of DrawingRunProps: :size, :bold, :italic, :fill…), from the series' style, else the chart's.
Trendlines, error bars and groups
OpenDocumentSpreadsheets.Charts.getSeriesTrendlines — Function
getSeriesTrendlines(c, i) -> Vector{ChartTrendline}
getTrendlineShapeProps(c, t) / getTrendlineLabelText(c, t) / getTrendlineLabelTextProps(c, t) / getTrendlineLabelShapeProps(c, t)Series i's trendlines (chart:regression-curve), their line, and their equation's text and formatting.
OpenDocumentSpreadsheets.Charts.getSeriesErrorBars — Function
getSeriesErrorBars(c, i) -> Vector{ChartErrorBars}
getErrorBarsShapeProps(c, e) -> Union{Nothing,DrawingShapeProps}
getErrorBarsCustomRefs(c, e) -> (plus, minus)Series i's error bars (chart:error-indicator), their line, and the cells of error bars from cell ranges (as ChartRefs).
OpenDocumentSpreadsheets.Charts.getGroupDropLines — Function
getGroupDropLines(c, g) / getGroupHiLowLines(c, g) / getGroupSeriesLines(c, g) -> NothingAlways nothing: LibreOffice has no drop lines or series lines, and a stock chart's high-low lines are its series'.
OpenDocumentSpreadsheets.Charts.getGroupUpDownBars — Function
getGroupUpDownBars(c, g) -> Union{Nothing,ChartUpDownBars}
getUpBarShapeProps(c, b) / getDownBarShapeProps(c, b)A stock group's candle bodies (LibreOffice's Japanese candlesticks), and the fill and line of rising and falling ones (chart:stock-gain-marker, chart:stock-loss-marker).
OpenDocumentSpreadsheets.Charts.getGroupGapWidth — Function
getGroupGapWidth(c, g) -> Union{Nothing,Int}
getGroupOverlap(c, g) -> Union{Nothing,Int}A bar group's gap width and overlap, in percent.
OpenDocumentSpreadsheets.Charts.getGroupLabelTextProps — Function
getGroupLabelTextProps(c, g) -> Union{Nothing,DrawingText}LibreOffice has no group level: the text properties of the group's first series' labels.
Axes
OpenDocumentSpreadsheets.Charts.getChartAxes — Function
getChartAxes(c::AbstractChart) -> Vector{ChartAxis}
getChartAxes(c::AbstractChart, role) -> Vector{ChartAxis}The chart's axes (hidden ones too), or those of a role: :category, :value, :date, :series.
OpenDocumentSpreadsheets.Charts.getChartAxis — Function
getChartAxis(c::AbstractChart, which::Symbol) -> ChartAxis
getChartAxis(c::AbstractChart, axid::Integer) -> ChartAxisOne axis: :x, :y, :x2, :y2 or :z (as drawn: a bar chart's :x is its value axis, along the bottom), a role that names one axis, or its number.
OpenDocumentSpreadsheets.Charts.getAxisShapeProps — Function
getAxisShapeProps(c, ax) / getAxisTextProps(c, ax)An axis's line, and its labels' text properties.
OpenDocumentSpreadsheets.Charts.getAxisTitle — Function
getAxisTitle(c, ax) -> Union{Nothing,String}
getAxisTitleText(c, ax) -> Union{Nothing,DrawingText}
getAxisTitleTextProps(c, ax) -> Union{Nothing,DrawingText}
getAxisTitleRef(c, ax) / getAxisTitleRange(c, ax) -> NothingAn axis's title: its text, as rich text, and its text properties. LibreOffice's titles can't follow a cell: the reference is always nothing.
OpenDocumentSpreadsheets.Charts.getAxisGridlines — Function
getAxisGridlines(c, ax; minor = false) -> Union{Nothing,DrawingShapeProps}An axis's major (or minor) gridlines' line, or nothing when it has none.
OpenDocumentSpreadsheets.Charts.getAxisPartner — Function
getAxisPartner(c, ax) -> Union{Nothing,ChartAxis}The axis an axis crosses.
OpenDocumentSpreadsheets.Charts.getAxisNumberFormatCode — Function
getAxisNumberFormatCode(c, ax) -> Union{Nothing,String}
getAxisNumberFormatLinked(c, ax) -> Union{Nothing,Bool}An axis's number format, as a format code, and whether it follows its source cells'.
OpenDocumentSpreadsheets.Charts.getAxisMajorTickMark — Function
getAxisMajorTickMark(c, ax) / getAxisMinorTickMark(c, ax) -> Union{Nothing,Symbol}:cross, :in, :out or :none.
OpenDocumentSpreadsheets.Charts.getAxisTickLabelPos — Function
getAxisTickLabelPos(c, ax) -> Union{Nothing,Symbol}:nextTo, :low (outside start), :high (outside end) or :none (no labels).
OpenDocumentSpreadsheets.Charts.getAxisOrientation — Function
getAxisOrientation(c, ax) / getAxisMin(c, ax) / getAxisMax(c, ax) / getAxisLogBase(c, ax):minMax or :maxMin (reversed); the fixed minimum and maximum (nothing: automatic); 10 for a logarithmic axis (LibreOffice's are base 10), else nothing.
OpenDocumentSpreadsheets.Charts.getAxisCrosses — Function
getAxisCrosses(c, ax) -> Union{Nothing,Symbol}
getAxisCrossesAt(c, ax) -> Union{Nothing,Float64}Where an axis crosses the axis it meets (chart:axis-position): :min (its start), :max (its end), :autoZero (at 0), or at a value.
OpenDocumentSpreadsheets.Charts.getAxisMajorUnit — Function
getAxisMajorUnit(c, ax) / getAxisMinorUnit(c, ax) -> Union{Nothing,Float64}The interval between major ticks, and between minor ones (LibreOffice stores the number of minor intervals in a major one).
OpenDocumentSpreadsheets.Charts.getAxisLabelAlign — Function
getAxisLabelAlign(c, ax) / getAxisLabelOffset(c, ax) / getAxisMultiLevelLabels(c, ax) / getAxisCrossBetween(c, ax)nothing: ODF has no label alignment, offset, multi-level switch or crossing rule for an axis.
OpenDocumentSpreadsheets.Charts.hasFill — Function
hasFill(x) -> Bool
hasLine(x) -> BoolWhether a fill (of shape properties, a fill, or an Effective fill) is drawn: not nothing and not of kind :none; likewise a line.
Types
OpenDocumentSpreadsheets.Charts.Chart — Type
ChartA handle to one chart: its object and anchor. Its content is read from the chart as it is now, on each call.
Fields
package: theODSFile.path: the object's content,"Object 1/content.xml".name: the object's name,"Object 1".rId: alwaysnothing(ODF has no relationships).sheet: the sheet the chart is on.from,to: the cells its frame starts and ends in (a page-anchored frame's, from its position).
OpenDocumentSpreadsheets.Charts.ChartEx — Type
ChartExA handle to a histogram, made with addChart(…, :histogram) or addChartEx, or found in a file. Fields as Chart's. In the file a histogram is an ordinary chart (a column chart whose values are counted in bins), so the chart setters and getters work on it as on a column chart: its fill and lines, titles, legend, labels, axes, gap width, trendlines and error bars. Its bins have functions of their own (setSeriesBinning, getSeriesBinning). As on a column chart, markers and explosion are errors, and a histogram can't be made a combo chart.
OpenDocumentSpreadsheets.Charts.ChartRef — Type
ChartRefOne reference of a chart series, with the values its cells hold now (LibreOffice draws a chart from its cells).
Fields
kind::Symbol::numwhen every value is a number (or empty), else:str;:strLitfor a series name given as text (loext:label-string).ref::Union{Nothing,String}: the reference in this package's notation (Data.B2:B7);nothingfor a literal.format_code::Union{Nothing,String}: the number format of the first number ("General"…), ornothing.ptCount::Int: the number of points (cells).data::Vector: the values,missingfor empty cells and errors.errors::Dict{Int,String}: position => error text ("#DIV/0!"): every error.
OpenDocumentSpreadsheets.Charts.ChartSeries — Type
ChartSeriesOne series (chart:series), as read. categories holds the chart's categories for category charts, and the series' x values for XY and bubble charts; values its values (y values); bubble_sizes a bubble series' sizes. idx and order are its place in the chart, from 0. charttype is its group's tag (:barChart…). raw is the element.
OpenDocumentSpreadsheets.Charts.ChartRange — Type
ChartRangeA series reference as a range: a SheetCellRef, SheetCellRange, SheetRowRange, SheetColumnRange or NonContiguousRange, or nothing where there is none.
OpenDocumentSpreadsheets.Charts.ChartRanges — Type
ChartRangesThe fields of what getChartRanges gives for one series: idx, name, and its categories, values and bubble_sizes ranges. Each row is a NamedTuple typed by its own values (a name of nothing is Nothing), which ChartRanges describes.
OpenDocumentSpreadsheets.Charts.ChartGroup — Type
ChartGroupOne group of a chart's series: those of one type on one pair of axes. kind is its tag (:barChart, :lineChart…), axids its axes (1, 2 primary; 3, 4 secondary).
OpenDocumentSpreadsheets.Charts.ChartAxis — Type
ChartAxisAn axis: kind (:catAx, :valAx, :dateAx, :serAx), axid (1 primary x, 2 primary y, 3 secondary x, 4 secondary y, 5 z), pos (:b, :l, :t, :r), crossax (the axis it crosses), deleted (hidden).
OpenDocumentSpreadsheets.Charts.ChartDataPoint — Type
ChartDataPointA point with its own style: series_idx, idx (from 0).
OpenDocumentSpreadsheets.Charts.ChartDataLabel — Type
ChartDataLabelA point's own label (custom text, or labels turned off): series_idx, idx (from 0), delete.
OpenDocumentSpreadsheets.Charts.ChartMarker — Type
ChartMarkerA series' (or point's) symbol: symbol (:circle, :square, :diamond, :triangle, :x, :plus, :star, :dash, :dot, :none, :auto, :arrowDown, :arrowLeft, :bowTie, :hourglass, :loStar, :vBar), size in points, shape its fill and line (LibreOffice draws a symbol in its series' colours).
OpenDocumentSpreadsheets.Charts.ChartTrendline — Type
ChartTrendlineA series' trendline (chart:regression-curve): kind (:linear, :log, :exp, :power, :poly, :movingAvg), name, order (polynomial degree), period (moving average), forward/backward (extrapolation), intercept (when forced), disp_rsqr, disp_eq.
OpenDocumentSpreadsheets.Charts.ChartErrorBars — Type
ChartErrorBarsA series' error bars (chart:error-indicator): direction ("x", "y"), bar_type ("both", "plus", "minus"), value_type ("fixedVal", "percentage", "stdDev", "stdErr", "cust" for cell ranges), value, no_end_cap.
OpenDocumentSpreadsheets.Charts.ChartUpDownBars — Type
ChartUpDownBarsA stock chart's candle bodies (LibreOffice's Japanese candlesticks): its group.
OpenDocumentSpreadsheets.Charts.ColorSpec — Type
ColorSpecWhat a colour can be given as: a DrawingColor, or a string ("FF0000", "red", "accent1").
OpenDocumentSpreadsheets.Charts.DrawingColor — Type
DrawingColorA colour as read: kind is :srgb, or :scheme for a colour that follows the document's theme (LibreOffice's loext:theme-type); val is "RRGGBB" or the theme slot ("accent1"); transforms are a theme colour's (:lumMod => 60000…, thousandths of a percent); rgb the colour as drawn, "RRGGBB"; alpha its opacity, 0 to 1.
OpenDocumentSpreadsheets.Charts.DrawingFill — Type
DrawingFillA fill: kind is :none, :solid, :gradient, :pattern (a hatch) or :blip (a bitmap); fgcolor a solid fill's colour (a hatch's line colour); bgcolor a hatch's background; preset a hatch's, gradient's or bitmap's name.
OpenDocumentSpreadsheets.Charts.DrawingLine — Type
DrawingLineA line: fill its colour (kind === :none for no line), width in points, dash ("solid" or the name of LibreOffice's dash), cap ("rnd", "sq", "flat"), join ("round", "bevel", "miter"). ODF has no compound lines or miter limits: compound and miter_limit are nothing.
OpenDocumentSpreadsheets.Charts.DrawingShapeProps — Type
DrawingShapePropsThe fill and line of a part of a chart (a series, a point, the wall, the chart, an axis line, the legend, gridlines). nothing means the style says nothing (LibreOffice's default applies); a DrawingFill of kind :none means none.
OpenDocumentSpreadsheets.Charts.DrawingRunProps — Type
DrawingRunPropsCharacter properties, from style:text-properties: lang ("de-DE"), size (points), bold, italic, under and strike (DrawingML's names: "sng", "dbl", "wavy"…, "sngStrike"…), caps ("small", "all"), baseline (a fraction of the size), spacing (points), fill (the colour), line (a text outline; LibreOffice's has no colour), and the fonts latin, ea and cs. ODF has no kerning size: kern is nothing.
OpenDocumentSpreadsheets.Charts.DrawingParaProps — Type
DrawingParaPropsParagraph properties. In a chart, defprops (the text's character properties) is the one ODF fills.
OpenDocumentSpreadsheets.Charts.DrawingRun — Type
DrawingRunOne run of text (kind :run), or a line break (:br, text "\n"), with its own properties (a text:span's style).
OpenDocumentSpreadsheets.Charts.DrawingParagraph — Type
DrawingParagraphOne paragraph (text:p): its runs in order.
OpenDocumentSpreadsheets.Charts.DrawingBodyProps — Type
DrawingBodyPropsA text's body: rotation (degrees, style:rotation-angle) is the one ODF fills.
OpenDocumentSpreadsheets.Charts.DrawingText — Type
DrawingTextA text: its body and paragraphs. A title's text has its runs; a text-properties getter's has one empty paragraph whose props.defprops are the element's character properties.
OpenDocumentSpreadsheets.Charts.Effective — Type
Effective{T}A value resolved through LibreOffice's cascade (a point's style, then its series'): value, the site it came from, and the chain of sites looked at. value is nothing when no style sets it (LibreOffice's default applies).
OpenDocumentSpreadsheets.Charts.FormatSite — Type
FormatSiteWhere a value was found: level (:point, :series, :chartspace), kind (:shape, :marker, :text), container (nothing), props (what was read there).
Sparklines
Sparklines are LibreOffice's sparkline groups. The functions are in the main module (addSparklines, not Charts.addSparklines). A sparkline follows its cell through inserts and deletes, and its data moves as a chart's does.
OpenDocumentSpreadsheets.Charts.addSparklines — Function
addSparklines(ws::Worksheet, location, data; type = :line, kw...)A group of sparklines, small charts each in one cell: location is the cell, or the row or column of cells, to hold them, and data the cells they chart, on this sheet or another ("Data!B2:M13", "Data.B2:M13"):
- one cell: one sparkline of a row or column of data;
- a column of cells: one sparkline for each row of
data(as many rows), or each column; - a row of cells: one sparkline for each column of
data, or each row.
A sparkline already in one of the cells is replaced. The group's options: type (:line, :column, :winloss, which LibreOffice calls stacked), markers, high, low, first, last, negative (true by default for :winloss), axis, emptyCells (:gap, :zero, :span), showHidden, lineWeight (points, 0.75), min and max (:individual, :group or a number), rightToLeft, and the colours seriesColor, negativeColor, axisColor, markersColor, firstColor, lastColor, highColor, lowColor (hex, a colour name, a theme colour or a SchemeColor, resolved against the document's theme).
LibreOffice keeps no date range: dateRange is an error. A sparkline follows its cell through inserts and deletes, and its data moves as a chart's; LibreOffice itself leaves both where they were.
OpenDocumentSpreadsheets.Charts.getSparklines — Function
getSparklines(ws::Worksheet) -> Vector{NamedTuple}A sheet's sparkline groups: sparklines, each sparkline's cell and data ("F2" => "Data.A2:E2", in this package's notation); type, markers, high, low, first, last, negative, axis, emptyCells, showHidden, lineWeight, min, max, rightToLeft, dateRange (always nothing: LibreOffice keeps none) and colors (seriesColor …, each "FFRRGGBB"), as they are now.
OpenDocumentSpreadsheets.Charts.deleteSparklines — Function
deleteSparklines(ws::Worksheet, ref; group = false) -> BoolDeletes the sparklines in the cells of ref (a cell or a range), or with group = true every group with a sparkline there. false if there were none.