new Multichart()
The Multichart class contains a collection of methods used to instantiate and configure a multi-chart container and charts post execution of Chart.createChartAndUI.
- Since:
-
8.6.0
Methods
-
addChart(container, config, chartTemplate)
-
Creates and attaches the
addChartmethod to the chart wrapper container.Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
configobject Chart configuration ojbject.
chartTemplatestring Chart template to create new charts.
- Since:
-
8.6.0
-
cleanGridStyles(container)
-
Creates and attaches the
cleanGridStylesmethod to the chart wrapper container to enable resetting the grid styles.Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
- Since:
-
8.8.0
-
contextSwitcher(container)
-
Creates and attaches a context switcher method context to the container that allows a change to the multi-chart active context.
Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
- Since:
-
8.6.0
-
copyAttributes(fromEl, toEl)
-
Copies attributes ending with "-feature" from the source to the target element.
Parameters:
Name Type Description fromElHTMLElement Source element.
toElHTMLElement Target element.
- Since:
-
8.6.0
-
createCharts(params, config)
-
Creates a chart grid with a shared footer and header. Use with the sample-template-multichart.html template.
Parameters:
Name Type Description paramsobject parms.containerstring | HTMLElement DOM node or query path identifyig the
cq-contexthost element.params.chartConfigobject Object containing parameters for chart creation in a multi-chart environment.
Properties
Name Type Argument Description chartsArray.<object> Array of objects containing the default symbol and
chartIdproperty. chartId is optionalcolCountnumber <optional>
Maximum number of charts in a grid row. Adding a new chart past this value creates a new row.
configobject Chart configuration.
- Since:
-
8.6.0
Returns:
CIQ.ChartEngine[] Chart engine array.
-
fillLayoutWithCharts(container)
-
Adds or removes charts in order to fill every cell in the current CSS grid layout.
Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
- Since:
-
8.8.0
-
freezeEngineRendering(stx)
-
Freezes chart drawing and resizing functions by setting them to no-op and returns function to restore them.
Parameters:
Name Type Description stxCIQ.ChartEngine A reference to the chart engine.
- Since:
-
8.8.4
Returns:
A function that can be called to unfreeze the engine.
- Type
- function
-
getCommonUI(container)
-
Gets an array of shared UI elements that are context-switch aware.
Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
- Since:
-
8.6.0
Returns:
An array of components in the common UI that control each of the multi-charts
- Type
- Array.<HTMLElement>
-
initChart(container, config, stx)
-
Initializes a chart for a multi-chart environment.
Parameters:
Name Type Description containerHTMLElement Chart context container.
configobject Chart configuration object.
stxCIQ.ChartEngine A reference to the chart engine.
- Since:
-
8.6.0
-
initContainer(container, config, chartTemplate)
-
Initializes a multi-chart context container.
Attaches methods to the container to be invoked by individual charts and the UI.
Parameters:
Name Type Description containerHTMLElement Multi-chart context container.
configobject Chart configuration object.
chartTemplatestring Chart markup template to create new charts.
- Since:
-
8.6.0
-
moveChart(container, config)
-
Creates and attaches the
moveChartmethod to the chart wrapper container.Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
configobject Chart configuration ojbject.
- Since:
-
8.8.0
-
removeChart(container, config)
-
Creates and attaches the
removeChartmethod to the chart wrapper container that enables removal of the active chart.Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
configobject Chart configuration object.
- Since:
-
8.6.0
-
setColCount(container)
-
Creates and attaches the
setColCountmethod to the chart wrapper container to enable changing the columnn count.Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
- Since:
-
8.6.0
-
setGridTemplate(container)
-
Creates and attaches the
setGridTemplatemethod to the chart wrapper container to enable changing the CSS grid template.Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
- Since:
-
8.8.0
-
setGridUI(container, colCount, rowCount, gridTemplate)
-
Updates the grid selector column count.
Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
colCountnumber | string Column count.
rowCountnumber | string Row count.
gridTemplatestring Template class name.
- Since:
-
8.6.0
-
setRowCount(container)
-
Creates and attaches the
setRowCountmethod to the chart wrapper container to enable changing the row count.Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
- Since:
-
8.8.0
-
solo(container, config)
-
Creates and attaches a solo method to the chart wrapper container that expands the active chart content as the only visible chart in a multi-chart container.
Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
configobject Chart configuration object.
- Since:
-
8.6.0
-
toggleSolo(container, config)
-
Creates and attaches the
toggleSolomethod to the chart wrapper container that toggles expansion of the clicked chart content as the only visible chart in a multi-chart container.Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
configobject Chart configuration object.
- Since:
-
8.6.0
-
transitionFromSolo(container)
-
Transtion out of solo mode.
Parameters:
Name Type Description containerHTMLElement Multi-chart container.
- Since:
-
8.8.4
-
transitionToSolo(container, freezeEngineRenderingFunc)
-
Transtion to solo mode.
Parameters:
Name Type Description containerHTMLElement Multi-chart container.
freezeEngineRenderingFuncfunction freezeEngineRenderingfunction to freeze chart rendering.- Since:
-
8.8.4
-
updateGridListner(container)
-
Creates a listener for changes in the maximum columnn count.
Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
- Since:
-
8.6.0
-
updateLayout(container, config)
-
Creates and attaches the
updateLayoutmethod to the chart wrapper container that stores the current multi-chart layout inNameValueStore.Parameters:
Name Type Description containerHTMLElement Chart wrapper container
configobject Chart configuration ojbject
- Since:
-
8.6.0
-
utils(container)
-
Creates and attaches utility methods to a container; for example, to get an array of chart engines in a multi-chart.
Parameters:
Name Type Description containerHTMLElement Chart wrapper container.
- Since:
-
8.6.0
