A base class for charts
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
- external:dojo/_TemplatedMixin
- module:alfresco/core/Core
- module:alfresco/core/CoreWidgetProcessing
Members
-
_chart
-
Instance of the chart currently being displayed
- Source:
-
_chartMap
-
Instances of the charts to display
- Source:
-
_currentlySelectedChart
-
The currently selected chart
- Source:
-
baseClass :string
-
The base css class to use for this widget
Type:
- string
- Default Value:
- "alfresco-charts-ccc-ChartsView"
- Source:
-
chartSelectionTopic
-
The topic to publish when a chart selection has been made
- Source:
-
chartsNode :HTMLElement
-
The container element that holds the charts (will be set by dojo)
Type:
- HTMLElement
- Source:
-
dataRequestPayload
-
The initial payload of the dataRequestTopic.
- Source:
-
dataRequestTopic
-
The topic to publish to request chart data.
- Source:
-
subscriptionTopic
-
Publication of this topic will cause this widget to publish an event with the same name as dataRequestTopic and with a payload set to the payload merged with all previous payloads.
- Source:
-
templateString :string
-
The HTML template to use for the widget.
Type:
- string
- Source:
-
<inner> _currentDataRequestPayload
-
The current payload of the dataRequestTopic
- Source:
Methods
-
allWidgetsProcessed(The)
-
Iterates over the widgets processed and calls the registerChart function with each one.
Parameters:
Name Type Description The
object[] widgets to create - Source:
-
hideChildren(targetNode)
-
Hides all the children of the supplied DOM node by applying the "share-hidden" CSS class to them.
Parameters:
Name Type Description targetNode
Element The DOM node to hide the children of. - Source:
-
onDataRequestTopicFailure()
-
Called when the chart data has been successfully returned.
- Source:
-
onDataRequestTopicSuccess(payload)
-
Called when the chart data has been successfully returned.
Parameters:
Name Type Description payload
- Source:
-
postCreate()
-
Creates the charts as defined in widgets
- Source:
-
registerChart(chart, name)
-
Registers a chart with a given name.
Parameters:
Name Type Description chart
name
- Source:
-
requestData()
-
Publishes a topic with the name defined in dataRequestTopic to request data
- Source:
-
showChart(chart)
-
Shows a chart and hiddes the pother charts using the CSS class "share-hidden".
Parameters:
Name Type Description chart
- Source:
-
<inner> onDataRequestTopic(data, dataDescriptor)
-
Makes the current chart display new data.
Parameters:
Name Type Description data
object The data dataDescriptor
object Metadata describing data - Source:
-
<inner> onSubscriptionTopic(payload)
-
Called when the topic defined in subscriptionTopic has been called.
Parameters:
Name Type Description payload
- Source:
-
<inner> postMixInProperties()
-
Sets up subscriptions to the topics
- Source: