Sencha Documentation

Creates a Scatter Chart. The scatter plot is useful when trying to display more than two variables in the same visualization. These variables can be mapped into x, y coordinates and also to an element's radius/size, color, etc. As with all other series, the Scatter Series must be appended in the *series* Chart array configuration. See the Chart documentation for more information on creating charts. A typical configuration object for the scatter could be:
series: [{
            type: 'scatter',
            markerCfg: {
                radius: 5,
                size: 5
            },
            axis: 'left',
            xField: 'name',
            yField: 'data1'
        }, {
            type: 'scatter',
            markerCfg: {
                radius: 5,
                size: 5
            },
            axis: 'left',
            xField: 'name',
            yField: 'data2'
        }, {
            type: 'scatter',
            markerCfg: {
                radius: 5,
                size: 5
            },
            axis: 'left',
            xField: 'name',
            yField: 'data3'
        }]
In this configuration we add three different categories of scatter series. Each of them is bound to a different field of the same data store, `data1`, `data2` and `data3` respectively. All x-fields for the series must be the same field, in this case `name`. Each scatter series has a different styling configuration for markers, specified by the `markerCfg` object. Finally we set the left axis as axis to show the current values of the elements.

Config Options

 
listeners : Object
An (optional) object with event callbacks. All event callbacks get the target *item* as first parameter. The callback...
An (optional) object with event callbacks. All event callbacks get the target *item* as first parameter. The callback functions are:
  • itemmouseover
  • itemmouseout
  • itemmousedown
  • itemmouseup
 
markerCfg : Object
The display style for the scatter series markers.
The display style for the scatter series markers.
 
renderer : Function
A function that can be overridden to set custom styling properties to each rendered element. Passes in (sprite, recor...
A function that can be overridden to set custom styling properties to each rendered element. Passes in (sprite, record, attributes, index, store) to the function.
 
An array with shadow attributes
An array with shadow attributes
 
showInLegend : Boolean
Whether to show this series in the legend.
Whether to show this series in the legend.
 
style : Object
Append styling properties to this object for it to override theme properties.
Append styling properties to this object for it to override theme properties.
 
title : String
The human-readable name of the series.
The human-readable name of the series.
 
type : String
The type of series. Set in subclasses.
The type of series. Set in subclasses.

Properties

 
axis : String
Indicates which axis the series will bind to
Indicates which axis the series will bind to
 
xField : String
The field used to access the x axis value from the items from the data source.
The field used to access the x axis value from the items from the data source.
 
yField : String
The field used to access the y-axis value from the items from the data source.
The field used to access the y-axis value from the items from the data source.

Methods

 
drawSeries : Void
Draws the series for the current chart.
Draws the series for the current chart.
 
getItemForPoint( x {Number}, y {Number} ) : Object
For a given x/y point relative to the Surface, find a corresponding item from this series, if any.
For a given x/y point relative to the Surface, find a corresponding item from this series, if any.

Parameters

  • {Number} : x
    The left pointer coordinate.
  • {Number} : y
    The top pointer coordinate.

Returns

  • Object   An object with the item found or null instead.
 
Returns a string with the color to be used for the series legend item.
Returns a string with the color to be used for the series legend item.
 
hideAll : Void
Hides all the elements in the series.
Hides all the elements in the series.
 
showAll : Void
Shows all the elements in the series.
Shows all the elements in the series.