The ChartFactor Object (CF)¶
This is the main object of the Toolkit. It represents the entry point and it will be available from the core library as soon as it is loaded.
From this object we obtain all other objects used to build our queries or visuals. These objects have their own section.
Let's take a look at some of the main methods of this object:
Loads a set of providers according to the configuration passed as parameter. It takes an array of objects
1 2 3 4 5 6 7 8 9
setProviders but it register only one provider at a time. It is specially usefull when a provider needs to be updated, in which case, it should be unregistered first, and recreated again.
1 2 3 4 5
Allows to remove an existing provider.
Returns a provider object that matches the object passed as parameter.
It creates and return a new Aktive instance with the provider passed as parameter set. Is the starting point when creating a new visualization or query.
It also creates and return a new Aktive instance. This method is used when we're creating a visualization without a provider that is going to be used only to load injected data or to create a non-query visualizations such as Text Search or the Interaction Manager
It takes as optional parameter a string that is useful when performing Multiple Queries
It returns an array of Aktive objects representing all visualizations / queries registered under the instance.
Returns the Aktive instance representing the visualization using the elementId passed as parameter.
Returns a promise that will be resolved when the entire application, which translate into all visualizations and/or queries registered under the cf object, has been loaded, which means that they already received the response from the server.
It takes two optional parameters: The first one is the amount of time in seconds that it'll wait before warning the user that the application is taking more than expected to load by default is 7 seconds. The second parameter is the total amount of time in seconds that the application will wait before stopping the time checking. Default to 13.
1 2 3
Returns the full list of visualization types that are supported depending on the visualization libraries that are loaded. It is useful to verify if they are loaded correctly before using them.
The ChartFactor tooltip utility object. Please refer to the Tooltip object.
Delete all registered visualizations.
ChartFactor depends on some third-party libraries that can be reused so we don't have to load them from a CDN if we don't need to. We just need to pass the name and assign the object to a variables:
1 2 3
Here's the list of dependencies that are available from this method: