Browse Source

饼图图例允许设置formatter

zhuth 7 years ago
parent
commit
256beb129c

+ 2 - 1
kanban-console/src/main/webapp/resources/app/view/component/piecomponent.js

@@ -38,7 +38,8 @@ Ext.define('erp.view.component.piecomponent',{
 				},{
 					xtype: 'legendtrigger',
 					fieldLabel: '图例设置',
-					name: 'legendconfig'
+					name: 'legendconfig',
+					chartType: 'pie'
 				}, {
 					xtype: 'pietrigger',
 					fieldLabel: '图形设置',

+ 14 - 0
kanban-console/src/main/webapp/resources/app/view/core/trigger/LegendTrigger.js

@@ -95,6 +95,20 @@ Ext.define('erp.view.core.trigger.LegendTrigger', {
                 	name: 'itemHeight',
                 	minValue: 0,
                 	emptyText: '14'
+                }, {
+                	xtype: 'textfield',
+                	fieldLabel: '<font title="可选模板变量包括{name}、{value},分别表示名称、值">图例文字模板</font>',
+                	name: 'formatter',
+                	minValue: 0,
+                	emptyText: '{name}',
+                	hidden: true,
+                	listeners: {
+                		afterrender: function() {
+                			if(trigger.chartType == 'pie') {
+                				this.show();
+                			}
+                		}
+                	}
                 }],
                 setConfig: function(configObj) {
                     var form = this;

File diff suppressed because it is too large
+ 0 - 0
kanban-console/src/main/webapp/resources/js/boardshow/main.bundle.js


Some files were not shown because too many files changed in this diff