Model Index

Types By Namespace

cdo

def

pvc

pvc.data

pvc.options

pvc.options.axes

pvc.options.charts

pvc.options.ext

pvc.options.format

pvc.options.marks

pvc.options.panels

pvc.options.plots

pvc.options.varia

pvc.options.visualRoles

pvc.visual

Class pvc.visual.Context

Class Summary
Constructor Attributes Constructor Name and Description
 
The Context class exposes the CCC Visual API to extension point functions.
Field Summary
Field Attributes Field Name and Description
Interactivity and Delegation
 
Gets the associated DOM event.
Scene
 
Gets the index of #scene in relation to its sibling scenes.
 
Gets the associated scene, if there is one, or null if not.
Visual Components
 
Gets the immediate chart instance.
 
Gets the immediate panel instance.
 
Gets the Protovis mark instance, if there is one, or null, if not.
 
Gets the sign that wraps #pvMark, if there is one, or null, if not.
Method Summary
Method Attributes Method Name and Description
 
delegate(defaultValue)
Calls the underlying implementation of the extension point property currently being evaluated.
Interactivity and Delegation
 
finished(value)
Informs CCC that the value returned by the extension point function currently being evaluated should be taken as final.
Visual Data
 
Gets the value of the category scene variable.
 
Gets the label of the category scene variable.
 
Gets the value of the color scene variable.
 
Gets the label of the color scene variable.
 
Gets the value of the series scene variable.
 
Gets the label of the series scene variable.
 
Gets the value of the size scene variable.
 
Gets the label of the size scene variable.
 
Gets the value of the tick scene variable.
 
Gets the label of the tick scene variable.
 
Gets the value of the value scene variable.
 
Gets the label of the value scene variable.
 
getX()
Gets the value of the x scene variable.
 
Gets the label of the x scene variable.
 
getY()
Gets the value of the y scene variable.
 
Gets the label of the y scene variable.
Class Detail
pvc.visual.Context
The Context class exposes the CCC Visual API to extension point functions.

It is passed as the JavaScript this context object to extension functions, such as extension point functions and action handlers.

Field Detail
{HTMLDOMEvent} event
Gets the associated DOM event.

When the context is used in the context of click or double-click action handlers, gets the corresponding DOM event. In IE, gets a "fixed" version of the DOM event. Otherwise, gets the value null.


{?number} index
Gets the index of #scene in relation to its sibling scenes.

This index is 0-based.

When there is a scene, it gets the value of its Scene#childIndex method. Otherwise, when there is no scene, or when it is a root scene, gets the value null.

This property can be used to change the value of extension point properties depending on the index being, for example, even or odd. It should not be used for much else, like for obtaining data from an external array.


{pvc.visual.Scene} scene
Gets the associated scene, if there is one, or null if not.

{!pvc.BaseChart} chart
Gets the immediate chart instance. In multi-chart scenarios, this is the chart that is closest to what the context was created for. To be sure to get the root chart, get its pvc.BaseChart#root property.

{!pvc.BasePanel} panel
Gets the immediate panel instance. This is the panel that is closest to what the context was created for. Ultimately, this is the root chart's base panel.

{pv.Mark} pvMark
Gets the Protovis mark instance, if there is one, or null, if not. This property has a value when the context is used for an extension point function.
See:
#sign

{pvc.visual.Sign} sign
Gets the sign that wraps #pvMark, if there is one, or null, if not.
See:
#pvMark
Method Detail
{any} delegate(defaultValue)
Calls the underlying implementation of the extension point property currently being evaluated.

This method allows you to only handle certain cases, in an extension point function, and to delegate the remaining cases to the default implementation, as in the following example:

function(scene) {

  switch(scene.getCategory()) {
    case "cars":   return "red";
    case "plains": return "green";
    case "boats":  return "blue";
  }

  return this.delegate("orange");
}
Arguments:
{any} defaultValue
The default value to return when the default implementation would evaluate to undefined.
Returns:
{any} The evaluated value.

{any} finished(value)
Informs CCC that the value returned by the extension point function currently being evaluated should be taken as final. It should not be subject to additional, automatic interactivity effects.

For convenience, CCC applies certain effects automatically to the values returned by extension point functions. For example, it might decide to use a brighter version of a returned color when the corresponding mark is being hovered-over.

This method conveniently returns the passed-in value untouched, so that the following coding pattern is possible:

function() {
  var color = this.index % 2 ? "blue" : "red";
  return this.finished(color);
}
Arguments:
{any} value
- The value of the extension point property.
Returns:
{any} The passed in value argument.

{any} getCategory()
Gets the value of the category scene variable.

This method is sugar for this.scene.vars.category.value.

Returns:
{any} The variable's value.
See:
pvc.visual.Scene#getCategory

{any} getCategoryLabel()
Gets the label of the category scene variable.

This method is sugar for this.scene.vars.category.label.

Returns:
{any} The variable's label.
See:
pvc.visual.Scene#getCategoryLabel

{any} getColor()
Gets the value of the color scene variable.

This method is sugar for this.scene.vars.color.value.

Returns:
{any} The variable's value.
See:
pvc.visual.Scene#getColor

{any} getColorLabel()
Gets the label of the color scene variable.

This method is sugar for this.scene.vars.color.label.

Returns:
{any} The variable's label.
See:
pvc.visual.Scene#getColorLabel

{any} getSeries()
Gets the value of the series scene variable.

This method is sugar for this.scene.vars.series.value.

Returns:
{any} The variable's value.
See:
pvc.visual.Scene#getSeries

{any} getSeriesLabel()
Gets the label of the series scene variable.

This method is sugar for this.scene.vars.series.label.

Returns:
{any} The variable's label.
See:
pvc.visual.Scene#getSeriesLabel

{any} getSize()
Gets the value of the size scene variable.

This method is sugar for this.scene.vars.size.value.

Returns:
{any} The variable's value.
See:
pvc.visual.Scene#getSize

{any} getSizeLabel()
Gets the label of the size scene variable.

This method is sugar for this.scene.vars.size.label.

Returns:
{any} The variable's label.
See:
pvc.visual.Scene#getSizeLabel

{any} getTick()
Gets the value of the tick scene variable.

This method is sugar for this.scene.vars.tick.value.

Returns:
{any} The variable's value.
See:
pvc.visual.Scene#getTick

{any} getTickLabel()
Gets the label of the tick scene variable.

This method is sugar for this.scene.vars.tick.label.

Returns:
{any} The variable's label.
See:
pvc.visual.Scene#getTickLabel

{any} getValue()
Gets the value of the value scene variable.

This method is sugar for this.scene.vars.value.value.

Returns:
{any} The variable's value.
See:
pvc.visual.Scene#getValue

{any} getValueLabel()
Gets the label of the value scene variable.

This method is sugar for this.scene.vars.value.label.

Returns:
{any} The variable's label.
See:
pvc.visual.Scene#getValueLabel

{any} getX()
Gets the value of the x scene variable.

This method is sugar for this.scene.vars.x.value.

Returns:
{any} The variable's value.
See:
pvc.visual.Scene#getX

{any} getXLabel()
Gets the label of the x scene variable.

This method is sugar for this.scene.vars.x.label.

Returns:
{any} The variable's label.
See:
pvc.visual.Scene#getXLabel

{any} getY()
Gets the value of the y scene variable.

This method is sugar for this.scene.vars.y.value.

Returns:
{any} The variable's value.
See:
pvc.visual.Scene#getY

{any} getYLabel()
Gets the label of the y scene variable.

This method is sugar for this.scene.vars.y.label.

Returns:
{any} The variable's label.
See:
pvc.visual.Scene#getYLabel

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Dec 20 2018 15:47:44 GMT-0000 (WET)