|
|
@@ -23,7 +23,7 @@ Ext.define('saas.view.home.charts.ProfitDetail', {
|
|
|
},
|
|
|
axes: [{
|
|
|
type: 'category',
|
|
|
- fields: ['z'],
|
|
|
+ fields: ['x'],
|
|
|
position: 'bottom',
|
|
|
label: {
|
|
|
fontSize: '12px',
|
|
|
@@ -60,7 +60,7 @@ Ext.define('saas.view.home.charts.ProfitDetail', {
|
|
|
}],
|
|
|
series: [{
|
|
|
type: 'bar',
|
|
|
- xField: 'z',
|
|
|
+ xField: 'x',
|
|
|
yField: ['y'],
|
|
|
bind: {
|
|
|
style: {
|
|
|
@@ -81,7 +81,10 @@ Ext.define('saas.view.home.charts.ProfitDetail', {
|
|
|
},
|
|
|
|
|
|
onCategoryLabelRender: function(axis, label, layoutContent, lastLabel) {
|
|
|
- return label;
|
|
|
+ var cWidth = this.gridSurface.el.dom.clientWidth,
|
|
|
+ dataCount = layoutContent.data.length,
|
|
|
+ maxLength = Math.ceil((cWidth/dataCount)/20);
|
|
|
+ return label.length > maxLength ? label.substring(0, maxLength) + '...' : label;
|
|
|
},
|
|
|
|
|
|
onBarTipRender: function (tooltip, record, item) {
|