123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <template>
- <div>
- <charts
- style="margin-top: -40px"
- id="bizchart4"
- height="230px"
- width="460px"
- :option="option"
- />
- </div>
- </template>
- <script lang="js">
- import charts from '../../../components/echarts/index.vue'
- import * as echarts from "echarts";
- export default {
- components: {charts},
- data() {
- return {
- option: {
- dataset: {
- dimensions: ['product', '2016', '2017'],
- source: [
- {product: '1', 2016: 85.8, 2017: 93.7},
- {product: '2', 2016: 73.4, 2017: 55.1},
- {product: '3', 2016: 65.2, 2017: 82.5},
- {product: '4', 2016: 53.9, 2017: 39.1},
- {product: '5', 2016: 53.9, 2017: 39.1}
- ]
- },
- xAxis: {
- type: 'category',
- axisLine: {
- lineStyle: {
- color: "#a4a2a2",
- }
- }
- },
- yAxis: {
- axisLine: {
- lineStyle: {
- color: "#a4a2a2",
- }
- },
- splitLine: {
- show: true,
- lineStyle: {
- color:'rgba(128,126,126,0.25)'
- },
- },
- },
- label: {
- show: true,
- position: 'top',
- },
- textStyle: {
- color:'rgba(245,126,31,0.74)'
- },
- series: [
- {
- type: 'bar',
- itemStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
- offset: 1,
- color: 'rgba(54,131,122,0.84)'
- }, {
- offset: 0,
- color: 'rgba(15,227,202,0.54)'
- }]),
- }
- },
- }, {
- type: 'bar',
- itemStyle: {
- normal: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 1,
- color: 'rgba(70,52,38,0.84)'
- }, {
- offset: 0,
- color: 'rgba(245,126,31,0.54)'
- }]),
- }
- },
- },
- ]
- }
- }
- },
- created() {
- this.timingAcquisition()
- },
- methods: {
- timingAcquisition() {
- setInterval(() => {
- }, 10000)
- },
- }
- }
- </script>
|