fix: NET图表用独立IIFE确保2x生效
This commit is contained in:
@@ -278,7 +278,12 @@
|
||||
_chartInstances[id].mem = new MiniChart(id+'-mem', '#9ece6a'); _hires(_chartInstances[id].mem);
|
||||
}
|
||||
if (typeof DualLineChart !== 'undefined') {
|
||||
_chartInstances[id].net = new DualLineChart(id+'-net', '#bb9af7', '#c0a8f0'); _hires(_chartInstances[id].net);
|
||||
_chartInstances[id].net = new DualLineChart(id+'-net', '#bb9af7', '#c0a8f0');
|
||||
(function(dlc){
|
||||
var orig = dlc.applyResize.bind(dlc);
|
||||
dlc.applyResize = function(){ orig(); dlc.canvas.width *= 2; dlc.ctx.scale(2,1); dlc.draw(); };
|
||||
dlc.applyResize();
|
||||
})(_chartInstances[id].net);
|
||||
}
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user