public class ChartDataTable
extends java.lang.Object
implements java.lang.Cloneable
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
fetchSpecialDefaultRunPropertyValue(int key) |
java.lang.String |
generateItemText() |
Font |
getFont()
Provides access to font formatting of the data table.
|
ChartFormat |
getFormat()
Provides access to fill of text background and border formatting of the data table.
|
java.lang.Object |
getRelativePropertyValue(int key,
java.lang.Object value) |
int |
getShapeType() |
boolean |
getShow()
Gets a flag indicating whether the data table will be shown for the chart.
|
boolean |
hasHorizontalBorder()
Gets a flag indicating whether a horizontal border of the data table is displayed.
|
void |
hasHorizontalBorder(boolean value)
Sets a flag indicating whether a horizontal border of the data table is displayed.
|
boolean |
hasLegendKeys()
Gets a flag indicating whether legend keys are displayed in the data table.
|
void |
hasLegendKeys(boolean value)
Sets a flag indicating whether legend keys are displayed in the data table.
|
boolean |
hasOutlineBorder()
Gets a flag indicating whether an outline border, that is, a border around series and category names, is displayed.
|
void |
hasOutlineBorder(boolean value)
Sets a flag indicating whether an outline border, that is, a border around series and category names, is displayed.
|
boolean |
hasVerticalBorder()
Gets a flag indicating whether a vertical border of the data table is displayed.
|
void |
hasVerticalBorder(boolean value)
Sets a flag indicating whether a vertical border of the data table is displayed.
|
boolean |
isFillSupported() |
boolean |
isFormatDefined() |
void |
materializeSpPr() |
protected java.lang.Object |
memberwiseClone() |
void |
setShapeType(int value) |
void |
setShow(boolean value)
Sets a flag indicating whether the data table will be shown for the chart.
|
public boolean getShow()
false.
Remarks:
The following chart types do not support data tables: Scatter, Pie, Doughnut, Surface, Radar, Treemap, Sunburst, Histogram, Pareto, Box and Whisker, Waterfall, Funnel, Combo charts that include series of these types. Showing a data table for the chart types throws a IllegalStateException exception.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
public void setShow(boolean value)
false.
Remarks:
The following chart types do not support data tables: Scatter, Pie, Doughnut, Surface, Radar, Treemap, Sunburst, Histogram, Pareto, Box and Whisker, Waterfall, Funnel, Combo charts that include series of these types. Showing a data table for the chart types throws a IllegalStateException exception.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
value - A flag indicating whether the data table will be shown for the chart.public boolean hasLegendKeys()
true.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
public void hasLegendKeys(boolean value)
true.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
value - A flag indicating whether legend keys are displayed in the data table.public boolean hasHorizontalBorder()
true.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
public void hasHorizontalBorder(boolean value)
true.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
value - A flag indicating whether a horizontal border of the data table is displayed.public boolean hasVerticalBorder()
true.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
public void hasVerticalBorder(boolean value)
true.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
value - A flag indicating whether a vertical border of the data table is displayed.public boolean hasOutlineBorder()
true.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
public void hasOutlineBorder(boolean value)
true.
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
value - A flag indicating whether an outline border, that is, a border around series and category names, is displayed.public Font getFont()
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
Font value.public ChartFormat getFormat()
Examples:
Shows how to show data table with chart series data.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertChart(ChartType.COLUMN, 432.0, 252.0);
Chart chart = shape.getChart();
ChartSeriesCollection series = chart.getSeries();
series.clear();
double[] xValues = new double[] { 2020.0, 2021.0, 2022.0, 2023.0 };
series.add("Series1", xValues, new double[] { 5.0, 11.0, 2.0, 7.0 });
series.add("Series2", xValues, new double[] { 6.0, 5.5, 7.0, 7.8 });
series.add("Series3", xValues, new double[] { 10.0, 8.0, 7.0, 9.0 });
ChartDataTable dataTable = chart.getDataTable();
dataTable.setShow(true);
dataTable.hasLegendKeys(false);
dataTable.hasHorizontalBorder(false);
dataTable.hasVerticalBorder(false);
dataTable.hasOutlineBorder(false);
dataTable.getFont().setItalic(true);
dataTable.getFormat().getStroke().setWeight(1.0);
dataTable.getFormat().getStroke().setDashStyle(DashStyle.SHORT_DOT);
dataTable.getFormat().getStroke().setColor(Color.BLUE);
doc.save(getArtifactsDir() + "Charts.DataTable.docx");
ChartFormat value.public java.lang.String generateItemText()
public java.lang.Object fetchSpecialDefaultRunPropertyValue(int key)
public java.lang.Object getRelativePropertyValue(int key,
java.lang.Object value)
public void materializeSpPr()
public boolean isFillSupported()
public int getShapeType()
public void setShapeType(int value)
public boolean isFormatDefined()
protected java.lang.Object memberwiseClone()