You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/08/11 10:35:14 UTC

[GitHub] [echarts] silencesky001 opened a new issue #15508: Bar Race label all display 0

silencesky001 opened a new issue #15508:
URL: https://github.com/apache/echarts/issues/15508


   ### Version
   5.1.2
   
   ### Steps to reproduce
   vue component like this:
   
   <template>
     <div :style="{height:height,width:width}" />
   </template>
   
   <script>
   import * as echarts from 'echarts';
   //require('echarts/theme/macarons') // echarts theme
   import resize from './mixins/resize'
   
   export default {
     mixins: [resize],
     props: {
       className: {
         type: String,
         default: 'chart'
       },
       width: {
         type: String,
         default: '100%'
       },
       height: {
         type: String,
         default: '230px'
       },
       autoResize: {
         type: Boolean,
         default: true
       },
       chartData: {
         type: Object,
         required: true
       }
     },
     data () {
       return {
         chart: null,
         realtimedata: [0.9, 0.33, 0.35, 0.2, 0.65],
       }
     },
     watch: {
       chartData: {
         deep: true,
         handler (val) {
           this.setOptions(val)
         }
       }
     },
     mounted () {
       this.$nextTick(() => {
         this.initChart()
       })
     },
     beforeDestroy () {
       if (!this.chart) {
         return
       }
       this.chart.dispose()
       this.chart = null
     },
     methods: {
       initChart () {
         this.chart = echarts.init(this.$el)
         this.setOptions(this.chartData)
       },
       setOptions ({ } = {}) {
         this.chart.setOption({
           grid: {
             x: 5,
             y: 5,
             x2: 40,
             y2: 5,
             containLabel: true
           },
           xAxis: {
             max: 'dataMax',
           },
           yAxis: {
             type: 'category',
             data: ['1-1号', '1-2号', '2-3号', '2-1号', '3-1号'],
             inverse: true,
             animationDuration: 0,
             // animationDurationUpdate: 300,
             max: 4 // only the largest 3 bars will be displayed
           },
           series: [{
             realtimeSort: true,
             name: 'X',
             type: 'bar',
             data: this.realtimedata,
             label: {
               show: true,
               position: 'right',
               valueAnimation: true
             }
           }],
           legend: {
             show: false
           },
           animationDuration: 300,
           animationDurationUpdate: 300,
           animationEasing: 'linear',
           animationEasingUpdate: 'linear'
         })
       }
     }
   }
   </script>
   
   ### What is expected?
   all label display the  right number
   
   ### What is actually happening?
   if the chart resized the label display right number,but if don't resize just static disply the chart ,all label is 0.
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] silencesky001 closed issue #15508: Bar Race label all display 0

Posted by GitBox <gi...@apache.org>.
silencesky001 closed issue #15508:
URL: https://github.com/apache/echarts/issues/15508


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on issue #15508: Bar Race label all display 0

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15508:
URL: https://github.com/apache/echarts/issues/15508#issuecomment-896709530


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org