CDF provides a list of methods/functions that you can and should use when building the dashboards. Next, you will find some of the most used functions.
init(components)
: This function is used to start the execution of the dashboard. You have seen this function in our examples. It receives an argument and an array of the components to execute. This function can be called without any argument, but in this context we need to add the components to the dashboard using theaddComponents
function.addComponents(components)
: This function accepts an array with the components to add to the dashboard.addComponent(component)
: This is the same as the previous function, but will just add one component.removeComponent(component)
: This will remove a component from the list of the components of the dashboard.getComponentByName(component)
: This returns the component with the name specified as an argument.