27 lines
		
	
	
		
			469 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			469 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <div class="custom-chart" ref="containerRef"></div>
 | |
| </template>
 | |
| <script>
 | |
| import echarts from 'echarts'
 | |
| export default {
 | |
|     props: {
 | |
|         option : {
 | |
|             type: Object,
 | |
|             default: () => ({})
 | |
|         }
 | |
|     },
 | |
|   data() {
 | |
|     return {}
 | |
|   },
 | |
|   mounted() {
 | |
|     this.chart = echarts.init(this.$refs.containerRef)
 | |
|     this.chart.setOption(this.option)
 | |
|   }
 | |
| }
 | |
| </script>
 | |
| <style lang="less" scoped>
 | |
| .custom-chart {
 | |
|     height: 100%;    
 | |
| }
 | |
| </style>
 |