Top
You are looking at an outdated 7.13.1 version of this document. Switch to the 7.14.3 version to see the up to date information.

class anychart.core.ui.table.Column Improve this Doc

Extends: anychart.core.ui.table.Base

Table column settings container.

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()Border settings.
cellBorder()Cell border settings.
cellFill()Cell fill settings.
Events
disablePointerEvents()Disable pointer events settings.
Interactivity
selectable()Text selectable option.
Size and Position
cellPadding()Cell padding settings.
maxWidth()Column maximum width settings.
minWidth()Column minimum width settings.
width()Column width settings.
Miscellaneous
getCell()Returns cell of current column by row index.
getColNum()Returns column index.

Methods Description

border

Getter for border settings object.

Returns:

anychart.core.ui.table.Border - Current border settings.
Setter for cell border settings. Learn more about stroke settings.

Params:

Name Type Default Description
color 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 anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

cellBorder

Getter for border settings object.

Returns:

anychart.core.ui.table.Border - Current border settings.
Setter for cell border settings. Learn more about stroke settings.

Params:

Name Type Default Description
color 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 anychart.graphics.vector.StrokeLineJoin
Line join style.
lineCap anychart.graphics.vector.StrokeLineCap
Line cap style.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

cellFill

Getter for current fill color override.

Returns:

anychart.graphics.vector.Fill - Current fill color.
Sets fill settings using an object or a string. Learn more about coloring.

Params:

Name Type Default Description
value anychart.graphics.vector.Fill
undefined
Color as an object or a string.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.
Fill color with opacity. Fill as a string or an object.

Params:

Name Type Description
color string Color as a string.
opacity number Color opacity.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

Linear gradient fill. Learn more about coloring.

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.Base - Self instance for method chaining.

Try it:

Radial gradient fill. Learn more about coloring.

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.Base - Self instance for method chaining.

Try it:

Params:

Name Type Description
imageSettings anychart.graphics.vector.Fill Object with settings.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

cellPadding

Setter for current cell paddings in pixels using a single value.

Params:

Name Type Description
value null | Array.<(number|string)> | Object Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.
Examples for paddings
// 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:

Setter for current cell paddings in pixels using several numbers.

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.Base - Self instance for method chaining.
Examples for paddings
// 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:

disablePointerEvents

Gets current state of disablePointerEvents option.

Returns:

boolean - If pointer events are disabled.
Setter for the text disablePointerEvents option.

Params:

Name Type Default Description
value boolean
false
Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

fontColor

Getter for the text font color.

Returns:

string - The current font color.
Setter for the text font color. https://www.w3schools.com/html/html_colors.asp

Params:

Name Type Description
value string Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

fontDecoration

Getter for the text font decoration.

Returns:

anychart.graphics.vector.Text.Decoration string - The current font decoration.
Setter for the text 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.Base - Self instance for method chaining.

Try it:

fontFamily

Getter for the font family.

Returns:

string - The current font family.
Setter for the font family.

Params:

Name Type Description
value string Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

fontOpacity

Getter for the text font opacity.

Returns:

number - The current font opacity.
Setter for the text font opacity. Double value from 0 to 1.

Params:

Name Type Default Description
value number
1
Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

fontSize

Getter for text font size.

Returns:

string number - Current font size.
Setter for text font size.

Params:

Name Type Description
value string | number Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

fontStyle

Getter for the text font style.

Returns:

anychart.graphics.vector.Text.FontStyle string - The current font style.
Setter for the text 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.Base - Self instance for method chaining.

Try it:

fontVariant

Getter for the text font variant.

Returns:

anychart.graphics.vector.Text.FontVariant string - The current font variant.
Setter for the text 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.Base - Self instance for method chaining.

Try it:

fontWeight

Getter for the text font weight.

Returns:

string number - The current font weight.
Setter for the text font weight. https://www.w3schools.com/cssref/pr_font_weight.asp

Params:

Name Type Description
value string | number Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

getCell

Returns cell of current column by row index.

Params:

Name Type Description
row number Row index.

Returns:

anychart.core.ui.table.Cell - Cell instance.

Try it:

getColNum

Returns column index.

Returns:

number - Current column index.

Try it:

hAlign

Getter for the text horizontal align.

Returns:

anychart.graphics.vector.Text.HAlign string - The current text horizontal align.
Setter for the 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.Base - Self instance for method chaining.

Try it:

letterSpacing

Getter for the text letter spacing.

Returns:

string number - The current letter spacing.

Params:

Name Type Description
value string | number Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

lineHeight

Getter for the text line height.

Returns:

string number - The current text line height.

Params:

Name Type Description
value string | number Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

maxWidth

Getter for column maximum width settings.

Returns:

string number null - Current column maximum width.
Getter and setter for column max width settings.

Params:

Name Type Default Description
value string | number | null
null
Value to set.

Returns:

anychart.core.ui.table.Column - Self instance for method chaining.

Try it:

minWidth

Getter for column minimum width settings.

Returns:

string number null - Current column minimum width.
Setter for column minimum width settings.

Params:

Name Type Default Description
value string | number | null
null
Value to set.

Returns:

anychart.core.ui.table.Column - Self instance for method chaining.

Try it:

selectable

Getter for the text selectable option.

Returns:

boolean - The current text selectable option.
Setter for the text selectable.

Params:

Name Type Default Description
value boolean
false
Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

textDirection

Getter for the text direction.

Returns:

anychart.graphics.vector.Text.Direction string - Current text direction.
Setter for the 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.Base - Self instance for method chaining.

Try it:

textIndent

Getter for the text indent.

Returns:

number - The current text indent.
Setter for the text indent.

Params:

Name Type Description
value number Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

textOverflow

Getter for the text overflow settings.

Returns:

anychart.graphics.vector.Text.TextOverflow string - The current text overflow settings.
Setter for the 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.Base - Self instance for method chaining.

Try it:

textWrap

Getter for the text wrap settings.

Returns:

anychart.graphics.vector.Text.TextWrap string - The current text wrap settings.
Setter for the 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.Base - Self instance for method chaining.

Try it:

useHtml

Getter for the useHtml flag.

Returns:

boolean - The current value of useHTML flag.
Setter for flag useHtml.

Params:

Name Type Default Description
value boolean
false
Value to set.

Returns:

anychart.core.ui.table.Base - Self instance for method chaining.

Try it:

vAlign

Getter for the text vertical align.

Returns:

anychart.graphics.vector.Text.VAlign string - The current text vertical align.
Setter for the 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.Base - Self instance for method chaining.

Try it:

width

Getter for column width settings.

Returns:

string number null - Current column width.
Setter for column width settings.

Params:

Name Type Default Description
value string | number | null
null
Value to set.

Returns:

anychart.core.ui.table.Column - Self instance for method chaining.

Try it: