Commit 564d1a2b by 匡雅琴

调整样式

1 parent 74081255
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
}, },
size: { size: {
type: String, type: String,
default: '0.6vw' default: '12px'
}, },
formatter: { formatter: {
type: Boolean, type: Boolean,
...@@ -105,7 +105,10 @@ export default { ...@@ -105,7 +105,10 @@ export default {
// 指定图表的配置项和数据 // 指定图表的配置项和数据
this.option = { this.option = {
// tooltip: { // tooltip: {
// trigger: 'item' // trigger: 'item',
// label: {
// show: true
// }
// }, // },
color: this.colors, color: this.colors,
...@@ -130,19 +133,25 @@ export default { ...@@ -130,19 +133,25 @@ export default {
fontSize: this.size, fontSize: this.size,
fontWeight: 'bold', fontWeight: 'bold',
color: '#fff', color: '#fff',
formatter(params) { formatter: function(params) {
const _dataIndex = params.dataIndex const _dataIndex = params.dataIndex
const _purchaseamount = utils.numAddSymbol(_this.list[_dataIndex].purchaseamount) const _purchaseamount = utils.numAddSymbol(_this.list[_dataIndex].purchaseamount)
const _avarage = utils.numAddSymbol(_this.list[_dataIndex].averprice) const _avarage = utils.numAddSymbol(_this.list[_dataIndex].averprice)
if (_this.formatter) return `{a|¥ ${_purchaseamount}}\n{b|均价¥ ${_avarage}}` // const _html = `<div>¥${_purchaseamount}</div><div style="padding-left: 7px;">均价¥ ${_avarage}</div>`
if (_this.formatter) return `{a|¥${_purchaseamount}}\n{b|均价¥ ${_avarage}}`
return `${params.name}` return `${params.name}`
// return _html
}, },
rich: { rich: {
a: { a: {
color: '#c8c8c8' color: '#c8c8c8',
wordSpacing: '5px'
}, },
b: { b: {
color: '#ffffff66' color: '#ffffff66',
fontSize: '12px',
// padding: ['7px', 0, 0, 0],
lineHeight: '28'
} }
} }
} }
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
progressChart: { progressChart: {
id: 'progress', id: 'progress',
keys: ['progress', 'purchaseamount'], keys: ['progress', 'purchaseamount'],
height: '15.34vh', height: '16.34vh',
colors: ['#4FA0FF', '#7CFFB2', '#FDF006'] colors: ['#4FA0FF', '#7CFFB2', '#FDF006']
}, },
// 采购进度数据 // 采购进度数据
......
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
propertionChart: { propertionChart: {
id: 'propertion', id: 'propertion',
keys: ['goodsname', 'purchaseamount'], keys: ['goodsname', 'purchaseamount'],
height: '15.34vh', height: '17.34vh',
colors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001'], colors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001'],
formatter: true formatter: true
}, },
......
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
.pie-chart { .pie-chart {
// width: 138px; // width: 138px;
// height: 138px; // height: 138px;
margin-top: 2.44vh; // margin-top: 2.44vh;
width: 20%; width: 20%;
} }
.legend { .legend {
......
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
shopmallChart: { shopmallChart: {
id: 'shopmall', id: 'shopmall',
keys: ['goodsname', 'purchaseamount'], keys: ['goodsname', 'purchaseamount'],
height: '16vh', height: '18vh',
colors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001'], colors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001'],
formatter: true formatter: true
}, },
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
selfPickChart: { selfPickChart: {
id: 'selfPick', id: 'selfPick',
keys: ['goodsname', 'purchaseamount'], keys: ['goodsname', 'purchaseamount'],
height: '16vh', height: '18vh',
colors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001'], colors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001'],
formatter: true formatter: true
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!