]>
git.proxmox.com Git - sencha-touch.git/blob - src/examples/charts/app/store/Pie.js
4 // Controllable random.
7 seed
-= Math
.floor(seed
);
11 Ext
.define('Charts.store.Pie', {
13 extend
: 'Ext.data.Store',
15 fields
: ['id', 'g1', 'g2', 'g3', 'g4', 'g5', 'g6', 'name'],
18 generateData : function (count
) {
19 var data
= [], i
, record
= {
21 'g1' : Math
.round(700 * random() + 100, 0),
22 'g2' : Math
.round(700 * random() + 100, 0),
23 'g3' : 700 * random() + 100,
24 'g4' : 700 * random() + 100,
25 'g5' : 700 * random() + 100,
26 'g6' : 700 * random() + 100,
30 for (i
= 1; i
< count
; i
++) {
31 var name
= 'Item-' + i
;
44 name
= 'Pharmacology';
52 'g1' : Math
.round(Math
.abs(record
.g1
+ 300 * random() - 140), 0),
53 'g2' : Math
.round(Math
.abs(record
.g2
+ 300 * random() - 140), 0),
54 'g3' : Math
.abs(record
.g3
+ 300 * random() - 140),
55 'g4' : Math
.abs(record
.g4
+ 300 * random() - 140),
56 'g5' : Math
.abs(record
.g5
+ 300 * random() - 140),
57 'g6' : Math
.abs(record
.g6
+ 300 * random() - 140),
64 constructor : function () {
65 this.callParent(arguments
);