Package io.keikai.axyra.sheets.content
Class Chart
java.lang.Object
io.keikai.axyra.sheets.content.Chart
A chart (immutable). Specify the chart type, an optional title, a two-cell
anchor rectangle, and one or more data series (each a range reference like
"Sheet1!$B$2:$B$10"). Add with Sheet.addChart(...).
Types: column, bar, line, pie, area, scatter, doughnut, radar, bubble,
surface, stock, combo, waterfall, histogram, funnel, treemap, sunburst,
boxWhisker, pareto, map. Appearance the builder can set: legend placement and
visibility, axis visibility/titles/scale, per-series and per-point fill colors,
data labels, and the Excel auto-title. Deep chart-theme parts
(colors1.xml / style1.xml) are not modeled.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Chart.Builderarea()static Chart.Builderbar()barShape()The solid a 3-D bar or column is drawn as;"box"when the chart declares no shape, that being the attribute's default.static Chart.BuilderA box & whisker chart: distribution quartiles with outlier whiskers.static Chart.Builderbubble()The category (X) axis title, ornull.static Chart.Buildercolumn()static Chart.Buildercombo()static Chart.Builderdoughnut()static Chartstatic Chart.Builderfunnel()A funnel chart: values as progressively narrowing stages.static Chart.BuilderA histogram chart: values bucketed into frequency bins.booleanis3d()Whether the chart renders in 3-D.Legend placement (defaults toRIGHTwhen unset).static Chart.Builderline()static Chart.Buildermap()A filled-region map chart: geographic regions colored by value.static Chart.BuilderA chart of any supported type token: column, bar, line, pie, area, scatter, doughnut, radar, bubble, surface, stock, combo, waterfall, histogram, funnel, treemap, sunburst, boxWhisker, pareto, map.static Chart.Builderpareto()A pareto chart: sorted histogram with a cumulative-percentage line.static Chart.Builderpie()The PivotChart binding this chart is driven by, in Excel's[WorkbookName]SheetName!PivotNameform (ECMA-376 §21.2.2.153), ornullfor a regular chart.static Chart.Builderradar()static Chart.Builderscatter()seriesBubbleSizes(int seriesIndex) The bubble-size (Z) reference of seriesseriesIndex, ornullwhen it has none.intbooleanWhether data labels are shown.static Chart.Builderstock()A stock chart (high-low-close).intstyle()The chart's built-in style number (<c:style val>), or-1when the chart carries none — which is what a chart built here does.static Chart.Buildersunburst()A sunburst chart: hierarchical proportions as concentric rings.static Chart.Buildersurface()A surface chart.title()booleanWhether this chart carries an Excel "auto" title (derived from the series name).The cell reference the title follows (<c:strRef><c:f>), ornullfor a literal or absent title.A builder pre-loaded with this chart spec, for read–modify–write round-trips.toJson()static Chart.Buildertreemap()A treemap chart: hierarchical proportions as nested rectangles.type()The value (Y) axis title, ornull.static Chart.BuilderA waterfall (bridge) chart: running total with positive/negative steps.
-
Method Details
-
column
-
bar
-
line
-
pie
-
area
-
scatter
-
doughnut
-
radar
-
bubble
-
combo
-
surface
A surface chart. The default form is the top-down (contour) view; callthreeD(true)for the 3-D surface. -
stock
A stock chart (high-low-close). Add three series in high, low, close order — or four (open-high-low-close) — as Excel requires 3-4 series for this type. -
waterfall
A waterfall (bridge) chart: running total with positive/negative steps. -
histogram
A histogram chart: values bucketed into frequency bins. -
funnel
A funnel chart: values as progressively narrowing stages. -
treemap
A treemap chart: hierarchical proportions as nested rectangles. -
sunburst
A sunburst chart: hierarchical proportions as concentric rings. -
boxWhisker
A box & whisker chart: distribution quartiles with outlier whiskers. -
pareto
A pareto chart: sorted histogram with a cumulative-percentage line. -
map
A filled-region map chart: geographic regions colored by value. The category range holds region names; region geometry is resolved by the spreadsheet application when the file is opened. -
of
A chart of any supported type token: column, bar, line, pie, area, scatter, doughnut, radar, bubble, surface, stock, combo, waterfall, histogram, funnel, treemap, sunburst, boxWhisker, pareto, map. -
toBuilder
A builder pre-loaded with this chart spec, for read–modify–write round-trips. -
toJson
-
fromJson
-
type
-
title
-
titleAuto
public boolean titleAuto()Whether this chart carries an Excel "auto" title (derived from the series name). -
titleFormula
The cell reference the title follows (<c:strRef><c:f>), ornullfor a literal or absent title. -
style
public int style()The chart's built-in style number (<c:style val>), or-1when the chart carries none — which is what a chart built here does. -
barShape
The solid a 3-D bar or column is drawn as;"box"when the chart declares no shape, that being the attribute's default. -
seriesBubbleSizes
The bubble-size (Z) reference of seriesseriesIndex, ornullwhen it has none. -
seriesCount
public int seriesCount() -
legendPosition
Legend placement (defaults toRIGHTwhen unset). -
showDataLabels
public boolean showDataLabels()Whether data labels are shown. -
is3d
public boolean is3d()Whether the chart renders in 3-D. -
categoryAxisTitle
The category (X) axis title, ornull. -
valueAxisTitle
The value (Y) axis title, ornull. -
pivotSource
The PivotChart binding this chart is driven by, in Excel's[WorkbookName]SheetName!PivotNameform (ECMA-376 §21.2.2.153), ornullfor a regular chart. Set bySheet.addPivotChart(int, java.lang.String, int, int, int, int)and preserved from imported files.
-