icloudtweetdeckhipchattelegramhangoutsslackgmailskypefacebook-workplaceoutlookemailmicrosoft-teamsdiscordmessengercustom-servicesmacoslinuxwindowsinboxwhatsapp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.3 KiB
48 lines
1.3 KiB
9 years ago
|
/**
|
||
|
* Base class for bar highlighting
|
||
|
*/
|
||
|
Ext.define('Ext.sparkline.BarBase', {
|
||
|
extend: 'Ext.sparkline.Base',
|
||
|
|
||
|
renderHighlight: function (region) {
|
||
|
this.renderRegion(region, true);
|
||
|
},
|
||
|
|
||
|
renderGraph: function () {
|
||
|
var me = this,
|
||
|
values = me.values,
|
||
|
canvas = me.canvas,
|
||
|
regionShapes = me.regionShapes || (me.regionShapes = {}),
|
||
|
shapes, ids, i, j;
|
||
|
|
||
|
if (!me.callParent()) {
|
||
|
return;
|
||
|
}
|
||
|
for (i = values.length; i--;) {
|
||
|
shapes = me.renderRegion(i);
|
||
|
if (shapes) {
|
||
|
if (Ext.isArray(shapes)) {
|
||
|
ids = [];
|
||
|
for (j = shapes.length; j--;) {
|
||
|
shapes[j].append();
|
||
|
ids.push(shapes[j].id);
|
||
|
}
|
||
|
regionShapes[i] = ids;
|
||
|
} else {
|
||
|
shapes.append();
|
||
|
regionShapes[i] = shapes.id; // store just the shapeid
|
||
|
}
|
||
|
} else {
|
||
|
// null value
|
||
|
regionShapes[i] = null;
|
||
|
}
|
||
|
}
|
||
|
// If mouse is over, add the highlight sprite
|
||
|
if (me.currentPageXY) {
|
||
|
me.currentRegion = null;
|
||
|
me.updateDisplay();
|
||
|
}
|
||
|
canvas.render();
|
||
|
}
|
||
|
});
|