public class ChartSeries extends Object implements ChartConstants, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Object[] |
categories |
protected String[] |
legends |
protected double[] |
minmaxcache |
protected Chart |
parentChart |
protected String[] |
seriescolors |
protected ArrayList |
seriesranges |
protected ArrayList |
seriesvalues |
AREACHART, BARCHART, BUBBLECHART, COLCHART, CONEBARCHART, CONECHART, CYLINDERBARCHART, CYLINDERCHART, DOUGHNUTCHART, LINECHART, OFPIECHART, PIECHART, PYRAMIDBARCHART, PYRAMIDCHART, RADARAREACHART, RADARCHART, SCATTERCHART, SHAPECOLUMN, SHAPECONE, SHAPECONETOMAX, SHAPECYLINDER, SHAPEDEFAULT, SHAPEPYRAMID, SHAPEPYRAMIDTOMAX, STOCKCHART, SURFACECHART, XAXIS, XVALAXIS, YAXIS, ZAXIS| Constructor and Description |
|---|
ChartSeries() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object[] o)
series stores new Object[] {Series Record, Integer.valueOf(nCharts)}
|
Series |
addSeries(String seriesRange,
String categoryRange,
String bubbleRange,
String legendRange,
String legendText,
ChartType chartObject,
int nChart)
Add a series object to the array.
|
void |
addSeriesMapping(int nCharts,
int[] seriesList)
for overlay charts, store series list
|
boolean |
changeCategoryRange(String originalrange,
String newrange)
changes the category range which matches originalrange to new range
|
boolean |
changeSeriesRange(String originalrange,
String newrange)
Change series ranges for ALL matching series
|
boolean |
changeTextValue(String originalval,
String newval)
attempts to replace all category elements containing originalval text to newval
|
Vector |
getAllSeries()
get all the series objects for ALL charts
(i.e.
|
Vector |
getAllSeries(int nChart)
get all the series objects in the specified chart (-1 for ALL)
|
Object[] |
getCategories() |
String[] |
getCategories(int nChart)
Return an array of strings, one for each category
|
Ptg[] |
getCellRangePtgs()
return an array of ALL cell references of the chart
|
int[] |
getDataLabelsPerSeries(int defaultDL,
int charttype)
return Data Labels Per Series or default Data Labels, if no overrides specified
|
org.json.JSONObject |
getDataRangeJSON()
retrieve the current data range JSON for comparisons
|
String[] |
getLegends() |
String[] |
getLegends(int nChart)
return an array of legend text
|
int[] |
getMarkerFormats()
return the type of markers for each series:
0 = no marker 1 = square 2 = diamond 3 = triangle 4 = X 5 = star 6 = Dow-Jones 7 = standard deviation 8 = circle 9 = plus sign |
double[] |
getMetrics(boolean isDirty)
returns an array containing the and maximum values of Y (Value) axis, along with the
maximum number of series values of each series (bar, line, etc.) ...
|
String |
getOOXML(int ct,
boolean isBubble3d,
int nChart) |
String[] |
getSeries(int nChart)
Return a string representing all series in this chart
|
Series |
getSeries(String seriesName,
int nChart)
get a chart series handle based off the series name
|
String[] |
getSeriesBarColors() |
org.json.JSONArray |
getSeriesJSON()
retrieve the current Series JSON for comparisons
|
HashMap |
getSeriesPtgs() |
ArrayList |
getSeriesRanges() |
ArrayList |
getSeriesValues() |
static Series |
parseOOXML(org.xmlpull.v1.XmlPullParser xpp,
WorkBookHandle wbh,
ChartType parentChart,
boolean hasPivotTableSource,
Stack<String> lastTag)
parse a chartSpace->chartType->ser element into our Series record/structure
|
void |
removeSeries(int index)
specialty method to take absolute index of series and remove it
only used in WorkSheetHandle |
void |
removeSeries(Series seriestodelete)
remove desired series from chart
|
void |
resetSeriesNumber()
all contain:
idx (index)
order (order)
tx (series text)
spPr (shape properties)
then after, may contain:
bubble: invertIfNegative, dPt, dLbls, trendline, errBars, xVal, yVal, bubbleSize, bubble3D (bubbleChart)
line marker, dPt, dLbls, trendline, errBars, cat, val, smooth (line3DChart, lineChart, stockChart)
pie: explosion, dPt,dLbls, cat, val (doughnutChart, ofPieChart, pie3DChart, pieChart)
surface: cat, val (surfaceChart, surface3DChart)
scatter: marker, dPt, dLbls, trendline, errBars, xVal, yVal, smooth (scatterChart)
radar: marker, dPt, dLbls, cat, val (radarChart)
area: pictureOptions, dPt, dLbls, trendline, errBars, cat, val (area3DChart, areaChart)
bar: invertIfNegative, pictureOptions, dPt, dLbls, trendline, errBars, cat, val, shape (bar3DChart, barChart)
|
void |
setParentChart(Chart c) |
void |
setSeriesJSON(org.json.JSONArray s)
set the current Series JSON
|
protected void |
updateSeriesMappings(SeriesList sl,
int thischartnumber)
if has multiple or overlay charts, update series mappings
|
protected double[] minmaxcache
protected String[] legends
protected ArrayList seriesranges
protected Object[] categories
protected ArrayList seriesvalues
protected String[] seriescolors
protected Chart parentChart
public void add(Object[] o)
o - public void setParentChart(Chart c)
public double[] getMetrics(boolean isDirty)
public boolean changeSeriesRange(String originalrange, String newrange)
originalrange - newrange - public String[] getSeries(int nChart)
nChart - 0=default, 1-9= overlay charts -1 for ALL chartspublic String[] getCategories(int nChart)
nChart - 0=default, 1-9= overlay charts -1 for Allpublic Vector getAllSeries()
public Vector getAllSeries(int nChart)
nChart - 0=default, 1-9= overlay charts -1 for ALL seriespublic Series addSeries(String seriesRange, String categoryRange, String bubbleRange, String legendRange, String legendText, ChartType chartObject, int nChart)
seriesRange - = one row range, expressed as (Sheet1!A1:A12);categoryRange - = category rangebubbleRange= - bubble range, if any 20070731 KSCseriesText - = label for the series;nChart - 0=default, 1-9= overlay charts
s * @returnpublic void removeSeries(int index)
index - public void removeSeries(Series seriestodelete)
index - public Series getSeries(String seriesName, int nChart)
seriesName - nChart - 0=default, 1-9= overlay chartspublic boolean changeCategoryRange(String originalrange, String newrange)
originalrange - newrange - public boolean changeTextValue(String originalval, String newval)
originalval - newval - public org.json.JSONObject getDataRangeJSON()
public org.json.JSONArray getSeriesJSON()
public void setSeriesJSON(org.json.JSONArray s)
throws org.json.JSONException
s - JSONArrayorg.json.JSONExceptionpublic Ptg[] getCellRangePtgs()
public HashMap getSeriesPtgs()
public void addSeriesMapping(int nCharts,
int[] seriesList)
nCharts - seriesList - public String[] getLegends(int nChart)
nChart - 0=default, 1-9= overlay charts -1 for ALLpublic int[] getMarkerFormats()
public static Series parseOOXML(org.xmlpull.v1.XmlPullParser xpp, WorkBookHandle wbh, ChartType parentChart, boolean hasPivotTableSource, Stack<String> lastTag)
xpp - XML pullparser positioned at ser elementwbh - WorkBookHandleparentChart - parent chart objectlastTag - public void resetSeriesNumber()
public String getOOXML(int ct, boolean isBubble3d, int nChart)
protected void updateSeriesMappings(SeriesList sl, int thischartnumber)
sl - thischartnumber - public int[] getDataLabelsPerSeries(int defaultDL,
int charttype)
defaultDL - Default Data labelscharttype - Chart Type Intpublic String[] getLegends()
public Object[] getCategories()
public ArrayList getSeriesRanges()
public ArrayList getSeriesValues()
public String[] getSeriesBarColors()
Copyright © 2002–2019 Starter Inc.. All rights reserved.