]>
git.proxmox.com Git - sencha-touch.git/blob - src/src/chart/series/Scatter.js
2 * @class Ext.chart.series.Scatter
3 * @extends Ext.chart.series.Cartesian
5 * Creates a Scatter Chart. The scatter plot is useful when trying to display more than two variables in the same visualization.
6 * These variables can be mapped into x, y coordinates and also to an element's radius/size, color, etc.
7 * As with all other series, the Scatter Series must be appended in the *series* Chart array configuration. See the Chart
8 * documentation for more information on creating charts. A typical configuration object for the scatter could be:
11 * var chart = new Ext.chart.CartesianChart({
14 * fields: ['name', 'data1', 'data2', 'data3', 'data4', 'data5'],
16 * {'name':'metric one', 'data1':10, 'data2':12, 'data3':14, 'data4':8, 'data5':13},
17 * {'name':'metric two', 'data1':7, 'data2':8, 'data3':16, 'data4':10, 'data5':3},
18 * {'name':'metric three', 'data1':5, 'data2':2, 'data3':14, 'data4':12, 'data5':7},
19 * {'name':'metric four', 'data1':2, 'data2':14, 'data3':6, 'data4':1, 'data5':23},
20 * {'name':'metric five', 'data1':27, 'data2':38, 'data3':36, 'data4':13, 'data5':33}
28 * text: 'Sample Values',
38 * text: 'Sample Values',
59 * Ext.Viewport.setLayout('fit');
60 * Ext.Viewport.add(chart);
62 * 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,
63 * `data1`, `data2` and `data3` respectively. All x-fields for the series must be the same field, in this case `name`.
64 * Each scatter series has a different styling configuration for markers, specified by the `marker` object. Finally we set the left axis as
65 * axis to show the current values of the elements.
68 Ext
.define('Ext.chart.series.Scatter', {
70 extend
: 'Ext.chart.series.Cartesian',
72 alias
: 'series.scatter',
75 seriesType
: 'scatterSeries',
78 'Ext.chart.series.sprite.Scatter'
92 applyMarker: function (marker
) {
93 this.getItemInstancing();
94 this.setItemInstancing(marker
);
97 provideLegendInfo: function (target
) {
98 var style
= this.config
.marker
;
100 name
: this.getTitle() || this.getYField() || this.getId(),
101 mark
: style
.fill
|| style
.stroke
|| 'black',
103 series
: this.getId(),