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
addChart
method to the chart wrapper container.Parameters:
Name Type Description container
HTMLElement Chart wrapper container.
config
object Chart configuration ojbject.
chartTemplate
string Chart template to create new charts.
- Since:
-
8.6.0
-
cleanGridStyles(container)
-
Creates and attaches the
cleanGridStyles
method to the chart wrapper container to enable resetting the grid styles.Parameters:
Name Type Description container
HTMLElement 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 container
HTMLElement 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 fromEl
HTMLElement Source element.
toEl
HTMLElement 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 params
object parms.container
string | HTMLElement DOM node or query path identifyig the
cq-context
host element.params.chartConfig
object Object containing parameters for chart creation in a multi-chart environment.
Properties
Name Type Argument Description charts
Array.<object> Array of objects containing the default symbol and
chartId
property. chartId is optionalcolCount
number <optional>
Maximum number of charts in a grid row. Adding a new chart past this value creates a new row.
config
object 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 container
HTMLElement 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 stx
CIQ.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 container
HTMLElement 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 container
HTMLElement Chart context container.
config
object Chart configuration object.
stx
CIQ.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 container
HTMLElement Multi-chart context container.
config
object Chart configuration object.
chartTemplate
string Chart markup template to create new charts.
- Since:
-
8.6.0
-
moveChart(container, config)
-
Creates and attaches the
moveChart
method to the chart wrapper container.Parameters:
Name Type Description container
HTMLElement Chart wrapper container.
config
object Chart configuration ojbject.
- Since:
-
8.8.0
-
removeChart(container, config)
-
Creates and attaches the
removeChart
method to the chart wrapper container that enables removal of the active chart.Parameters:
Name Type Description container
HTMLElement Chart wrapper container.
config
object Chart configuration object.
- Since:
-
8.6.0
-
setColCount(container)
-
Creates and attaches the
setColCount
method to the chart wrapper container to enable changing the columnn count.Parameters:
Name Type Description container
HTMLElement Chart wrapper container.
- Since:
-
8.6.0
-
setGridTemplate(container)
-
Creates and attaches the
setGridTemplate
method to the chart wrapper container to enable changing the CSS grid template.Parameters:
Name Type Description container
HTMLElement Chart wrapper container.
- Since:
-
8.8.0
-
setGridUI(container, colCount, rowCount, gridTemplate)
-
Updates the grid selector column count.
Parameters:
Name Type Description container
HTMLElement Chart wrapper container.
colCount
number | string Column count.
rowCount
number | string Row count.
gridTemplate
string Template class name.
- Since:
-
8.6.0
-
setRowCount(container)
-
Creates and attaches the
setRowCount
method to the chart wrapper container to enable changing the row count.Parameters:
Name Type Description container
HTMLElement 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 container
HTMLElement Chart wrapper container.
config
object Chart configuration object.
- Since:
-
8.6.0
-
toggleSolo(container, config)
-
Creates and attaches the
toggleSolo
method 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 container
HTMLElement Chart wrapper container.
config
object Chart configuration object.
- Since:
-
8.6.0
-
transitionFromSolo(container)
-
Transtion out of solo mode.
Parameters:
Name Type Description container
HTMLElement Multi-chart container.
- Since:
-
8.8.4
-
transitionToSolo(container, freezeEngineRenderingFunc)
-
Transtion to solo mode.
Parameters:
Name Type Description container
HTMLElement Multi-chart container.
freezeEngineRenderingFunc
function freezeEngineRendering
function to freeze chart rendering.- Since:
-
8.8.4
-
updateGridListner(container)
-
Creates a listener for changes in the maximum columnn count.
Parameters:
Name Type Description container
HTMLElement Chart wrapper container.
- Since:
-
8.6.0
-
updateLayout(container, config)
-
Creates and attaches the
updateLayout
method to the chart wrapper container that stores the current multi-chart layout inNameValueStore
.Parameters:
Name Type Description container
HTMLElement Chart wrapper container
config
object 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 container
HTMLElement Chart wrapper container.
- Since:
-
8.6.0