TableView
Defined in: js-api/src/views/view.ts:418
A View that is associated with a DataFrame and exposes exploratory data analysis functionality. This view gets opened whenever a new table is added to the workspace when a user drag-and-drops a CSV file, or opens a table in any other way.
Extends
Constructors
Constructor
new TableView(
dart):TableView
Defined in: js-api/src/views/view.ts:420
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
TableView
Overrides
Properties
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|---|
_functions | protected | Func[] | [] | - | View._functions | js-api/src/widgets/base.ts:218 |
_name | protected | string | 'New View' | - | View._name | js-api/src/views/view.ts:108 |
_properties | protected | Property[] | [] | - | View._properties | js-api/src/widgets/base.ts:217 |
_root | protected | HTMLElement | undefined | - | View._root | js-api/src/u2core/component.ts:666 |
_u2 | readonly | ComponentState | undefined | - | View._u2 | js-api/src/u2core/component.ts:119 |
componentMeta? | public | ComponentMetaBase | undefined | The registry metadata of the tag that built this component, stamped by the spec renderer — the single source the introspection surface below is generated from. | View.componentMeta | js-api/src/u2core/component.ts:114 |
dart | public | any | undefined | - | View.dart | js-api/src/views/view.ts:49 |
factory | public | Func | null | null | Constructor function. No parameters, returns [Widget]. | View.factory | js-api/src/widgets/base.ts:215 |
isDetached | public | boolean | false | Whether detach has been called. | View.isDetached | js-api/src/widgets/base.ts:225 |
props | public | any | undefined | Property bag over this widget's properties; read and write them by name. | View.props | js-api/src/widgets/base.ts:220 |
specProps? | public | Record<string, unknown> | undefined | The props the registry's create was handed, stamped alongside componentMeta: the last resort of the property read below, for a component that keeps a prop under another name or not at all (a create wrapping a bare element). Construction-time values — a live one always wins. | View.specProps | js-api/src/u2core/component.ts:118 |
subs | public | Subscription[] | undefined | Subscriptions cancelled when the widget is detached. | View.subs | js-api/src/views/view.ts:50 |
temp | public | any | undefined | Contains auxiliary information | View.temp | js-api/src/views/view.ts:244 |
ALL_VIEW_TYPES | readonly | string[] | undefined | - | View.ALL_VIEW_TYPES | js-api/src/views/view.ts:405 |
APPS | readonly | "apps" | 'apps' | - | View.APPS | js-api/src/views/view.ts:375 |
BROWSE | readonly | "browse" | 'browse' | - | View.BROWSE | js-api/src/views/view.ts:402 |
DATA_CONNECTIONS | readonly | "connections" | 'connections' | - | View.DATA_CONNECTIONS | js-api/src/views/view.ts:389 |
DATA_JOB_RUNS | readonly | "jobs" | 'jobs' | - | View.DATA_JOB_RUNS | js-api/src/views/view.ts:390 |
DATA_QUERY_RUNS | readonly | "queryruns" | 'queryruns' | - | View.DATA_QUERY_RUNS | js-api/src/views/view.ts:392 |
DATABASES | readonly | "databases" | 'databases' | - | View.DATABASES | js-api/src/views/view.ts:385 |
DOCKERS | readonly | "dockers" | 'dockers' | - | View.DOCKERS | js-api/src/views/view.ts:403 |
EMAILS | readonly | "emails" | 'emails' | - | View.EMAILS | js-api/src/views/view.ts:393 |
FILES | readonly | "files" | 'files' | - | View.FILES | js-api/src/views/view.ts:391 |
FORUM | readonly | "forum" | 'forum' | - | View.FORUM | js-api/src/views/view.ts:380 |
FUNCTIONS | readonly | "functions" | 'functions' | - | View.FUNCTIONS | js-api/src/views/view.ts:388 |
GROUPS | readonly | "groups" | 'groups' | - | View.GROUPS | js-api/src/views/view.ts:394 |
HELP | readonly | "help" | 'help' | - | View.HELP | js-api/src/views/view.ts:383 |
isRoot | static | boolean | false | A root has no owner by design (a dialog): built with none, it is not reported as owner-missing. | View.isRoot | js-api/src/u2core/component.ts:81 |
JS_EDITOR | readonly | "js" | 'js' | - | View.JS_EDITOR | js-api/src/views/view.ts:401 |
MODELS | readonly | "models" | 'models' | - | View.MODELS | js-api/src/views/view.ts:395 |
NOTEBOOKS | readonly | "notebooks" | 'notebooks' | - | View.NOTEBOOKS | js-api/src/views/view.ts:382 |
OPEN_TEXT | readonly | "text" | 'text' | - | View.OPEN_TEXT | js-api/src/views/view.ts:384 |
PACKAGE_REPOSITORIES | readonly | "repositories" | 'repositories' | - | View.PACKAGE_REPOSITORIES | js-api/src/views/view.ts:400 |
PACKAGES | readonly | "Plugins" | 'Plugins' | - | View.PACKAGES | js-api/src/views/view.ts:399 |
PROJECTS | readonly | "projects" | 'projects' | - | View.PROJECTS | js-api/src/views/view.ts:381 |
QUERIES | readonly | "queries" | 'queries' | - | View.QUERIES | js-api/src/views/view.ts:396 |
SCRIPT | readonly | "script" | 'script' | - | View.SCRIPT | js-api/src/views/view.ts:378 |
SCRIPTS | readonly | "scripts" | 'scripts' | - | View.SCRIPTS | js-api/src/views/view.ts:397 |
SETTINGS | readonly | "settings" | 'settings' | - | View.SETTINGS | js-api/src/views/view.ts:376 |
SKETCH | readonly | "sketch" | 'sketch' | - | View.SKETCH | js-api/src/views/view.ts:379 |
USERS | readonly | "users" | 'users' | - | View.USERS | js-api/src/views/view.ts:398 |
VIEW_LAYOUTS | readonly | "layouts" | 'layouts' | - | View.VIEW_LAYOUTS | js-api/src/views/view.ts:387 |
WEB_SERVICES | readonly | "webservices" | 'webservices' | - | View.WEB_SERVICES | js-api/src/views/view.ts:386 |
WELCOME | readonly | "welcome" | 'welcome' | - | View.WELCOME | js-api/src/views/view.ts:377 |
Accessors
aiDescription
Get Signature
get aiDescription():
string|null
Defined in: js-api/src/views/view.ts:255
AI briefing of the underlying view (widget-level on the Dart side). For a JS-defined view the Dart host forwards to the original ViewBase instance.
Returns
string | null
Set Signature
set aiDescription(
x):void
Defined in: js-api/src/views/view.ts:260
A short AI-facing briefing, seeded from the registry's usage or description.
Parameters
| Parameter | Type |
|---|---|
x | string | null |
Returns
void
Inherited from
ambientAdoption
Get Signature
get
protectedambientAdoption():boolean
Defined in: js-api/src/widgets/base.ts:278
A widget wrapper minted inside somebody's effect scope must not be auto-disposed with it.
Returns
boolean
Inherited from
basePath
Get Signature
get basePath():
string
Defined in: js-api/src/views/view.ts:141
URL prefix of the view (an app's root, such as /apps/Chem); path is this prefix plus the
view's own relative path.
Returns
string
Set Signature
set basePath(
s):void
Defined in: js-api/src/views/view.ts:142
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Inherited from
box
Get Signature
get box():
boolean
Defined in: js-api/src/views/view.ts:75
Returns
boolean
Set Signature
set box(
b):void
Defined in: js-api/src/views/view.ts:76
Parameters
| Parameter | Type |
|---|---|
b | boolean |
Returns
void
Inherited from
children
Get Signature
get children():
Widget<any>[]
Defined in: js-api/src/widgets/base.ts:313
Parent widget up the DOM tree, or null.
Returns
Widget<any>[]
Inherited from
closing
Get Signature
get closing():
boolean
Defined in: js-api/src/views/view.ts:159
Whether the view is currently closing.
Returns
boolean
Set Signature
set closing(
c):void
Defined in: js-api/src/views/view.ts:160
Parameters
| Parameter | Type |
|---|---|
c | boolean |
Returns
void
Inherited from
dataFrame
Get Signature
get dataFrame():
DataFrame
Defined in: js-api/src/views/view.ts:446
Returns
Set Signature
set dataFrame(
x):void
Defined in: js-api/src/views/view.ts:447
Parameters
| Parameter | Type |
|---|---|
x | DataFrame |
Returns
void
description
Get Signature
get description():
string
Defined in: js-api/src/views/view.ts:328
View description. Used in UI and AI.
Returns
string
Set Signature
set description(
s):void
Defined in: js-api/src/views/view.ts:329
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Inherited from
dockManager
Get Signature
get dockManager():
DockManager
Defined in: js-api/src/views/view.ts:488
View's dock manager. Only defined for DockView descendants such as TableView, UsersView, etc.
Returns
dockNode
Get Signature
get dockNode():
DockNode
Defined in: js-api/src/views/view.ts:482
A dock node for this view.
Use grok.shell.dockManager to manipulate it; dockManager is for controlling
windows that reside inside this view.
Returns
entity
Get Signature
get entity():
object|null
Defined in: js-api/src/views/view.ts:136
Returns
object | null
Set Signature
set entity(
_e):void
Defined in: js-api/src/views/view.ts:137
Parameters
| Parameter | Type |
|---|---|
_e | object | null |
Returns
void
Inherited from
grid
Get Signature
get grid():
Grid
Defined in: js-api/src/views/view.ts:439
Associated grid (spreadsheet).
Returns
helpUrl
Get Signature
get helpUrl():
string|null
Defined in: js-api/src/views/view.ts:332
Returns
string | null
View help URL.
Set Signature
set helpUrl(
url):void
Defined in: js-api/src/views/view.ts:333
Parameters
| Parameter | Type |
|---|---|
url | string | null |
Returns
void
View help URL.
Inherited from
id
Get Signature
get id():
string
Defined in: js-api/src/views/view.ts:323
Returns
string
Inherited from
innerView
Set Signature
set innerView(
v):void
Defined in: js-api/src/views/view.ts:131
The view this one is currently surfacing, if it hosts another (such as a MultiView
tab). grok.shell.t resolves through it.
Parameters
| Parameter | Type |
|---|---|
v | ViewBase | null |
Returns
void
Inherited from
isPinned
Get Signature
get isPinned():
boolean
Defined in: js-api/src/views/view.ts:189
Whether the view is pinned. Pinned views are not closed when a new view is opened.
Returns
boolean
Set Signature
set isPinned(
value):void
Defined in: js-api/src/views/view.ts:190
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
void
Inherited from
jsView
Get Signature
get jsView():
ViewBase|null
Defined in: js-api/src/views/view.ts:269
The original JS ViewBase instance when this view hosts a JS-defined view
(e.g. a plugin app view), null for native Dart views. Lets callers reach the actual
view class (its methods, tools, state) from grok.shell.v.
Returns
ViewBase | null
Inherited from
name
Get Signature
get name():
string
Defined in: js-api/src/views/view.ts:357
View name. It gets shown in the tab handle.
Returns
string
Set Signature
set name(
s):void
Defined in: js-api/src/views/view.ts:362
A named control carries its name in the DOM: data-u2-name is the stable automation id
selectors, tutorials and agents address the control by — the same attribute the spec renderer
stamps on named nodes, so hand-built and spec-built UI share one selector vocabulary.
Derived names (an input's label fallback) never stamp — see Component.deriveName.
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Inherited from
parent
Get Signature
get parent():
Widget<any> |null
Defined in: js-api/src/widgets/base.ts:310
Parent widget up the DOM tree, or null.
Returns
Widget<any> | null
Inherited from
parentCall
Get Signature
get parentCall():
FuncCall|undefined
Defined in: js-api/src/views/view.ts:120
Returns
FuncCall | undefined
Set Signature
set parentCall(
s):void
Defined in: js-api/src/views/view.ts:121
Parameters
| Parameter | Type |
|---|---|
s | FuncCall | undefined |
Returns
void
Inherited from
parentView
Get Signature
get parentView():
ViewBase
Defined in: js-api/src/views/view.ts:126
The view this one was opened from. While it is open, the ribbon shows it before this view's name as a link that makes it current (a TableView only with TableView.showParentCrumb), and closing this view while it is current makes the parent current.
Returns
Set Signature
set parentView(
s):void
Defined in: js-api/src/views/view.ts:127
Parameters
| Parameter | Type |
|---|---|
s | ViewBase |
Returns
void
Inherited from
path
Get Signature
get path():
string
Defined in: js-api/src/views/view.ts:185
View URI, relative to the view root
Returns
string
Set Signature
set path(
s):void
Defined in: js-api/src/views/view.ts:186
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Inherited from
propertyTarget
Get Signature
get propertyTarget():
unknown
Defined in: js-api/src/u2core/component.ts:435
What this component's properties are read from and written to — prop.get(target) /
prop.set(target, v): the component itself, unless an adoption says otherwise.
Returns
unknown
Inherited from
propertyTier
Get Signature
get propertyTier():
boolean
Defined in: js-api/src/widgets/base.ts:282
Every property getProperties declares is a bind step, read and written on propertyTarget.
Returns
boolean
Inherited from
ribbonMenu
Get Signature
get ribbonMenu():
Menu
Defined in: js-api/src/views/view.ts:151
View menu. Sample: https://public.datagrok.ai/js/samples/ui/views/ribbon
Returns
Set Signature
set ribbonMenu(
menu):void
Defined in: js-api/src/views/view.ts:152
Parameters
| Parameter | Type |
|---|---|
menu | Menu |
Returns
void
Inherited from
root
Get Signature
get root():
HTMLElement
Defined in: js-api/src/views/view.ts:315
Returns the content (visual root) of this view.
Returns
HTMLElement
Inherited from
rootId
Get Signature
get rootId():
string
Defined in: js-api/src/u2core/component.ts:704
Stable element id, minted (u2-<n>) on first ask unless the root has one: the anchor of
for, aria-* and data-u2-owner-id references.
Returns
string
Inherited from
scope
Get Signature
get scope():
Scope
Defined in: js-api/src/u2core/component.ts:86
Minted on first use; assigned before _scopeMinted fires, so the hook's own
this.scope.own(...) reads the stored scope instead of re-entering the mint. Lazy: counted and tracked only
once it owns something, so a static control costs nothing.
Returns
Inherited from
showParentCrumb
Get Signature
get showParentCrumb():
boolean
Defined in: js-api/src/views/view.ts:658
Whether the ribbon shows parentView as a crumb before the table's name: "Parent › Table", the parent a link as in ui.breadcrumbs, the table's name as the ribbon shows it, and a click on the parent makes it current. Off by default, since a table opened from a view's tree inherits that view as its parent. Takes effect at once, also on the current view.
Example
const home = grok.shell.newView('Home');
const tv = grok.shell.addTableView(grok.data.demo.demog());
tv.parentView = home;
tv.showParentCrumb = true;
See
https://public.datagrok.ai/js/samples/ui/views/table-view-parent-crumb
Returns
boolean
Set Signature
set showParentCrumb(
x):void
Defined in: js-api/src/views/view.ts:659
Parameters
| Parameter | Type |
|---|---|
x | boolean |
Returns
void
showSaveButton
Get Signature
get showSaveButton():
boolean
Defined in: js-api/src/views/view.ts:665
Whether the ribbon shows the Save button, which saves the table's project (on by default). An app that
saves the data its own way turns it off; the rest of the ribbon, getRibbonPanels() /
setRibbonPanels() round-trips included, stays as it is.
See
https://public.datagrok.ai/js/samples/ui/views/table-view-no-save
Returns
boolean
Set Signature
set showSaveButton(
x):void
Defined in: js-api/src/views/view.ts:666
Parameters
| Parameter | Type |
|---|---|
x | boolean |
Returns
void
statusBarPanels
Get Signature
get statusBarPanels():
HTMLDivElement[]
Defined in: js-api/src/views/view.ts:155
Status bar panels to be shown on the bottom
Returns
HTMLDivElement[]
Set Signature
set statusBarPanels(
panels):void
Defined in: js-api/src/views/view.ts:156
Parameters
| Parameter | Type |
|---|---|
panels | HTMLDivElement[] |
Returns
void
Inherited from
syncCurrentObject
Get Signature
get syncCurrentObject():
boolean
Defined in: js-api/src/views/view.ts:645
Returns
boolean
Set Signature
set syncCurrentObject(
x):void
Defined in: js-api/src/views/view.ts:646
Parameters
| Parameter | Type |
|---|---|
x | boolean |
Returns
void
table
Get Signature
get table():
DataFrame|null
Defined in: js-api/src/views/view.ts:430
Associated table, if it exists (for TableView), or null.
Returns
DataFrame | null
Set Signature
set table(
df):void
Defined in: js-api/src/views/view.ts:434
Parameters
| Parameter | Type |
|---|---|
df | DataFrame | null |
Returns
void
toolbox
Get Signature
get toolbox():
HTMLElement
Defined in: js-api/src/views/view.ts:146
View toolbox. Sample: https://public.datagrok.ai/js/samples/ui/views/toolbox
Returns
HTMLElement
Set Signature
set toolbox(
x):void
Defined in: js-api/src/views/view.ts:147
Parameters
| Parameter | Type |
|---|---|
x | HTMLElement |
Returns
void
Inherited from
toolboxPage
Get Signature
get toolboxPage():
ToolboxPage
Defined in: js-api/src/views/view.ts:450
View toolbox that gets shown on the left, in the sidebar
Returns
type
Get Signature
get type():
string
Defined in: js-api/src/views/view.ts:319
View type
Returns
string
Inherited from
viewers
Get Signature
get viewers():
Viewer<any>[]
Defined in: js-api/src/views/view.ts:641
Returns all viewers. Resulting array is cloned, so cache the result and do not call repeatedly in inner loops.
Returns
Viewer<any>[]
visible
Get Signature
get visible():
boolean
Defined in: js-api/src/u2core/component.ts:694
Hidden ⇔ the root carries the hidden attribute.
Returns
boolean
Set Signature
set visible(
x):void
Defined in: js-api/src/u2core/component.ts:698
Parameters
| Parameter | Type |
|---|---|
x | boolean |
Returns
void
Inherited from
Methods
_notifyPropertyChange()
protected_notifyPropertyChange(p):void
Defined in: js-api/src/widgets/base.ts:360
Notifies the property tier. Called from both the addProperty setter (overrides that skip
super would otherwise lose props.x = writes) and onPropertyChanged (direct calls);
the double notify collapses into one microtask refresh.
Parameters
| Parameter | Type |
|---|---|
p | Property | null |
Returns
void
Inherited from
_onAdded()
_onAdded():
void
Defined in: js-api/src/views/view.ts:370
Returns
void
Inherited from
_ownPropertyChanges()
protected_ownPropertyChanges():ObservableLike<PropertyChange>
Defined in: js-api/src/widgets/base.ts:365
Returns
ObservableLike<PropertyChange>
Inherited from
_scopeMinted()
protected_scopeMinted(_scope):void
Defined in: js-api/src/widgets/base.ts:329
First-mint hook: a platform descendant wires its lifecycle here. Never fired for a scope provided to init — that path runs inside the constructor chain.
Parameters
| Parameter | Type |
|---|---|
_scope | Scope |
Returns
void
Inherited from
_wireDartLifecycle()
protected_wireDartLifecycle():void
Defined in: js-api/src/widgets/base.ts:345
Dart-owned lifecycle: the platform kill disposes the scope, and disposing the scope kills the widget through the kill-walk.
Returns
void
Inherited from
_wireJsLifecycle()
protected_wireJsLifecycle():void
Defined in: js-api/src/widgets/base.ts:336
JS-owned lifecycle: disposing the scope detaches the widget, and vice versa.
Returns
void
Inherited from
_wireLifecycle()
protected_wireLifecycle():void
Defined in: js-api/src/widgets/base.ts:331
Returns
void
Inherited from
acceptsPath()
acceptsPath(
_urlPath):boolean
Defined in: js-api/src/views/view.ts:210
Checks if URL path is acceptable. Override in subclasses. [_urlPath] is the path WITHOUT the query string: a view claims a URL by its path, and decides what the parameters mean in handlePath.
Parameters
| Parameter | Type |
|---|---|
_urlPath | string |
Returns
boolean
"true" if path is acceptable, "false" otherwise.
Inherited from
accessibleLabel()
protectedaccessibleLabel():string|undefined
Defined in: js-api/src/u2core/component.ts:762
The accessible name: aria-label, then the aria-labelledby texts, then this control's own
data-u2-part="label" element, then — for a root that is a button — its own text.
Returns
string | undefined
Inherited from
addProperty()
addProperty(
propertyName,propertyType,defaultValue?,options?):any
Defined in: js-api/src/widgets/base.ts:388
Registers an property with the specified type, name, and defaultValue.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
propertyName | string | undefined | - |
propertyType | "string" | "bigint" | "object" | "map" | "file" | "bool" | "int" | "double" | "byte_array" | "datetime" | "qnum" | "dataframe" | "num" | "string_list" | "dataframe_list" | "cell" | "column" | "column_list" | "graphics" | "blob" | "tablerowfiltercall" | "colfiltercall" | "bitset" | "dynamic" | "viewer" | "list" | "semantic_value" | "func" | "funccall" | "property" | "categorical" | "numerical" | "GridCellRenderArgs" | "element" | "view" | "TableView" | "User" | "Menu" | "Project" | "event_data" | "progressindicator" | "Credentials" | "ScriptEnvironment" | "Notebook" | undefined | - |
defaultValue | any | null | - |
options | object & IProperty | null | null | - |
Returns
any
See
Registered property gets added to properties. Returns default value, thus allowing to combine registering a property with the initialization
options.get/options.set override how the property reads/writes (instead of the default
fieldName field access); the change notification (onPropertyChanged) always fires
on write, and a {get}-only options yields a custom read with the default fieldName write.
Inherited from
addStatusProvider()
addStatusProvider(
name,provider):void
Defined in: js-api/src/widgets/base.ts:468
Adds live parts, hit areas and readings to this widget's status. Providers run in registration
order on every read; an existing name is replaced in place, and later providers override earlier
entries. Coordinates use the widget's own hit-area system. Detaching the widget removes all
providers. A subclass that overrides getWidgetStatus composes with super.getWidgetStatus().
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Stable name of the component contributing the status. |
provider | StatusProvider | Computes the contribution each time the status is requested. |
Returns
void
Example
widget.addStatusProvider('selection', () => ({values: {'selected rows': table.selection.trueCount}}));
console.log(widget.getWidgetStatus().values?.['selected rows']);
widget.removeStatusProvider('selection');
see samples/grid/custom-renderer-status
Inherited from
addViewer()
Call Signature
addViewer<
T>(v,options?):ViewerClass<T>
Defined in: js-api/src/views/view.ts:456
Adds a viewer of the specified type; a known VIEWER type returns that viewer's class
(see Viewer.fromType). The histogram(), scatterPlot(), ... shorthands are the typed forms.
Type Parameters
| Type Parameter |
|---|
T extends ViewerType |
Parameters
| Parameter | Type |
|---|---|
v | T |
options? | any |
Returns
ViewerClass<T>
Call Signature
addViewer(
v,options?):Viewer
Defined in: js-api/src/views/view.ts:457
Adds a viewer of the specified type; a known VIEWER type returns that viewer's class
(see Viewer.fromType). The histogram(), scatterPlot(), ... shorthands are the typed forms.
Parameters
| Parameter | Type |
|---|---|
v | Viewer |
options? | any |
Returns
afterPersist()
protectedafterPersist():void
Defined in: js-api/src/views/view.ts:101
Gets called automatically when this view gets pinned
Returns
void
Inherited from
append()
append(
item):HTMLElement
Defined in: js-api/src/views/view.ts:214
Appends an item to this view. Use appendAll for appending multiple elements.
Parameters
| Parameter | Type |
|---|---|
item | any |
Returns
HTMLElement
Inherited from
appendAll()
appendAll(
items):HTMLElement
Defined in: js-api/src/views/view.ts:220
Appends multiple elements this view. Use append for appending a single element.
Parameters
| Parameter | Type |
|---|---|
items | HTMLElement[] |
Returns
HTMLElement
Inherited from
apply()
apply(
properties):Widget
Defined in: js-api/src/widgets/base.ts:267
Sets each key of properties as the property of that name; returns this widget.
Parameters
| Parameter | Type |
|---|---|
properties | object |
Returns
Inherited from
barChart()
barChart(
options?):BarChartViewer
Defined in: js-api/src/views/view.ts:500
Adds a bar chart. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/bar-chart
Parameters
| Parameter | Type |
|---|---|
options? | Partial<IBarChartSettings> |
Returns
bindProps()
bindProps():
BindProp[]
Defined in: js-api/src/u2core/component.ts:492
The signal-backed subset of the meta props — what a binding picker offers on a named node — plus, under propertyTier, every declared property. Allocates no signal.
Returns
BindProp[]
Inherited from
bindStep()
bindStep(
name):Signal<unknown> |BindSource|null
Defined in: js-api/src/u2core/component.ts:481
One binding step (DD5): a meta-declared prop's same-named Signal member — a named node is a
bind source, generated off componentMeta the way getProperties is — then, under
propertyTier, a cached signal over the declared property. '' answers the default
binding: the component's own value signal, where one exists.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
Signal<unknown> | BindSource | null
Inherited from
boxPlot()
boxPlot(
options?):BoxPlot
Defined in: js-api/src/views/view.ts:506
Adds a box plot. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/box-plot
Parameters
| Parameter | Type |
|---|---|
options? | Partial<IBoxPlotSettings> |
Returns
calendar()
calendar(
options?):CalendarViewer
Defined in: js-api/src/views/view.ts:512
Adds a calendar. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/calendar
Parameters
| Parameter | Type |
|---|---|
options? | Partial<ICalendarSettings> |
Returns
close()
close():
void
Defined in: js-api/src/views/view.ts:230
Closes this view.
Returns
void
Inherited from
closeAllViewers()
closeAllViewers():
void
Defined in: js-api/src/views/view.ts:474
Closes all viewers in this view, including minimized ones.
Returns
void
corrPlot()
corrPlot(
options?):CorrelationPlot
Defined in: js-api/src/views/view.ts:518
Adds a correlation plot. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/corr-plot
Parameters
| Parameter | Type |
|---|---|
options? | Partial<ICorrelationPlotSettings> |
Returns
densityPlot()
densityPlot(
options?):DensityPlotViewer
Defined in: js-api/src/views/view.ts:524
Adds a density plot. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/density-plot
Parameters
| Parameter | Type |
|---|---|
options? | Partial<IDensityPlotSettings> |
Returns
deriveName()
protectedderiveName(x):void
Defined in: js-api/src/u2core/component.ts:109
Sets the introspection/form key without claiming an automation id — the label-fallback path:
a caption is not a stable identity, so it never reaches data-u2-name.
Parameters
| Parameter | Type |
|---|---|
x | string | undefined |
Returns
void
Inherited from
detach()
detach():
void
Defined in: js-api/src/views/view.ts:630
Detaches and closes the view.
Returns
void
Overrides
detachViewers()
detachViewers():
void
Defined in: js-api/src/views/view.ts:635
Detaches all viewers.
Returns
void
dispose()
dispose():
void
Defined in: js-api/src/u2core/component.ts:687
Disposes the control; disposed by hand, it also leaves the page — a dead control left on show looks alive. One its owner disposes leaves the DOM to whoever holds it: a region swapping its content, a spec re-rendering.
Returns
void
Inherited from
effect()
effect(
fn):this
Defined in: js-api/src/u2core/component.ts:260
Runs fn now and on every change of the signals it reads, until this component is disposed.
Called while a row of each() or an effect run is being built, it belongs on a control built
there (input.effect(...)) — on a longer-lived one it piles up with every rebuild, and u2 warns.
Parameters
| Parameter | Type |
|---|---|
fn | () => void |
Returns
this
Inherited from
filters()
filters(
options?):FilterGroup
Defined in: js-api/src/views/view.ts:530
Adds filters. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/filters
Parameters
| Parameter | Type |
|---|---|
options? | Partial<IFiltersSettings> |
Returns
fireEvent()
protectedfireEvent(eventId,args?):void
Defined in: js-api/src/u2core/component.ts:636
Every matching listener runs inside one batch; a throwing one is reported to this component's scope and does not stop the rest.
Parameters
| Parameter | Type |
|---|---|
eventId | string |
args? | unknown |
Returns
void
Inherited from
focus()
focus():
void
Defined in: js-api/src/views/view.ts:477
Moves keyboard focus to the grid of this view.
Returns
void
form()
form(
options?):FormViewer
Defined in: js-api/src/views/view.ts:536
Adds default form. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/form
Parameters
| Parameter | Type |
|---|---|
options? | Partial<IFormSettings> |
Returns
getDartProperties()
getDartProperties():
any[]
Defined in: js-api/src/widgets/base.ts:296
Dart handles of the properties that have one.
Returns
any[]
Inherited from
getFiltersGroup()
getFiltersGroup(
options?):FilterGroup
Defined in: js-api/src/views/view.ts:442
Returns existing, or creates a new filter group.
Parameters
| Parameter | Type |
|---|---|
options? | { createDefaultFilters?: boolean; } |
options.createDefaultFilters? | boolean |
Returns
getFunctions()
getFunctions():
Func[]
Defined in: js-api/src/views/view.ts:312
Functions that are applicable to this particular widget. Used in the UI to display context actions, and for the AI integrations.
Returns
Func[]
Inherited from
getIcon()
getIcon():
HTMLElement|null
Defined in: js-api/src/views/view.ts:174
Returns
HTMLElement | null
View icon. Override in subclasses.
Inherited from
getInfo()
getInfo():
ViewLayout
Defined in: js-api/src/views/view.ts:352
Saves view as a ViewInfo. Only applicable to certain views, such as TableView.
Returns
Inherited from
getItems()
getItems(
_opts?):IItemsState|undefined
Defined in: js-api/src/u2core/component.ts:737
Items of a collection-like control; undefined for other kinds. list holds the first
ITEMS_CAP unless all.
Parameters
| Parameter | Type |
|---|---|
_opts? | { all?: boolean; } |
_opts.all? | boolean |
Returns
IItemsState | undefined
Inherited from
getProperties()
getProperties():
Property[]
Defined in: js-api/src/views/view.ts:311
Returns all properties of this widget: the meta-generated ones plus addProperty's.
Returns
Property[]
Inherited from
getRibbonPanels()
getRibbonPanels():
HTMLElement[][]
Defined in: js-api/src/views/view.ts:169
Returns
HTMLElement[][]
Inherited from
getState()
getState():
IControlState
Defined in: js-api/src/u2core/component.ts:713
The state block generic tests read (DG.U2.state). This base reads the DOM — kind, name,
accessible name, aria-disabled, hidden, focus, aria-busy — plus getItems; a
subclass adds what the DOM cannot say and spreads super.getState(). Synchronous, side-effect
free, never cached.
Returns
Inherited from
getViewerColumns()
getViewerColumns():
Column<any,any>[]
Defined in: js-api/src/views/view.ts:471
Returns columns that are explicitly used as data columns in non-grid viewers (falls back to grid columns when no custom viewers are present).
Returns
Column<any, any>[]
getWidgetStatus()
getWidgetStatus():
IWidgetStatus
Defined in: js-api/src/widgets/base.ts:432
Returns the widget's runtime structure for automated testing and introspection; state is read off
the DOM (kind, label, enabled, visible, focused …), then merged with what providers contribute.
Returns
Inherited from
handlePath()
handlePath(
_urlPath):void
Defined in: js-api/src/views/view.ts:204
Handles URL path. Override in subclasses.
[_urlPath] is the path WITHOUT the query string (see acceptsPath);
the router has already updated the address bar, so read the parameters from
window.location.search.
A handler may route elsewhere — set grok.shell.v to another view and the
router leaves it alone (it only falls back to this view when the handler
changed nothing).
Parameters
| Parameter | Type |
|---|---|
_urlPath | string |
Returns
void
Inherited from
heatMap()
heatMap(
options?):Grid
Defined in: js-api/src/views/view.ts:542
Adds a heat map. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/heat-map
Parameters
| Parameter | Type |
|---|---|
options? | Partial<IGridSettings> |
Returns
histogram()
histogram(
options?):HistogramViewer
Defined in: js-api/src/views/view.ts:494
Adds a histogram. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/histogram
Parameters
| Parameter | Type |
|---|---|
options? | Partial<IHistogramSettings> |
Returns
lineChart()
lineChart(
options?):LineChartViewer
Defined in: js-api/src/views/view.ts:548
Adds a line chart. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/line-chart
Parameters
| Parameter | Type |
|---|---|
options? | Partial<ILineChartSettings> |
Returns
link()
link(
name,source,twoWay):void
Defined in: js-api/src/u2core/component.ts:453
Keeps this component's name step and source equal, echo-suppressed by value; the reverse
direction only where twoWay. A component that took source as its own signal needs no link
and gets none; a read-only step cannot follow anything and gets none either.
Parameters
| Parameter | Type |
|---|---|
name | string |
source | Signal<unknown> |
twoWay | boolean |
Returns
void
Inherited from
loadLayout()
loadLayout(
layout,pickupColumnTags?):void
Defined in: js-api/src/views/view.ts:339
Loads previously saved view layout. Only applicable to certain views, such as TableView. See also saveLayout
Parameters
| Parameter | Type |
|---|---|
layout | ViewLayout |
pickupColumnTags? | boolean |
Returns
void
Inherited from
loadState()
loadState(
x,options?):void
Defined in: js-api/src/views/view.ts:672
Parameters
| Parameter | Type |
|---|---|
x | string |
options? | IViewStateApplicationOptions |
Returns
void
loadStateMap()
loadStateMap(
_stateMap):void
Defined in: js-api/src/views/view.ts:182
Loads view state map. Override in subclasses.
Parameters
| Parameter | Type |
|---|---|
_stateMap | object |
Returns
void
Inherited from
markup()
markup(
options?):Viewer
Defined in: js-api/src/views/view.ts:560
Adds a markup viewer. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/markup
Parameters
| Parameter | Type |
|---|---|
options? | Partial<IMarkupViewerSettings> |
Returns
matrixPlot()
matrixPlot(
options?):MatrixPlot
Defined in: js-api/src/views/view.ts:566
Adds a matrix plot. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/matrix-plot
Parameters
| Parameter | Type |
|---|---|
options? | Partial<IMatrixPlotSettings> |
Returns
networkDiagram()
networkDiagram(
options?):NetworkDiagramViewer
Defined in: js-api/src/views/view.ts:572
Adds a network diagram. Sample: https://public.datagrok.ai/js/samples/ui/viewers/types/network-diagram
Parameters
| Parameter | Type |
|---|---|
options? | Partial<INetworkDiagramSettings> |
Returns
on()
on(
eventId,handler): () =>void
Defined in: js-api/src/u2core/component.ts:623
Subscribes handler to onEvent(eventId); it gets the payload and this component.
Owned by the ambient scope when there is one (the subscriber's), else by this component; runs
as Scope.bind runs a handler. Answers the unsubscribe.
Parameters
| Parameter | Type |
|---|---|
eventId | string |
handler | (arg, source) => void |
Returns
() => void
Inherited from
onEvent()
onEvent(
eventId?):Observable<any>
Defined in: js-api/src/widgets/base.ts:423
Observes events with the specified eventId: what fireEvent raises and, for an id, the DOM
events of that name on the root — as on every u2 Control.
Parameters
| Parameter | Type | Default value |
|---|---|---|
eventId | string | null | null |
Returns
Observable<any>
Inherited from
onFrameAttached()
onFrameAttached(
dataFrame):void
Defined in: js-api/src/widgets/base.ts:304
Called when a DataFrame is attached; override to bind data.
Parameters
| Parameter | Type |
|---|---|
dataFrame | DataFrame |
Returns
void
Inherited from
onPropertyChanged()
onPropertyChanged(
property):void
Defined in: js-api/src/widgets/base.ts:293
Gets called when viewer's property is changed.
Parameters
| Parameter | Type | Description |
|---|---|---|
property | Property | null | or null, if multiple properties were changed. |
Returns
void
Inherited from
own()
own(
dispose):this
Defined in: js-api/src/u2core/component.ts:267
Registers a cleanup that runs when this component is disposed.
Parameters
| Parameter | Type |
|---|---|
dispose | () => void |
Returns
this