Module: alfresco/charts/ccc/Chart

alfresco/charts/ccc/Chart

A base class for charts
Author:
  • Erik Winlöf
License:
Source:

Members

_currentData :object

Variable for storing the current data
Type:
  • object
Source:

_currentDataDescriptor :object

Variable for storing meta data about the current data
Type:
  • object
Source:

baseClass :string

The base css class to use for this widget
Type:
  • string
Default Value:
  • "alfresco-charts-ccc-Chart"
Source:

chartConfig :object

Any additional configuration attributes for the chart can be set here

Options set here will override anything set via another named property.

Type:
  • object
Source:

chartNode :HTMLElement

The charts container element (will be set by dojo)
Type:
  • HTMLElement
Source:

clickTopic :string

The topic to publish when chart data item has been clicked.
Type:
  • string
Source:

cssRequirements :object[]

An array of the CSS files to use with this widget.
Type:
  • object[]
Default Value:
  • [{cssFile:"./css/Chart.css"}]
Source:

dataTopic :string

The topic to publish when requesting chart data
Type:
  • string
Source:

dataTopicPayload

The initial payload of the dataTopic.
Source:

dimensions :null|pvc.options.DimensionType

A map whose keys are the dimension type names and whose values are the dimension type options. For more details see: http://www.webdetails.pt/ctools/charts/jsdoc/symbols/pvc.options.DimensionType.html
Type:
  • null | pvc.options.DimensionType
Default Value:
  • null
Source:

height :number

The height in pixels.
Type:
  • number
Default Value:
  • 400
Source:

hoverable :boolean

Indicates if the chart's visual elements are automatically highlighted when the user hovers over them with the mouse.
Type:
  • boolean
Default Value:
  • false
Source:

legend :boolean|pvc.options.panels.LegendPanel

Decides if a legend shall be displayed and if so how it should appear. For more details see: http://www.webdetails.pt/ctools/charts/jsdoc/symbols/pvc.options.panels.LegendPanel.html
Type:
  • boolean | pvc.options.panels.LegendPanel
Default Value:
  • false
Source:

nonAmdDependencies :string[]

Declare the dependencies on "legacy" JS files that this widget is wrapping.
Type:
  • string[]
Source:

pvcChartType :string

The Protovis class that will be wrapped inside this widget. Note! MUST be overridden by a sub class.
Type:
  • string
Source:

readers :null|pvc.options.DimensionsReader

An array of dimensions readers. Can be specified to customize the translation process of the data source. For more details see: http://www.webdetails.pt/ctools/charts/jsdoc/symbols/pvc.options.DimensionsReader.html
Type:
  • null | pvc.options.DimensionsReader
Default Value:
  • null
Source:

selectable :boolean

Indicates if the chart's visual elements can be selected by the user, by clicking on them or using the rubber-band.
Type:
  • boolean
Default Value:
  • false
Source:

templateString :string

The HTML template to use for the widget.
Type:
  • string
Source:

title :string

The chart title
Type:
  • string
Source:

titlePosition :string

The position of the chart title
Type:
  • string
Source:

tooltip :pvc.options.Tooltip

Indicates if tooltips are enabled and contains additional tooltip presentation options. For more details see: http://www.webdetails.pt/ctools/charts/jsdoc/symbols/pvc.options.Tooltip.html
Type:
  • pvc.options.Tooltip
Default Value:
  • { enabled: true }
Source:

width :number|null

The width in pixels of the chart. A null value indicates 100%
Type:
  • number | null
Default Value:
  • null
Source:

<inner> extensionPoints

Extension points for the chart, will vary depending on the CCC2 class. For more details visit: http://www.webdetails.pt/ctools/charts/jsdoc/symbols/pvc.options.ext.ChartExtensionPoints.html
Source:

Methods

_performRenderChart()

Performs the actual rendering of the chart.
Source:

_renderChart()

Renders the chart.
Source:

createChart()

Creates the CCC chart.
Source:

createChartConfig() → {object}

Creates and returns the chart config
Source:
Returns:
Type
object

postCreate()

Sets up topic subscriptions and makes sure the chart is resized when the window is resized.
Source:

postMixInProperties()

Subscribes to the data topic
Source:

showData(data, dataDescriptor)

Shows the data in the chart
Parameters:
Name Type Description
data object The data to display
dataDescriptor object Metadata description about the data
Source:

<private, inner> _getWidth() → {null|number}

Calculates the width (in pixels) of an element.
Source:
Returns:
Type
null | number

<inner> onDataLoadFailure(payload)

Called when chart data failed to load.
Parameters:
Name Type Description
payload object
Source:

<inner> onDataLoadSuccess(payload)

Called when chart is loaded.
Parameters:
Name Type Description
payload object
Source:

<inner> onItemClick(scene)

Called when a chart item is clicked, will publish a topic with the name defined in the clickTopic
Parameters:
Name Type Description
scene object
Source: