Heat.js - Documentation - Public Functions
Below is a list of all the public API functions that can be called from a Heat.js service.
Download Now
Below is a list of all the public API functions that can be called from a Heat.js service.
Download Now
Adds an array of dates for a specific element ID, and refreshes the UI (if specified). If the dates already exist, their values are increased by one.
Fires: onAdd
Parameter: elementId: string - The Heat.js element ID that should show the new date.
Parameter: dates: Date[] - The dates to add.
Parameter: [type]: string - The trend type (defaults to "Unknown").
Parameter: [triggerRefresh]: boolean - States if the UI for the element ID should be refreshed (defaults to true).
Returns: Object - The Heat.js class instance.
Adds a date for a specific element ID, and refreshes the UI (if specified). If the date already exists, its value is increased by one.
Fires: onAdd
Parameter: elementId: string - The Heat.js element ID that should show the new date.
Parameter: date: Date - The date to add.
Parameter: [type]: string - The trend type (defaults to "Unknown").
Parameter: [triggerRefresh]: boolean - States if the UI for the element ID should be refreshed (defaults to true).
Returns: Object - The Heat.js class instance.
Updates a date for a specific element ID, and refreshes the UI (if specified).
Fires: onUpdate
Parameter: elementId: string - The Heat.js element ID that should show the updated date.
Parameter: date: Date - The date to update.
Parameter: count: number - The count that should be shown.
Parameter: [type]: string - The trend type (defaults to "Unknown").
Parameter: [triggerRefresh]: boolean - States if the UI for the element ID should be refreshed (defaults to true).
Returns: Object - The Heat.js class instance.
Removes an array of dates for a specific element ID, and refreshes the UI (if specified). If the dates already exist, their values are decreased by one.
Fires: onRemove
Parameter: elementId: string - The Heat.js element ID that should show the updated date.
Parameter: dates: Date[] - The dates to remove.
Parameter: [type]: string - The trend type (defaults to "Unknown").
Parameter: [triggerRefresh]: boolean - States if the UI for the element ID should be refreshed (defaults to true).
Returns: Object - The Heat.js class instance.
Removes a date for a specific element ID, and refreshes the UI (if specified). If the date already exists, its value is decreased by one.
Fires: onRemove
Parameter: elementId: string - The Heat.js element ID that should show the updated date.
Parameter: date: Date - The date to remove.
Parameter: [type]: string - The trend type (defaults to "Unknown").
Parameter: [triggerRefresh]: boolean - States if the UI for the element ID should be refreshed (defaults to true).
Returns: Object - The Heat.js class instance.
Clears a date for a specific element ID, and refreshes the UI (if specified).
Fires: onClear
Parameter: elementId: string - The Heat.js element ID that should show the updated date.
Parameter: date: Date - The date to clear.
Parameter: [type]: string - The trend type (defaults to "Unknown").
Parameter: [triggerRefresh]: boolean - States if the UI for the element ID should be refreshed (defaults to true).
Returns: Object - The Heat.js class instance.
Removes all the dates for all the elements, and refreshes the UI (if specified).
Fires: onReset
Parameter: [triggerRefresh]: boolean - States if the UI for the element ID should be refreshed (defaults to true).
Returns: Object - The Heat.js class instance.
Removes all the dates for a specific element ID, and refreshes the UI (if specified).
Fires: onReset
Parameter: elementId: string - The Heat.js element ID that should be updated.
Parameter: [triggerRefresh]: boolean - States if the UI for the element ID should be refreshed (defaults to true).
Returns: Object - The Heat.js class instance.
Imports data from an array of file objects (or opens the import dialog if files are not supplied).
Fires: onImport
Parameter: elementId: string - The Heat.js element ID whose data should be updated.
Parameter: files: Object - The file objects that the data should be imported from.
Returns: Object - The Heat.js class instance.
Exports all the data for a specific element ID.
Fires: onExport
Parameter: elementId: string - The Heat.js element ID whose data should be exported.
Parameter: [exportType]: string - The export type to use (defaults to "csv", also accepts "json", "xml", and "txt").
Returns: Object - The Heat.js class instance.
Refreshes a Heat.js instance.
Fires: onRefresh
Parameter: elementId: string - The Heat.js element ID that should be refreshed.
Returns: Object - The Heat.js class instance.
Refreshes all of the rendered Heat.js instances.
Fires: onRefresh
Returns: Object - The Heat.js class instance.
Sets the year to be displayed.
Fires: onSetYear
Parameter: elementId: string - The Heat.js element ID that should be updated.
Parameter: year: number - The year that should be shown.
Returns: Object - The Heat.js class instance.
Sets the year to the highest year available.
Fires: onSetYear
Parameter: elementId: string - The Heat.js element ID that should be updated.
Returns: Object - The Heat.js class instance.
Sets the year to the lowest year available.
Fires: onSetYear
Parameter: elementId: string - The Heat.js element ID that should be updated.
Returns: Object - The Heat.js class instance.
Moves the year back one.
Fires: onBackYear
Parameter: elementId: string - The Heat.js element ID that should be updated.
Returns: Object - The Heat.js class instance.
Moves the year forward one.
Fires: onNextYear
Parameter: elementId: string - The Heat.js element ID that should be updated.
Returns: Object - The Heat.js class instance.
Moves to the current year.
Fires: onSetYear
Parameter: elementId: string - The Heat.js element ID that should be updated.
Returns: Object - The Heat.js class instance.
Gets the year currently being displayed.
Parameter: elementId: string - The Heat.js element ID.
Returns: Object - The year being displayed (or null).
Renders a new map on a element using the options specified.
Parameter: element: Object - The element to convert to a heat map.
Parameter: options: Object - The options to use (refer to "Binding Options" documentation for properties).
Returns: Object - The Heat.js class instance.
Finds all new map elements and renders them.
Returns: Object - The Heat.js class instance.
Switches the view on an element to either Map, Chart, or Statistics.
Fires: onViewSwitch
Parameter: elementId: string - The Heat.js element ID.
Parameter: viewName: string - The name of the view to switch to (either "map", "chart", or "statistics").
Returns: Object - The Heat.js class instance.
Switches the selected trend type on an element.
Fires: onTypeSwitch
Parameter: elementId: string - The Heat.js element ID.
Parameter: type: string - The name of the type to switch to.
Returns: Object - The Heat.js class instance.
Updates the original binding options for an element and refreshes it.
Fires: onRefresh
Parameter: elementId: string - The Heat.js element ID.
Parameter: newOptions: Object - The new options to want to apply to the element.
Returns: Object - The Heat.js class instance.
Reverts an element to its original state (without render attributes).
Fires: onDestroy
Parameter: elementId: string - The Heat.js element ID to destroy.
Returns: Object - The Heat.js class instance.
Reverts all rendered elements to their original state (without render attributes).
Fires: onDestroy
Returns: Object - The Heat.js class instance.
Sets the specific configuration options that should be used.
Fires: onRefresh
Parameter: newConfiguration: Object - All the configuration options that should be set (refer to "Configuration Options" documentation for properties).
Parameter: [triggerRefresh]: boolean - States if the UI for each element should be refreshed (defaults to true).
Returns: Object - The Heat.js class instance.
Returns an array of element IDs that have been rendered.
Returns: string[] - The element IDs that have been rendered.
Returns the version of Heat.js.
Returns: string - The version number.