ChartDataTable
Inheritance: java.lang.Object
public class ChartDataTable
Represents a chart data table.
Example
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Obtaining the reference of the first worksheet
Worksheet worksheet = workbook.getWorksheets().get(0);
//Adding a sample value to "A1" cell
worksheet.getCells().get("A1").putValue(50);
//Adding a sample value to "A2" cell
worksheet.getCells().get("A2").putValue(100);
//Adding a sample value to "A3" cell
worksheet.getCells().get("A3").putValue(150);
//Adding a sample value to "B1" cell
worksheet.getCells().get("B1").putValue(60);
//Adding a sample value to "B2" cell
worksheet.getCells().get("B2").putValue(32);
//Adding a sample value to "B3" cell
worksheet.getCells().get("B3").putValue(50);
//Adding a chart to the worksheet
int chartIndex = worksheet.getCharts().add(ChartType.COLUMN, 5, 0, 25, 10);
//Accessing the instance of the newly added chart
Chart chart = worksheet.getCharts().get(chartIndex);
//Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3"
chart.getNSeries().add("A1:B3", true);
chart.setShowDataTable(true);
//Getting Chart Table
ChartDataTable chartTable = chart.getChartDataTable();
//Setting Chart Table Font Color
chartTable.getFont().setColor(com.aspose.cells.Color.getRed());
//Setting Legend Key VisibilityOptions
chartTable.setShowLegendKey(false);
//Saving the Excel file
workbook.save("book1.xls");
Methods
Method | Description |
---|---|
equals(Object arg0) | |
getAutoScaleFont() | True if the text in the object changes font size when the object size changes. |
getBackgroundMode() | Gets the display mode of the background |
getBorder() | Returns a Border object that represents the border of the object |
getClass() | |
getFont() | Gets a ChartArea.getFont() object which represents the font setting of the specified chart data table. |
getShowLegendKey() | True if the data label legend key is visible. |
hasBorderHorizontal() | True if the chart data table has horizontal cell borders |
hasBorderOutline() | True if the chart data table has outline borders |
hasBorderVertical() | True if the chart data table has vertical cell borders |
hasHorizontalBorder() | True if the chart data table has horizontal cell borders |
hasOutlineBorder() | True if the chart data table has outline borders |
hasVerticalBorder() | True if the chart data table has vertical cell borders |
hashCode() | |
notify() | |
notifyAll() | |
setAutoScaleFont(boolean value) | True if the text in the object changes font size when the object size changes. |
setBackgroundMode(int value) | Sets the display mode of the background |
setHasBorderHorizontal(boolean value) | True if the chart data table has horizontal cell borders |
setHasBorderOutline(boolean value) | True if the chart data table has outline borders |
setHasBorderVertical(boolean value) | True if the chart data table has vertical cell borders |
setHasHorizontalBorder(boolean value) | True if the chart data table has horizontal cell borders |
setHasOutlineBorder(boolean value) | True if the chart data table has outline borders |
setHasVerticalBorder(boolean value) | True if the chart data table has vertical cell borders |
setShowLegendKey(boolean value) | True if the data label legend key is visible. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getAutoScaleFont()
public boolean getAutoScaleFont()
True if the text in the object changes font size when the object size changes. The default value is True.
Returns: boolean
getBackgroundMode()
public int getBackgroundMode()
Gets the display mode of the background
See BackgroundMode.
Returns: int
getBorder()
public Line getBorder()
Returns a Border object that represents the border of the object
Returns: Line
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getFont()
public Font getFont()
Gets a ChartArea.getFont() object which represents the font setting of the specified chart data table.
Returns: Font
getShowLegendKey()
public boolean getShowLegendKey()
True if the data label legend key is visible.
Returns: boolean
hasBorderHorizontal()
public boolean hasBorderHorizontal()
True if the chart data table has horizontal cell borders
Remarks
NOTE: This property is now obsolete. Instead, please use ChartDataTable.HasHorizontalBorder property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
Returns: boolean
hasBorderOutline()
public boolean hasBorderOutline()
True if the chart data table has outline borders
Remarks
NOTE: This property is now obsolete. Instead, please use ChartDataTable.HasOutlineBorder property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
Returns: boolean
hasBorderVertical()
public boolean hasBorderVertical()
True if the chart data table has vertical cell borders
Remarks
NOTE: This property is now obsolete. Instead, please use ChartDataTable.HasVerticalBorder property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
Returns: boolean
hasHorizontalBorder()
public boolean hasHorizontalBorder()
True if the chart data table has horizontal cell borders
Returns: boolean
hasOutlineBorder()
public boolean hasOutlineBorder()
True if the chart data table has outline borders
Returns: boolean
hasVerticalBorder()
public boolean hasVerticalBorder()
True if the chart data table has vertical cell borders
Returns: boolean
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setAutoScaleFont(boolean value)
public void setAutoScaleFont(boolean value)
True if the text in the object changes font size when the object size changes. The default value is True.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setBackgroundMode(int value)
public void setBackgroundMode(int value)
Sets the display mode of the background
See BackgroundMode.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setHasBorderHorizontal(boolean value)
public void setHasBorderHorizontal(boolean value)
True if the chart data table has horizontal cell borders
Remarks
NOTE: This property is now obsolete. Instead, please use ChartDataTable.HasHorizontalBorder property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setHasBorderOutline(boolean value)
public void setHasBorderOutline(boolean value)
True if the chart data table has outline borders
Remarks
NOTE: This property is now obsolete. Instead, please use ChartDataTable.HasOutlineBorder property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setHasBorderVertical(boolean value)
public void setHasBorderVertical(boolean value)
True if the chart data table has vertical cell borders
Remarks
NOTE: This property is now obsolete. Instead, please use ChartDataTable.HasVerticalBorder property. This property will be removed 12 months later since June 2024. Aspose apologizes for any inconvenience you may have experienced.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setHasHorizontalBorder(boolean value)
public void setHasHorizontalBorder(boolean value)
True if the chart data table has horizontal cell borders
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setHasOutlineBorder(boolean value)
public void setHasOutlineBorder(boolean value)
True if the chart data table has outline borders
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setHasVerticalBorder(boolean value)
public void setHasVerticalBorder(boolean value)
True if the chart data table has vertical cell borders
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setShowLegendKey(boolean value)
public void setShowLegendKey(boolean value)
True if the data label legend key is visible.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |