class anychart.core.ui.table.Cell Improve this Doc
Extends: anychart.core.ui.table.Base
Table cell.
Methods Overview
Advanced Text Settings | |
fontVariant() | Text font variant settings. |
letterSpacing() | Text letter spacing settings. |
textDirection() | Text direction settings. |
textIndent() | Text line height settings. |
textOverflow() | Text overflow settings. |
textWrap() | Text wrap settings. |
useHtml() | Text useHtml settings. |
Base Text Settings | |
fontColor() | Text font color settings. |
fontDecoration() | Text font decoration settings. |
fontFamily() | Text font family settings. |
fontOpacity() | Text font opacity settings. |
fontSize() | Text font size settings. |
fontStyle() | Text font style settings. |
fontWeight() | Text font weight settings. |
hAlign() | Text horizontal align settings. |
lineHeight() | Text line height settings. |
vAlign() | Text vertical align settings. |
Coloring | |
border() | Cell border settings. |
fill() | Fill settings. |
Events | |
disablePointerEvents() | Disable pointer events settings. |
Interactivity | |
selectable() | Text selectable option. |
Size and Position | |
padding() | Padding settings. |
Miscellaneous | |
colSpan() | Cell columns span settings. |
content() | Cell content settings. |
getBounds() | Returns cell bounds without padding counted (bounds which are used for borders drawing). |
getCol() | Returns current cell column instance. |
getColNum() | Returns current cell column number. |
getRow() | Returns current cell row instance. |
getRowNum() | Returns current cell row number. |
rowSpan() | Rows columns span settings. |
Methods Description
border
Returns:
anychart.core.ui.table.Border - Current stroke settings.Note: lineJoin settings not working here.
Params:
Name | Type | Default | Description |
---|---|---|---|
strokeOrFill | anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | function | null | Fill settings or stroke settings. | |
thickness | number | 1 | Line thickness. |
dashpattern | string | Controls the pattern of dashes and gaps used to stroke paths. | |
lineJoin | anychart.graphics.vector.StrokeLineJoin | Line join style. | |
lineCap | anychart.graphics.vector.StrokeLineCap | Line cap style. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
colSpan
Params:
Name | Type | Default | Description |
---|---|---|---|
value | number | 1 | Count of cells to merge right. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
content
Returns:
anychart.core.VisualBase - Current cell content.Params:
Name | Type | Description |
---|---|---|
value | anychart.core.VisualBase | string | number | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
disablePointerEvents
Returns:
boolean - If pointer events are disabled.Params:
Name | Type | Default | Description |
---|---|---|---|
value | boolean | false | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.fill
Returns:
anychart.graphics.vector.Fill - Current fill color.Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Fill | null | Color as an object or a string. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
color | string | Color as a string. |
opacity | number | Color opacity. |
Returns:
anychart.core.ui.table.Cell - 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.Cell - 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.Cell - Self instance for method chaining.Try it:
Params:
Name | Type | Description |
---|---|---|
imageSettings | anychart.graphics.vector.Fill | Object with settings. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
fontColor
Returns:
string - The current font color.Params:
Name | Type | Description |
---|---|---|
value | string | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
fontDecoration
Returns:
anychart.graphics.vector.Text.Decoration | string - The current font decoration.Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.Decoration | string | anychart.graphics.vector.Text.Decoration#NONE | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
fontFamily
Returns:
string - The current font family.Params:
Name | Type | Description |
---|---|---|
value | string | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
fontOpacity
Returns:
number - The current font opacity.Params:
Name | Type | Default | Description |
---|---|---|---|
value | number | 1 | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
fontSize
Returns:
string | number - Current font size.Params:
Name | Type | Description |
---|---|---|
value | string | number | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
fontStyle
Returns:
anychart.graphics.vector.Text.FontStyle | string - The current font style.Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.FontStyle | string | anychart.graphics.vector.Text.FontStyle#NORMAL | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
fontVariant
Returns:
anychart.graphics.vector.Text.FontVariant | string - The current font variant.Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.FontVariant | string | anychart.graphics.vector.Text.FontVariant#NORMAL | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
fontWeight
Returns:
string | number - The current font weight.Params:
Name | Type | Description |
---|---|---|
value | string | number | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
getBounds
Returns:
anychart.math.Rect - Current cell bounds.Try it:
getCol
Returns:
anychart.core.ui.table.Column - Current cell column instance.Try it:
getColNum
getRow
Returns:
anychart.core.ui.table.Row - Current cell row instance.Try it:
getRowNum
hAlign
Returns:
anychart.graphics.vector.Text.HAlign | string - The current text horizontal align.Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.HAlign | string | anychart.graphics.vector.Text.HAlign#START | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
letterSpacing
Returns:
string | number - The current letter spacing.Params:
Name | Type | Description |
---|---|---|
value | string | number | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
lineHeight
Returns:
string | number - The current text line height.Params:
Name | Type | Description |
---|---|---|
value | string | number | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
padding
Returns:
anychart.core.ui.table.Padding - Padding settings.Try it:
Params:
Name | Type | Description |
---|---|---|
value | null | Array.<(number|string)> | Object | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.// all paddings 15px cell.padding(15); // all paddings 15px cell.padding('15px'); // top and bottom 5px ,right and left 15px cell.padding(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.Cell - 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:
rowSpan
Params:
Name | Type | Default | Description |
---|---|---|---|
value | number | 1 | Count of cells to merge down. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
selectable
Returns:
boolean - The current text selectable option.Params:
Name | Type | Default | Description |
---|---|---|---|
value | boolean | false | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
textDirection
Returns:
anychart.graphics.vector.Text.Direction | string - Current text direction.Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.Direction | string | anychart.graphics.vector.Text.Direction#LTR | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
textIndent
Returns:
number - The current text indent.Params:
Name | Type | Description |
---|---|---|
value | number | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
textOverflow
Returns:
anychart.graphics.vector.Text.TextOverflow | string - The current text overflow settings.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.Cell - Self instance for method chaining.Try it:
textWrap
Returns:
anychart.graphics.vector.Text.TextWrap | string - The current text wrap settings.Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.TextWrap | string | anychart.graphics.vector.Text.TextWrap#BY_LETTER | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
useHtml
Returns:
boolean - The current value of useHTML flag.Params:
Name | Type | Default | Description |
---|---|---|---|
value | boolean | false | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it:
vAlign
Returns:
anychart.graphics.vector.Text.VAlign | string - The current text vertical align.Params:
Name | Type | Default | Description |
---|---|---|---|
value | anychart.graphics.vector.Text.VAlign | string | anychart.graphics.vector.Text.VAlign#TOP | Value to set. |
Returns:
anychart.core.ui.table.Cell - Self instance for method chaining.Try it: