2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +00:00

improved performance...

git-svn-id: https://svn.fhem.de/fhem/trunk@3127 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
johannnes 2013-04-28 12:03:30 +00:00
parent c4e8c6ebe6
commit 0d8819b8d7
4 changed files with 32 additions and 13 deletions

View File

@ -49,13 +49,13 @@ UPD 2013-04-03_07:27:17 345 www/frontend/app/resources/icons/arrow_left.png
UPD 2013-04-03_07:27:17 733 www/frontend/app/resources/icons/add.png
UPD 2013-04-03_07:27:17 389 www/frontend/app/resources/icons/resultset_previous.png
UPD 2013-04-26_05:05:23 2238 www/frontend/app/app.js
UPD 2013-04-27_06:11:24 22156 www/frontend/app/view/LineChartPanel.js
UPD 2013-04-28_02:00:20 22189 www/frontend/app/view/LineChartPanel.js
UPD 2013-04-26_05:05:57 22790 www/frontend/app/view/HighChartsPanel.js
UPD 2013-04-20_04:52:50 1202 www/frontend/app/view/ChartGridPanel.js
UPD 2013-04-28_02:00:20 1205 www/frontend/app/view/ChartGridPanel.js
UPD 2013-04-03_07:26:40 15793 www/frontend/app/view/DevicePanel.js
UPD 2013-04-26_05:05:57 8922 www/frontend/app/view/Viewport.js
UPD 2013-04-01_07:05:14 2476 www/frontend/app/view/TableDataGridPanel.js
UPD 2013-04-27_06:11:02 64176 www/frontend/app/controller/ChartController.js
UPD 2013-04-28_01:59:56 64882 www/frontend/app/controller/ChartController.js
UPD 2013-04-26_05:05:41 12806 www/frontend/app/controller/HighChartController.js
UPD 2013-04-27_06:15:02 13892 www/frontend/app/controller/MainController.js
UPD 2013-04-01_07:04:35 202 www/frontend/app/model/ReadingsModel.js

View File

@ -155,8 +155,9 @@ Ext.define('FHEM.controller.ChartController', {
if (!existingchartgrid) {
var chartdatagrid = Ext.create('FHEM.view.ChartGridPanel', {
name: 'chartgridpanel',
height: 200,
maxHeight: 200
minHeight: 200,
maxHeight: 200,
collapsed: true
});
chartpanel.add(chartdatagrid);
} else {
@ -177,6 +178,7 @@ Ext.define('FHEM.controller.ChartController', {
chart.bindStore(chartstore);
chart.series.removeAll();
chart.axes.get(0).setTitle("");
chart.axes.get(1).setTitle("");
}
//reset zoomValues
@ -275,6 +277,7 @@ Ext.define('FHEM.controller.ChartController', {
* resize the chart to fit the centerpanel
*/
resizeChart: function() {
var lcp = Ext.ComponentQuery.query('linechartpanel')[0];
var lcv = Ext.ComponentQuery.query('chart')[0];
var cfp = Ext.ComponentQuery.query('form[name=chartformpanel]')[0];
@ -290,14 +293,24 @@ Ext.define('FHEM.controller.ChartController', {
cdgh = cdg.getHeight();
if (lcph && lcpw && cfph && cdgh) {
var chartheight = lcph - cfph - cdgh - 95;
var chartwidth = lcpw - 25;
lcv.setHeight(chartheight);
lcv.setWidth(chartwidth);
var chartheight = lcph - cfph - cdgh - 80;
var chartwidth = lcpw - 5;
lcv.height = chartheight;
lcv.width = chartwidth;
//render after 50ms to get component right
window.setTimeout(function() {
if (lcv.series.get(0).hideAll) {
lcv.series.get(0).hideAll();
}
lcv.doComponentLayout();
if (lcv.series.get(0).showAll) {
lcv.series.get(0).showAll();
}
lcv.redraw();
}, 50);
}
}
lcv.animate = true;
lcv.redraw();
},
/**
@ -311,6 +324,7 @@ Ext.define('FHEM.controller.ChartController', {
name: 'chartpanel',
collapsible: true,
titleCollapse: true,
animCollapse: false,
items: [
{
xtype: 'toolbar',
@ -368,7 +382,9 @@ Ext.define('FHEM.controller.ChartController', {
{
xtype: 'chart',
legend: {
position: 'right'
position: 'right',
labelFont: '10px Helvetica, sans-serif',
padding: 4
},
axes: [
{
@ -791,7 +807,9 @@ Ext.define('FHEM.controller.ChartController', {
chart.axes.get(2).processView();
//collapse chart settings
me.getChartformpanel().collapse();
//me.getChartformpanel().collapse();
me.resizeChart();
me.getLinechartpanel().setLoading(false);

View File

@ -28,7 +28,7 @@ Ext.define('FHEM.view.ChartGridPanel', {
titleCollapse: true,
collapsed: false,
animCollapse: false,
/**
* init function

View File

@ -95,6 +95,7 @@ Ext.define('FHEM.view.LineChartPanel', {
autoScroll: true,
collapsible: true,
titleCollapse: true,
animCollapse: false,
items: [
{
xtype: 'fieldset',