class anychart.core.ui.Table Improve this Doc
Extends: anychart.core.VisualBaseWithBounds
Declares table element.
Note: Better to use methods in anychart.ui#table.
Methods Overview
| Specific settings | |
| colsCount() | Columns count. |
| colsMaxWidth() | Column maximum width. |
| colsMinWidth() | Column minimum width. |
| colsWidth() | Column width. |
| contents() | Table content. |
| getCell() | Returns cell by its row and column number. |
| getCol() | Returns column instance by its number. |
| getRow() | Returns row instance by its number. |
| rowsCount() | Rows count. |
| rowsHeight() | Row height. |
| rowsMaxHeight() | Rows maximum height. |
| rowsMinHeight() | Rows minimum height. |
| Advanced Text Settings | |
| fontVariant() | Font variant settings. |
| letterSpacing() | Letter spacing settings. |
| lineHeight() | Line height settings. |
| textIndent() | Text indent settings. |
| textOverflow() | Text overflow settings. |
| useHtml() | Text useHtml settings. |
| wordBreak() | Word break mode. |
| wordWrap() | Word-wrap mode. |
| Base Text Settings | |
| fontColor() | Font color settings. |
| fontDecoration() | Font decoration settings. |
| fontFamily() | Font family settings. |
| fontOpacity() | Font opacity settings. |
| fontSize() | Font size settings. |
| fontStyle() | Font style settings. |
| fontWeight() | Font weight settings. |
| hAlign() | Horizontal align settings. |
| textDirection() | Text direction settings. |
| textShadow() | Text shadow settings. |
| vAlign() | Vertical align settings. |
| Coloring | |
| border() | Border settings. |
| cellBorder() | Cell border settings. |
| cellFill() | Cell fill settings. |
| rowEvenFill() | Row even fill settings. |
| rowOddFill() | Row odd fill settings. |
| Events | |
| disablePointerEvents() | Disable pointer events settings. |
| listen() | Adds an event listener |
| listenOnce() | Adds a single time event listener |
| removeAllListeners() | Removes all listeners |
| unlisten() | Removes the listener |
| unlistenByKey() | Removes the listener by the key |
| Export | |
| exports() | Exports settings |
| print() | Prints all elements. |
| saveAsCsv() | Saves the table as a CSV file. |
| saveAsJpg() | Saves into JPEG file. |
| saveAsPdf() | Saves into PDF file. |
| saveAsPng() | Saves into PNG file. |
| saveAsSvg() | Saves into SVG file. |
| shareWithFacebook() | Opens Facebook sharing dialog. |
| shareWithLinkedIn() | Opens LinkedIn sharing dialog. |
| shareWithPinterest() | Opens Pinterest sharing dialog. |
| shareWithTwitter() | Opens Twitter sharing dialog. |
| toSvg() | Returns SVG string. |
| Interactivity | |
| enabled() | Element state (enabled or disabled). |
| selectable() | Text selectable option. |
| Size and Position | |
| bottom() | Bottom bound settings. |
| bounds() | Bounds settings. |
| cellPadding() | Cell padding settings. |
| getPixelBounds() | Returns pixel bounds. |
| height() | Height settings. |
| left() | Left bound settings. |
| maxHeight() | Maximum height. |
| maxWidth() | Maximum width. |
| minHeight() | Minimum height. |
| minWidth() | Minimum width. |
| right() | Right bound settings. |
| top() | Top bound settings. |
| width() | Width settings. |
| zIndex() | Z-index of the element. |
| Table Controls | |
| contextMenu() | Context menu settings. |
| Miscellaneous | |
| container() | Container for the elements. |
| dispose() | Disposes table. |
| draw() | Draws the table. |
| fullScreen() | Fullscreen mode. |
| getJpgBase64String() | Returns JPG as base64 string. |
| getPdfBase64String() | Returns PDF as base64 string. |
| getPngBase64String() | Returns PNG as base64 string. |
| getSvgBase64String() | Returns SVG as base64 string. |
| isFullScreenAvailable() | Whether the full screen mode available in the browser or not. |
| parentBounds() | Getter for the parent bounds. |
| saveAsXlsx() | Saves table data as an Excel document. |
| shareAsJpg() | Shares a table as a JPG file and returns a link to the shared image. |
| shareAsPdf() | Shares a table as a PDF file and returns a link to the shared image. |
| shareAsPng() | Shares a table as a PNG file and returns a link to the shared image. |
| shareAsSvg() | Shares a table as a SVG file and returns a link to the shared image. |
| toCsv() | Returns CSV string with series data. |
Methods Description
border
Returns:
anychart.core.ui.table.Border - Border settings.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| color | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null | Stroke settings. | |
| thickness | number | 1 | Line thickness. |
| dashpattern | string | Controls the pattern of dashes and gaps used to stroke paths. | |
| lineJoin | string | anychart.graphics.vector.StrokeLineJoin | Line join style. | |
| lineCap | string | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
bottom
Returns:
number | string | undefined - Element's bottom bound setting.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| bottom | number | string | null | null | Bottom bound settings for the element. |
Returns:
anychart.core.ui.Table - Returns self for method chaining.Try it:
bounds
Returns:
anychart.core.utils.Bounds - Bounds of the element.Params:
| Name | Type | Description |
|---|---|---|
| bounds | anychart.utils.RectObj | anychart.math.Rect | anychart.core.utils.Bounds | Bounds of element. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| x | number | string | null | X-coordinate. |
| y | number | string | null | Y-coordinate. |
| width | number | string | null | Width. |
| height | number | string | null | Height. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
cellBorder
Returns:
anychart.core.ui.table.Border - Cell border stroke.var cellBorder = table.cellBorder();
Note: lineJoin settings not working here.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| colorSettings | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null | Stroke settings. | |
| thickness | number | 1 | Line thickness. |
| dashpattern | string | Controls the pattern of dashes and gaps used to stroke paths. | |
| lineJoin | string | anychart.graphics.vector.StrokeLineJoin | Line join style. | |
| lineCap | string | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
cellFill
Returns:
anychart.graphics.vector.Fill - Cell fill color.var cellFill = table.cellFill();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| color | anychart.graphics.vector.Fill | Array.<(anychart.graphics.vector.GradientKey|string)> | null | Color as an object, an array or a string. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Params:
| Name | Type | Description |
|---|---|---|
| color | string | Color as a string. |
| opacity | number | Color opacity. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Gradient keys. |
| angle | number | Gradient angle. |
| mode | boolean | anychart.graphics.vector.Rect | Object | Gradient mode. |
| opacity | number | Gradient opacity. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Color-stop gradient keys. |
| cx | number | X ratio of center radial gradient. |
| cy | number | Y ratio of center radial gradient. |
| mode | anychart.graphics.math.Rect | If defined then userSpaceOnUse mode, else objectBoundingBox. |
| opacity | number | Opacity of the gradient. |
| fx | number | X ratio of focal point. |
| fy | number | Y ratio of focal point. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
cellPadding
Returns:
anychart.core.ui.table.Padding - Cell padding settings.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| padding | null | Array.<(number|string)> | Object | Padding to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.// all paddings 15px
table.cellPadding(15);
// all paddings 15px
table.cellPadding('15px');
// top and bottom 5px, right and left 15px
table.cellPadding(anychart.utils.padding(5,15));Try it:
Params:
| Name | Type | Description |
|---|---|---|
| value1 | string | number | Top or top-bottom space. |
| value2 | string | number | Right or right-left space. |
| value3 | string | number | Bottom space. |
| value4 | string | number | Left space. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.// 1) top and bottom 10px, left and right 15px table.cellPadding(10, '15px'); // 2) top 10px, left and right 15px, bottom 5px table.cellPadding(10, '15px', 5); // 3) top 10px, right 15px, bottom 5px, left 12px table.cellPadding(10, '15px', '5px', 12);
Try it:
colsCount
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| count | number | 4 | Columns count to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
colsMaxWidth
Returns:
string | number | null - Column width maximum.var colsMaxWidth = table.colsMaxWidth();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| width | string | number | null | null | Column width maximum to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
colsMinWidth
Returns:
string | number | null - Column width minimum.var colsMinWidth = table.colsMinWidth();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| width | string | number | null | null | Column width minimum to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
colsWidth
Returns:
string | number | null - Column width.var colsWidth = table.colsWidth();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| width | string | number | null | null | Column width to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
container
Returns:
anychart.graphics.vector.Layer | anychart.graphics.vector.Stage - An instance of the class for method chaining.Params:
| Name | Type | Description |
|---|---|---|
| element | anychart.graphics.vector.Layer | anychart.graphics.vector.Stage | string | Element | The value to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.contents
Returns:
Array.<Array.<(anychart.core.VisualBase)>> - Table content.var contents = table.contents();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| tableValues | Array.<Array.<(anychart.core.VisualBase|string|number|undefined)>> | Values to set. | |
| demergeCells | boolean | false | Pass true to demerge all cells. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
contextMenu
- null/boolean - disable or enable context menu.
- object - sets context menu settings.
Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | boolean | null | Context menu settings |
Returns:
anychart.core.ui.Table - Self instance for method chaining.disablePointerEvents
Returns:
boolean - If pointer events are disabled.var disablePointerEvents = table.disablePointerEvents();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | false | DisablePointerEvents option to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.dispose
Removes it from parent layer, nulls links, removes from DOM.
draw
enabled
Returns:
boolean - Element state.Try it:
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | true | Enabled state to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.if (!element.enabled()) element.enabled(true);
Try it:
exports
Returns:
anychart.core.utils.Exports - Exports settings.var exports = table.exports();
Params:
| Name | Type | Description |
|---|---|---|
| settings | Object | Export settings. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
fontColor
Returns:
string - Font color.var fontColor = table.fontColor();
Params:
| Name | Type | Description |
|---|---|---|
| color | string | Font color to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
fontDecoration
Returns:
anychart.graphics.vector.Text.Decoration | string - Font decoration.var fontDecoration = table.fontDecoration();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| value | anychart.graphics.vector.Text.Decoration | string | anychart.graphics.vector.Text.Decoration#NONE | Font decoration to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
fontFamily
Returns:
string - Font family.Params:
| Name | Type | Description |
|---|---|---|
| family | string | Font family to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
fontOpacity
Returns:
number - Font opacity.var fontOpacity = table.fontOpacity();
Params:
| Name | Type | Description |
|---|---|---|
| opacity | number | Font opacity to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
fontSize
Returns:
string | number - Font size.Params:
| Name | Type | Description |
|---|---|---|
| size | string | number | Font size to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
fontStyle
Returns:
anychart.graphics.vector.Text.FontStyle | string - Font style.var fontStyle = table.fontStyle();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| style | anychart.graphics.vector.Text.FontStyle | string | anychart.graphics.vector.Text.FontStyle#NORMAL | Font style to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
fontVariant
Returns:
anychart.graphics.vector.Text.FontVariant | string - Font variant.var fontVariant = table.fontVariant();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| value | anychart.graphics.vector.Text.FontVariant | string | anychart.graphics.vector.Text.FontVariant#NORMAL | Font variant to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
fontWeight
Returns:
string | number - Font weight.var fontWeight = table.fontWeight();
Params:
| Name | Type | Description |
|---|---|---|
| weight | string | number | Font weight to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
fullScreen
Returns:
boolean - Full screen state (enabled/disabled).var fullScreen = table.fullScreen();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | false | Enable/Disable fullscreen mode. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
getCell
Params:
| Name | Type | Description |
|---|---|---|
| row | number | Row index. |
| col | number | Column index. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
getCol
Params:
| Name | Type | Description |
|---|---|---|
| col | number | A column by number |
Returns:
anychart.core.ui.table.Column - Self instance for method chaining.Try it:
getJpgBase64String
Params:
| Name | Type | Description |
|---|---|---|
| onSuccess | function(response:string) | Function that is called when sharing is complete. |
| onError | function(response:string) | Function that is called if sharing fails. |
| width | number | Image width. |
| height | number | Image height. |
| quality | number | Image quality in ratio 0-1. |
| forceTransparentWhite | boolean | Force transparent to white or not. |
Try it:
getPdfBase64String
getPdfBase64String(onSuccess, onError, paperSizeOrWidth, landscapeOrWidth, x, y)Since version 7.11.1
Params:
| Name | Type | Description |
|---|---|---|
| onSuccess | function(response:string) | Function that is called when sharing is complete. |
| onError | function(response:string) | Function that is called if sharing fails. |
| paperSizeOrWidth | number | string | Any paper format like 'a0', 'tabloid', 'b4', etc. |
| landscapeOrWidth | number | boolean | Define, is landscape. |
| x | number | Offset X. |
| y | number | Offset Y. |
Try it:
getPixelBounds
Returns:
anychart.math.Rect - Pixel bounds of the element.getPngBase64String
Params:
| Name | Type | Description |
|---|---|---|
| onSuccess | function(response:string) | Function that is called when sharing is complete. |
| onError | function(response:string) | Function that is called if sharing fails. |
| width | number | Image width. |
| height | number | Image height. |
| quality | number | Image quality in ratio 0-1. |
Try it:
getRow
Params:
| Name | Type | Description |
|---|---|---|
| row | number | A row by number. |
Returns:
anychart.core.ui.table.Row - Self instance for method chaining.Try it:
getSvgBase64String
Params:
| Name | Type | Description |
|---|---|---|
| onSuccess | function(response:string) | Function that is called when sharing is complete. |
| onError | function(response:string) | Function that is called if sharing fails. |
| paperSizeOrWidth | string | number | Paper Size or width. |
| landscapeOrHeight | boolean | string | Landscape or height. |
Try it:
hAlign
Returns:
anychart.graphics.vector.Text.HAlign | string - Text horizontal align.var hAlign = table.hAlign();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| align | anychart.graphics.vector.Text.HAlign | string | anychart.graphics.vector.Text.HAlign#START | Horizontal align to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
height
Returns:
number | string | undefined - Element's height setting.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| height | number | string | null | null | Height settings for the element. |
Returns:
anychart.core.ui.Table - Returns self for method chaining.Try it:
isFullScreenAvailable
Returns:
boolean - isFullScreenAvailable state.Try it:
left
Returns:
number | string | undefined - Element's left bound setting.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| left | number | string | null | null | Left bound setting for the element. |
Returns:
anychart.core.ui.Table - Returns self for method chaining.Try it:
letterSpacing
Returns:
string | number - Letter spacing.var letterSpacing = table.letterSpacing();
Params:
| Name | Type | Description |
|---|---|---|
| spacing | string | number | Letter spacing to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
lineHeight
Returns:
string | number - Text line height.var lineHeight = table.lineHeight();
Params:
| Name | Type | Description |
|---|---|---|
| height | string | number | Line height to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
listen
Note Notice that if the existing listener is one-off (added using listenOnce), it will cease to be such after calling the listen() method.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| type | string | The event type id. | |
| listener | function(e:Object) | Callback method. Function that looks like: function(event){
// event.actualTarget - actual event target
// event.currentTarget - current event target
// event.iterator - event iterator
// event.originalEvent - original event
// event.point - event point
// event.pointIndex - event point index
} | |
| useCapture | boolean | false | Whether to fire in capture phase. Learn more about capturing https://javascript.info/bubbling-and-capturing |
| listenerScope | Object | Object in whose scope to call the listener. |
Returns:
Object - Unique key for the listener.Try it:
listenOnce
If the event handler being added already exists, listenOnce will do nothing.
Note In particular, if the handler is already registered using listen(), listenOnce() will not make it one-off. Similarly, if a one-off listener already exists, listenOnce will not change it (it wil remain one-off).
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| type | string | The event type id. | |
| listener | function(e:Object) | Callback method. | |
| useCapture | boolean | false | Whether to fire in capture phase. Learn more about capturing https://javascript.info/bubbling-and-capturing |
| listenerScope | Object | Object in whose scope to call the listener. |
Returns:
Object - Unique key for the listener.Try it:
maxHeight
Returns:
number | string | null - Element's maximum height.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| height | number | string | null | null | Maximum height to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
maxWidth
Returns:
number | string | null - Element's maximum width.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| width | number | string | null | null | Maximum width to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
minHeight
Returns:
number | string | null - Element's minimum height.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| height | number | string | null | null | Minimum height to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
minWidth
Returns:
number | string | null - Element's minimum width.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| width | number | string | null | null | Minimum width to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
parentBounds
Bounds that would be used in case of percent size calculations. Expects pixel values only.
Returns:
anychart.math.Rect - The parent bounds of the element.Bounds that would be used in case of percent size calculations. Expects pixel values only.
Params:
| Name | Type | Description |
|---|---|---|
| bounds | anychart.math.Rect | Object | number | null | Bounds to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Bounds that would be used in case of percent size calculations. Expects pixel values only.
Params:
| Name | Type | Description |
|---|---|---|
| left | number | Left space. |
| top | number | Top space. |
| width | number | Element width. |
| height | number | Element height. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| paperSizeOrOptions | anychart.graphics.vector.PaperSize | Object | Paper size or object with options. | |
| landscape | boolean | false | Flag of landscape. |
Try it:
removeAllListeners
Params:
| Name | Type | Description |
|---|---|---|
| type | string | Type of event to remove, default is to remove all types. |
Returns:
number - Number of listeners removed.Try it:
right
Returns:
number | string | undefined - Element's right bound setting.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| right | number | string | null | null | Right bound setting for the element. |
Returns:
anychart.core.ui.Table - Returns self for method chaining.Try it:
rowEvenFill
Returns:
anychart.graphics.vector.Fill - Row even fill color.var rowEvenFill = table.rowEvenFill();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| color | anychart.graphics.vector.Fill | Array.<(anychart.graphics.vector.GradientKey|string)> | null | Color as an object, an array or a string. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Params:
| Name | Type | Description |
|---|---|---|
| color | string | Color as a string. |
| opacity | number | Color opacity. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Gradient keys. |
| angle | number | Gradient angle. |
| mode | boolean | anychart.graphics.vector.Rect | Object | Gradient mode. |
| opacity | number | Gradient opacity. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Color-stop gradient keys. |
| cx | number | X ratio of center radial gradient. |
| cy | number | Y ratio of center radial gradient. |
| mode | anychart.graphics.math.Rect | If defined then userSpaceOnUse mode, else objectBoundingBox. |
| opacity | number | Opacity of the gradient. |
| fx | number | X ratio of focal point. |
| fy | number | Y ratio of focal point. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
rowOddFill
Returns:
anychart.graphics.vector.Fill - Row odd fill color.var rowOddFill = table.rowOddFill();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| color | anychart.graphics.vector.Fill | Array.<(anychart.graphics.vector.GradientKey|string)> | null | Color as an object, an array or a string. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Params:
| Name | Type | Description |
|---|---|---|
| color | string | Color as a string. |
| opacity | number | Color opacity. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Gradient keys. |
| angle | number | Gradient angle. |
| mode | boolean | anychart.graphics.vector.Rect | Object | Gradient mode. |
| opacity | number | Gradient opacity. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| keys | Array.<(anychart.graphics.vector.GradientKey|string)> | Color-stop gradient keys. |
| cx | number | X ratio of center radial gradient. |
| cy | number | Y ratio of center radial gradient. |
| mode | anychart.graphics.math.Rect | If defined then userSpaceOnUse mode, else objectBoundingBox. |
| opacity | number | Opacity of the gradient. |
| fx | number | X ratio of focal point. |
| fy | number | Y ratio of focal point. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
rowsCount
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| count | number | 5 | Rows count to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
rowsHeight
Returns:
string | number | null - Rows height.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| height | string | number | null | null | Rows height to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
rowsMaxHeight
Returns:
string | number | null - Row height maximum.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| height | string | number | null | null | Row height maximum to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
rowsMinHeight
Returns:
string | number | null - Row height minimum.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| height | string | number | null | null | Row height minimum to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
saveAsCsv
Params:
| Name | Type | Description |
|---|---|---|
| chartDataExportMode | anychart.enums.ChartDataExportMode | string | Data export mode. |
| csvSettings | Object.<string, (string|boolean|undefined|function(name:*, value:*))> | CSV settings object:
Formatters must be represented as one of:
|
| filename | string | File name to save. |
Try it:
saveAsJpg
Params:
| Name | Type | Description |
|---|---|---|
| width | number | Image width. |
| height | number | Image height. |
| quality | number | Image quality in ratio 0-1. |
| forceTransparentWhite | boolean | Force transparent to white or not. |
Try it:
saveAsPdf
Params:
| Name | Type | Description |
|---|---|---|
| paperSize | string | Any paper format like 'a0', 'tabloid', 'b4', etc. |
| landscape | boolean | Define, is landscape. |
| x | number | Offset X. |
| y | number | Offset Y. |
Try it:
saveAsPng
Params:
| Name | Type | Description |
|---|---|---|
| width | number | Image width. |
| height | number | Image height. |
| quality | number | Image quality in ratio 0-1. |
Try it:
saveAsSvg
Params:
| Name | Type | Description |
|---|---|---|
| paperSize | string | Paper Size. |
| landscape | boolean | Landscape. |
Try it:
Params:
| Name | Type | Description |
|---|---|---|
| width | number | Image width. |
| height | number | Image height. |
Try it:
saveAsXlsx
Params:
| Name | Type | Description |
|---|---|---|
| filename | string | File name to save. |
Try it:
selectable
Returns:
boolean - Text selectable option.var selectable = table.selectable();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | false | Text selectable option to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
shareAsJpg
shareAsPdf
shareAsPng
shareAsSvg
shareWithFacebook
shareWithLinkedIn
shareWithPinterest
shareWithTwitter
textDirection
Returns:
anychart.graphics.vector.Text.Direction | string - Text direction.var textDirection = table.textDirection();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| value | anychart.graphics.vector.Text.Direction | string | anychart.graphics.vector.Text.Direction#LTR | Text direction to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
textIndent
Returns:
number - Text indent.var textIndent = table.textIndent();
Params:
| Name | Type | Description |
|---|---|---|
| indent | number | Text indent to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
textOverflow
Returns:
anychart.graphics.vector.Text.TextOverflow | string - Text overflow settings.var textOverflow = table.textOverflow();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| value | anychart.graphics.vector.Text.TextOverflow | string | anychart.graphics.vector.Text.TextOverflow#CLIP | Value to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
textShadow
Returns:
string - String representation of text shadow.var textShadow = table.textShadow();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| textShadow | anychart.graphics.vector.TextShadow | string | 'none' | Text shadow to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
toCsv
Params:
| Name | Type | Description |
|---|---|---|
| csvSettings | Object.<string, (string|boolean|undefined)> | CSV settings. |
Returns:
string - CSV string.Try it:
toSvg
Params:
| Name | Type | Description |
|---|---|---|
| paperSize | string | Paper Size. |
| landscape | boolean | Landscape. |
Returns:
string - SVG string or empty string.Try it:
Params:
| Name | Type | Description |
|---|---|---|
| width | number | Paper Size or width. |
| height | number | Landscape or height. |
Returns:
string - SVG string or empty string.Try it:
top
Returns:
number | string | undefined - Element's top bound setting.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| top | number | string | null | null | Top bound setting for the element. |
Returns:
anychart.core.ui.Table - Returns self for method chaining.Try it:
unlisten
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| type | string | The event type id. | |
| listener | function(e:Object):boolean|undefined | Callback method. | |
| useCapture | boolean | false | Whether to fire in capture phase. Learn more about capturing https://javascript.info/bubbling-and-capturing |
| listenerScope | Object | Object in whose scope to call the listener. |
Returns:
boolean - Whether any listener was removed.Try it:
unlistenByKey
Params:
| Name | Type | Description |
|---|---|---|
| key | Object | The key returned by listen() or listenOnce(). |
Returns:
boolean - Whether any listener was removed.Try it:
useHtml
Returns:
boolean - Boolean flag.var useHtml = table.useHtml();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | false | Value to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
vAlign
Returns:
anychart.graphics.vector.Text.VAlign | string - Text vertical align.var vAlign = table.vAlign();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| align | anychart.graphics.vector.Text.VAlign | string | anychart.graphics.vector.Text.VAlign#TOP | Vertical align to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
width
Returns:
number | string | undefined - Element's width setting.Params:
| Name | Type | Default | Description |
|---|---|---|---|
| width | number | string | null | null | Width settings for the element. |
Returns:
anychart.core.ui.Table - Returns self for method chaining.Try it:
wordBreak
Returns:
anychart.enums.WordBreak | string - Word-break mode.var wordBreak = table.wordBreak();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| mode | anychart.enums.WordBreak | string | 'normal' | Value to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
wordWrap
Returns:
anychart.enums.WordWrap | string - Word-wrap mode.var wordWrap = table.wordWrap();
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| mode | anychart.enums.WordWrap | string | 'normal' | Value to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
zIndex
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| zIndex | number | 0 | Value to set. |
Returns:
anychart.core.ui.Table - Self instance for method chaining.Try it:
