zhuth 7 years ago
parent
commit
0c48727466

+ 16 - 0
frontend/saas-web/app/view/home/charts/MonthSale.js

@@ -32,6 +32,22 @@ Ext.define('saas.view.home.charts.MonthSale', {
                     '#53A8E2',
                     '#76DDFB',
                     '#DBECF8',
+                    '#426AB3',
+                    '#228FBD',
+                    '#2A5CAA',
+                    '#7BBFEA',
+                    '#2A8FBD',
+                    '#4C556E',
+                    '#9999FF',
+                    '#CCCCFF',
+                    '#06B9D1',
+                    '#005A78',
+                    '#00466B',
+                    '#005687',
+                    '#05173B',
+                    '#1A4FA3',
+                    '#1E90FF',
+                    '#B0E0E6'
                 ],
                 width: '100%',
                 innerPadding: 20,

+ 9 - 4
frontend/saas-web/app/view/home/charts/PurchaseTrend.js

@@ -28,10 +28,10 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
                     store: '{purchase_trend}',
                 },
                 axes: [{
-                    title: {
-                        text: '月',
-                        fontSize: 14,
-                    },
+                    // title: {
+                    //     text: '月',
+                    //     fontSize: 14,
+                    // },
                     type: 'category',
                     fields: ['x'],
                     position: 'bottom',
@@ -39,6 +39,7 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
                         fill: '#E7EBEF',
                         strokeStyle: 'transparent'
                     },
+                    renderer: me.categoryRender
                 },{
                     type: 'numeric',
                     fields: ['y'],
@@ -80,4 +81,8 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
         tooltip.setHtml(record.get('x') + ': ' + record.get('y') + '万元');
     },
 
+    categoryRender: function(axis, label, layoutContext, lastLabel) {
+        return label + '月';
+    }
+
 });

+ 9 - 4
frontend/saas-web/app/view/home/charts/SaleTrend.js

@@ -34,10 +34,10 @@ Ext.define('saas.view.home.charts.SaleTrend', {
 
                 // },
                 axes: [{
-                    title: {
-                        text: '月',
-                        fontSize: 14,
-                    },
+                    // title: {
+                    //     text: '月',
+                    //     fontSize: 14,
+                    // },
                     type: 'category',
                     fields: ['x'],
                     position: 'bottom',
@@ -45,6 +45,7 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                         fill: '#E7EBEF',
                         strokeStyle: 'transparent'
                     },
+                    renderer: me.categoryRender
                 },{
                     type: 'numeric',
                     fields: ['sale', 'saleback'],
@@ -94,4 +95,8 @@ Ext.define('saas.view.home.charts.SaleTrend', {
         tooltip.setHtml(record.get('x') + title + record.get(item.series.getYField()) + '万元');
     },
 
+    categoryRender: function(axis, label, layoutContext, lastLabel) {
+        return label + '月';
+    }
+
 });

+ 9 - 4
frontend/saas-web/app/view/home/charts/StockAmount.js

@@ -28,10 +28,10 @@ Ext.define('saas.view.home.charts.StockAmount', {
                     store: '{stock_amount}',
                 },
                 axes: [{
-                    title: {
-                        text: '月',
-                        fontSize: 14,
-                    },
+                    // title: {
+                    //     text: '月',
+                    //     fontSize: 14,
+                    // },
                     type: 'category',
                     fields: ['x'],
                     position: 'bottom',
@@ -39,6 +39,7 @@ Ext.define('saas.view.home.charts.StockAmount', {
                         fill: '#E7EBEF',
                         strokeStyle: 'transparent'
                     },
+                    renderer: me.categoryRender
                 },{
                     type: 'numeric',
                     fields: ['y'],
@@ -80,4 +81,8 @@ Ext.define('saas.view.home.charts.StockAmount', {
         tooltip.setHtml(record.get('x') + ': ' + record.get('y') + '万元');
     },
 
+    categoryRender: function(axis, label, layoutContext, lastLabel) {
+        return label + '月';
+    }
+
 });