mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-29 23:03:21 +00:00
RRDChart.js: add the seriesConfig parameter
so that we can override the the series with custom options like 'color' Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
fcb5b70f0e
commit
9950ec0f7d
@ -90,6 +90,7 @@ Ext.define('Proxmox.widget.RRDChart', {
|
|||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
var series = {};
|
||||||
|
|
||||||
if (!me.store) {
|
if (!me.store) {
|
||||||
throw "cannot work without store";
|
throw "cannot work without store";
|
||||||
@ -145,33 +146,36 @@ Ext.define('Proxmox.widget.RRDChart', {
|
|||||||
if (me.fieldTitles && me.fieldTitles[index]) {
|
if (me.fieldTitles && me.fieldTitles[index]) {
|
||||||
title = me.fieldTitles[index];
|
title = me.fieldTitles[index];
|
||||||
}
|
}
|
||||||
me.addSeries({
|
me.addSeries(Ext.apply(
|
||||||
type: 'line',
|
{
|
||||||
xField: 'time',
|
type: 'line',
|
||||||
yField: item,
|
xField: 'time',
|
||||||
title: title,
|
yField: item,
|
||||||
fill: true,
|
title: title,
|
||||||
style: {
|
fill: true,
|
||||||
lineWidth: 1.5,
|
style: {
|
||||||
opacity: 0.60
|
lineWidth: 1.5,
|
||||||
},
|
opacity: 0.60
|
||||||
marker: {
|
},
|
||||||
opacity: 0,
|
marker: {
|
||||||
scaling: 0.01,
|
opacity: 0,
|
||||||
fx: {
|
scaling: 0.01,
|
||||||
duration: 200,
|
fx: {
|
||||||
easing: 'easeOut'
|
duration: 200,
|
||||||
|
easing: 'easeOut'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
highlightCfg: {
|
||||||
|
opacity: 1,
|
||||||
|
scaling: 1.5
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trackMouse: true,
|
||||||
|
renderer: 'onSeriesTooltipRender'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
highlightCfg: {
|
me.seriesConfig
|
||||||
opacity: 1,
|
));
|
||||||
scaling: 1.5
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trackMouse: true,
|
|
||||||
renderer: 'onSeriesTooltipRender'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// enable animation after the store is loaded
|
// enable animation after the store is loaded
|
||||||
|
Loading…
Reference in New Issue
Block a user