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:
Dominik Csapak 2017-10-10 15:10:25 +02:00 committed by Dietmar Maurer
parent fcb5b70f0e
commit 9950ec0f7d

View File

@ -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,7 +146,8 @@ 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', type: 'line',
xField: 'time', xField: 'time',
yField: item, yField: item,
@ -171,7 +173,9 @@ Ext.define('Proxmox.widget.RRDChart', {
trackMouse: true, trackMouse: true,
renderer: 'onSeriesTooltipRender' renderer: 'onSeriesTooltipRender'
} }
}); },
me.seriesConfig
));
}); });
// enable animation after the store is loaded // enable animation after the store is loaded