mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-16 05:26:01 +00:00
move rrd legend to the bottom, make it toggleable
this is to make up for the lost width, and to make up for the lost height, you can now toggle the legend Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
7ec884caee
commit
ed37370c4a
@ -22,9 +22,7 @@ Ext.define('PVE.widget.RRDChart', {
|
||||
fields: ['time']
|
||||
}],
|
||||
legend: {
|
||||
docked: 'right',
|
||||
// we set this that all graphs have same width
|
||||
width: 140
|
||||
docked: 'bottom'
|
||||
},
|
||||
listeners: {
|
||||
afterrender: 'onAfterRender',
|
||||
@ -112,8 +110,7 @@ Ext.define('PVE.widget.RRDChart', {
|
||||
}
|
||||
me.axes[0].setTitle(axisTitle);
|
||||
|
||||
|
||||
me.addTool({
|
||||
me.addTool([{
|
||||
type: 'minus',
|
||||
disabled: true,
|
||||
tooltip: gettext('Undo Zoom'),
|
||||
@ -123,7 +120,13 @@ Ext.define('PVE.widget.RRDChart', {
|
||||
undoButton.handler();
|
||||
}
|
||||
}
|
||||
});
|
||||
},{
|
||||
type: 'restore',
|
||||
tooltip: gettext('Toggle Legend'),
|
||||
handler: function(){
|
||||
me.legend.setVisible(!me.legend.isVisible());
|
||||
}
|
||||
}]);
|
||||
// add a series for each field we get
|
||||
me.fields.forEach(function(item, index){
|
||||
var title = item;
|
||||
|
Loading…
Reference in New Issue
Block a user