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/11/12 09:28:53 UTC

[GitHub] [echarts] 59637428 opened a new issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

59637428 opened a new issue #16061:
URL: https://github.com/apache/echarts/issues/16061


   ### Version
   5.2.1
   
   ### Steps to reproduce
   Use a line chart casually in vue3.x,Configure the legend, and click the legend on the chart  
   
   ### What is expected?
   the legend i can click and the line can hide or show
   
   ### What is actually happening?
   Uncaught TypeError: coordSys is undefined  
       render LineView.js:553  
       progress Chart.js:196  
       _doProgress task.js:187  
   
   ![image](https://user-images.githubusercontent.com/10785079/141444019-b5d96d35-7943-472a-acdd-0c0c09978270.png)
   
   
   <!-- 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] 59637428 edited a comment on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
59637428 edited a comment on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-966977252


   > Please provide an example that can reproduce your issue
   
   When I clicked legend for the first time, it can be hide the line, But when I click the second time I want to show the line, , it reports an error:  
   ![image](https://user-images.githubusercontent.com/10785079/141449283-e81e41e0-045f-4efd-9e60-d60917d41db7.png)
   ![image](https://user-images.githubusercontent.com/10785079/141449297-d359bf05-9c43-46e1-99d2-975bebe01e3f.png)
   


-- 
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] pissang commented on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-967072186


   You put chart instance in your data. It's similar with using `ref`. It's not necessary and bad for performance.


-- 
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] 59637428 commented on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
59637428 commented on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-966977252


   > Please provide an example that can reproduce your issue
   
   When I clicked legeng for the first time, it can be hide the line, But when I click the second time I want to show the line, , it reports an error:  
   ![image](https://user-images.githubusercontent.com/10785079/141449283-e81e41e0-045f-4efd-9e60-d60917d41db7.png)
   ![image](https://user-images.githubusercontent.com/10785079/141449297-d359bf05-9c43-46e1-99d2-975bebe01e3f.png)
   


-- 
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 #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

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


   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](https://echarts.apache.org/api.html) and [chart option](https://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 to our [mailing list](https://echarts.apache.org/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


[GitHub] [echarts] 59637428 edited a comment on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
59637428 edited a comment on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-966954910


   this is my code:  
   
   
                   myChart.setOption({
                       title: {
                           text: 'Stacked Line'
                       },
                       tooltip: {
                           trigger: 'axis'
                       },
                       legend: {
                           data: ['Email', 'Union Ads']
                       },
                       grid: {
                           left: '3%',
                           right: '4%',
                           bottom: '3%',
                           containLabel: true
                       },
                       toolbox: {
                           feature: {
                               saveAsImage: {}
                           }
                       },
                       xAxis: {
                           type: 'category',
                           boundaryGap: false,
                           data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
                       },
                       yAxis: {
                           type: 'value'
                       },
                       series: [
                           {
                               name: 'Email',
                               type: 'line',
                               coordinateSystem: 'cartesian2d',
                               data: [120, 132, 101, 134, 90, 230, 210]
                           },
                           {
                               name: 'Union Ads',
                               type: 'line',
                               coordinateSystem: 'cartesian2d',
                               data: [220, 182, 191, 234, 290, 330, 310]
                           },
                       ]
                   });
               },


-- 
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] 59637428 commented on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
59637428 commented on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-966970102


   > Try using `shallowRef` instead of `ref` on the chart instance
   
   This is a test example, in this example I did not use ref


-- 
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] pissang edited a comment on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-967072186


   The chart instance is in your data. It's similar with using `ref`. It's not necessary and bad for performance because vue will proxy all properties in this chart instance recursively.


-- 
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] pissang commented on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-966968344


   Try using `shallowRef` instead of `ref` on the chart instance


-- 
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 #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

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


   @59637428 Please provide a minimum reproducible demo for the issue either with https://codepen.io/Ovilia/pen/dyYWXWM , https://www.makeapie.com/editor.html or https://codesandbox.io/s/mystifying-bash-2uthz.
   
   *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.


-- 
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] 59637428 commented on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
59637428 commented on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-966954910


   this is my code:  
   `initEnuChart() {
                   const chartDOM = document.getElementById('enuChart');
                   this.defoMoni.enuChart = echarts.init(chartDOM);
   
                   this.defoMoni.enuChart.setOption({
                       title: {
                           text: 'Stacked Line'
                       },
                       tooltip: {
                           trigger: 'axis'
                       },
                       legend: {
                           data: ['Email', 'Union Ads']
                       },
                       grid: {
                           left: '3%',
                           right: '4%',
                           bottom: '3%',
                           containLabel: true
                       },
                       toolbox: {
                           feature: {
                               saveAsImage: {}
                           }
                       },
                       xAxis: {
                           type: 'category',
                           boundaryGap: false,
                           data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
                       },
                       yAxis: {
                           type: 'value'
                       },
                       series: [
                           {
                               name: 'Email',
                               type: 'line',
                               coordinateSystem: 'cartesian2d',
                               data: [120, 132, 101, 134, 90, 230, 210]
                           },
                           {
                               name: 'Union Ads',
                               type: 'line',
                               coordinateSystem: 'cartesian2d',
                               data: [220, 182, 191, 234, 290, 330, 310]
                           },
                       ]
                   });
               },`


-- 
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] pissang edited a comment on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-967072186


   You put chart instance in your data. It's similar with using `ref`. It's not necessary and bad for performance because vue will proxy all properties in this chart instance recursively.


-- 
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] pissang closed issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

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


   


-- 
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] 59637428 commented on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
59637428 commented on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-966972892


   > Please provide an example that can reproduce your issue
   
   ```
   <template>
       <a-spin :spinning="loading" :delay="delay">
           <div id="demo-chart" style="width: 1200px;height: 500px;"></div>
       </a-spin>
   </template>
   
   <script>
       import * as echarts from 'echarts';
   
       export default {
           name: "page4",
           data() {
               return {
                   chart: null,
                   option: null,
                   loading: true,
                   delay: 50,
               }
           },
           created() {
               console.log("created")
           },
           mounted() {
               console.log("mounted")
               this.initCharts();
               let vm = this;
               setTimeout(function () {
                   vm.loading = false;
               }, 3000);
           },
           methods: {
               initCharts() {
                   let el = document.getElementById('demo-chart');
                   this.chart = echarts.init(el);
                   this.option = {
                       legend: {
                           data: ['Email']
                       },
                       xAxis: {
                           type: 'category',
                           data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
                       },
                       yAxis: {
                           type: 'value'
                       },
                       series: [
                           {
                               name: 'Email',
                               data: [150, 230, 224, 218, 135, 147, 260],
                               type: 'line'
                           }
                       ]
                   };
                   this.chart.setOption(this.option);
               },
           },
           setup() {
   
           },
   
       }
   </script>
   
   <style lang="scss" scoped>
   
   </style>
   ```  
   
   this is the code, thanks


-- 
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] pissang commented on issue #16061: vue3.x & echartsV5.2.1, when i click the [ legend ] which on the chart, Console error: coordSys is undefined

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #16061:
URL: https://github.com/apache/echarts/issues/16061#issuecomment-966971490


   Please provide an example that can reproduce your issue


-- 
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