|
|
@@ -3,35 +3,46 @@ Ext.define('saas.view.home.charts.MonthIO', {
|
|
|
xtype: 'month-io',
|
|
|
id: 'month_io',
|
|
|
|
|
|
+ bind: {
|
|
|
+ title: '本月收入支出额(万元)<div style="text-align: right;"><span style="font-weight:bold;">收入:{month_in}</span><span style="font-weight:bold;margin-left: 10px;">支出:{month_out}</span></div>'
|
|
|
+ },
|
|
|
+
|
|
|
initComponent: function () {
|
|
|
var me = this;
|
|
|
|
|
|
Ext.apply(me, {
|
|
|
items: [{
|
|
|
xtype: 'cartesian',
|
|
|
- insetPadding: '28 0 0 0',
|
|
|
colors: [
|
|
|
'#2C82BE',
|
|
|
'#82CCFF'
|
|
|
],
|
|
|
bind: {
|
|
|
- captions: {
|
|
|
- title: {
|
|
|
- text: '本月收入支出额(万元)\n收入:{month_in}\t支出:{month_out}',
|
|
|
- style: {
|
|
|
- 'font-size': '14px',
|
|
|
- 'color': '#485465',
|
|
|
- 'letter-spacing': '-0.07px'
|
|
|
- },
|
|
|
- align: 'left'
|
|
|
- },
|
|
|
- },
|
|
|
+ // captions: {
|
|
|
+ // title: {
|
|
|
+ // text: '收入:{month_in}\t支出:{month_out}',
|
|
|
+ // style: {
|
|
|
+ // 'color': '#485465',
|
|
|
+ // 'letter-spacing': '-0.07px'
|
|
|
+ // },
|
|
|
+ // align: 'left'
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ insetPadding: '{insetPadding}',
|
|
|
store: '{month_io}'
|
|
|
},
|
|
|
// legend: {
|
|
|
// type: 'sprite',
|
|
|
// docked: 'bottom'
|
|
|
// },
|
|
|
+ legend: {
|
|
|
+ type: 'dom',
|
|
|
+ docked: 'top',
|
|
|
+ padding: 0,
|
|
|
+ bodyPadding: 0,
|
|
|
+ border: 0,
|
|
|
+ cls: 'x-monthio-legend'
|
|
|
+ },
|
|
|
axes: [{
|
|
|
type: 'numeric',
|
|
|
position: 'left',
|
|
|
@@ -71,10 +82,12 @@ Ext.define('saas.view.home.charts.MonthIO', {
|
|
|
xField: 'x',
|
|
|
yField: ['main', 'other'],
|
|
|
stacked: true,
|
|
|
- style: {
|
|
|
- lineWidth: 0,
|
|
|
- strokeStyle: 'transparent',
|
|
|
- maxBarWidth: 50,
|
|
|
+ bind: {
|
|
|
+ style: {
|
|
|
+ lineWidth: 0,
|
|
|
+ strokeStyle: 'transparent',
|
|
|
+ maxBarWidth: '{maxBarWidth}',
|
|
|
+ },
|
|
|
},
|
|
|
tooltip: {
|
|
|
trackMouse: true,
|