Charts

Adds interactive charting to a Grid. Charts can be created from a selection of Grid data and updated in realtime as data changes. Supports many common chart types with extensive styling and customization options.

Charts
//<code-header>
fiddle.title = 'Charts';
//</code-header>
targetElement.innerHTML = '<p>Right-click and select <b>New Chart</b> to create a chart from current selection</p>';

// grid with basic configuration
const grid = new Grid({
    // makes grid as high as it needs to be to fit rows
    autoHeight : true,
    appendTo   : targetElement,
    features   : {
        charts : true
    },
    selectionMode : {
        cell       : true,
        dragSelect : true
    },
    data    : DataGenerator.generateData(10),
    columns : [
        { field : 'name', text : 'Name', flex : 1 },
        { field : 'age', text : 'Age', flex : 1 },
        { field : 'score', text : 'Score', flex : 1 },
        { field : 'rank', text : 'Rank', width : 180 }
    ]
});

grid.selectCellRange({ id : 1, column : grid.columns.first }, { id : 10, column : grid.columns.last });

A context menu item New Chart is added that opens a popup containing a ChartDesigner using the data in the grid's current selection.

For an explanation of the various options available in the editor popup, see Chart.

This feature is disabled by default.

const grid = new Grid({
    features : {
        charts : true
    }
});

Configs

12

Common

disabledInstancePlugin
listenersEvents

Other

(Optional) Configuration options to provide to the ChartDesigner

minimal: Boolean= falseAlso a property

Whether to display in minimal mode, where popup title is hidden, chart preview occupies full area, and settings panel is minimized. Setting this to true also sets minimal : true on the child ChartDesigner.

(Optional) Configuration options to provide to the Popup.

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Properties

16

Common

disabledInstancePlugin

Class hierarchy

isCharts: Boolean= truereadonly
Identifies an object as an instance of Charts class, or subclass thereof.
isCharts: Boolean= truereadonlystatic
Identifies an object as an instance of Charts class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Other

minimal: Boolean= falseAlso a config

Whether to display in minimal mode, where popup title is hidden, chart preview occupies full area, and settings panel is minimized. Setting this to true also sets minimal : true on the child ChartDesigner.

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Functions

29

Other

Open the chart designer popup with the current Grid selection as data source.

LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Events

5
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

5
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

1