| | |
| | | <template> |
| | | <div> |
| | | <!-- 年度å¼å·¥ç --> |
| | | <Echart |
| | | :options="options" |
| | | id="bottomLeftChart" |
| | | height="480px" |
| | | ></Echart> |
| | | <Echart :options="options" id="bottomLeftChart" height="480px"></Echart> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Echart from '@/common/echart' |
| | | export default { |
| | | data () { |
| | | data() { |
| | | return { |
| | | options: {}, |
| | | }; |
| | |
| | | }, |
| | | watch: { |
| | | cdata: { |
| | | handler (newData) { |
| | | handler(newData) { |
| | | this.options = { |
| | | title: { |
| | | text: "", |
| | |
| | | color: "#B4B4B4" |
| | | }, |
| | | top: "0%", |
| | | left:"15%" |
| | | |
| | | }, |
| | | grid: { |
| | | x: "8%", |
| | | x: "12%", |
| | | width: "90%", |
| | | y: "4%" |
| | | }, |
| | |
| | | { |
| | | name: "åºåºé", |
| | | type: "bar", |
| | | barWidth: 40, |
| | | barWidth: 25, |
| | | itemStyle: { |
| | | normal: { |
| | | barBorderRadius: 5, |
| | | color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 0, color: "#956FD4" }, |
| | | { offset: 1, color: "#3EACE5" } |
| | | ]) |
| | | ]), |
| | | label: { |
| | | show: true, // æ¾ç¤ºæ ç¾ |
| | | position: 'top', // æ ç¾ä½ç½®ï¼å¯ä»¥è®¾ç½® 'top', 'insideTop', 'inside', 'insideBottom' ç |
| | | formatter: '{c}', // æ ç¾å
å®¹æ ¼å¼å¨ï¼{c} è¡¨ç¤ºæ°æ®å¼ |
| | | fontSize: 14, // æ ç¾æå大å°ï¼é»è®¤ä¸º 12 |
| | | fontWeight: 'bold', // æ ç¾æåç²ç»ï¼é»è®¤ä¸º 'normal' |
| | | color: '#ffffff' // æ ç¾æåé¢è²ï¼é»è®¤ä¸º '#333' |
| | | } |
| | | } |
| | | }, |
| | | data: newData.barData |
| | |
| | | { |
| | | name: "å
¥åºé", |
| | | type: "bar", |
| | | barGap: "-100%", |
| | | barWidth: 40, |
| | | barWidth: 25, |
| | | itemStyle: { |
| | | normal: { |
| | | barBorderRadius: 5, |
| | |
| | | { offset: 0, color: "rgba(156,107,211,0.8)" }, |
| | | { offset: 0.2, color: "rgba(156,107,211,0.5)" }, |
| | | { offset: 1, color: "rgba(156,107,211,0.2)" } |
| | | ]) |
| | | ]), |
| | | label: { |
| | | show: true, // æ¾ç¤ºæ ç¾ |
| | | position: 'top', // æ ç¾ä½ç½®ï¼å¯ä»¥è®¾ç½® 'top', 'insideTop', 'inside', 'insideBottom' ç |
| | | formatter: '{c}', // æ ç¾å
å®¹æ ¼å¼å¨ï¼{c} è¡¨ç¤ºæ°æ®å¼ |
| | | fontSize: 14, // æ ç¾æå大å°ï¼é»è®¤ä¸º 12 |
| | | fontWeight: 'bold', // æ ç¾æåç²ç»ï¼é»è®¤ä¸º 'normal' |
| | | color: '#ffffff' // æ ç¾æåé¢è²ï¼é»è®¤ä¸º '#333' |
| | | } |
| | | } |
| | | }, |
| | | z: -12, |