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.
//<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
Configs
12Other
(Optional) Configuration options to provide to the ChartDesigner
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
Properties
16
Properties
16Common
Class hierarchy
Other
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.
Functions
29
Functions
29Other
Open the chart designer popup with the current Grid selection as data source.