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/04/23 13:16:40 UTC

[GitHub] [echarts] galrub opened a new issue #14776: TypeScript: error when creating a CandlestickSeriesOption

galrub opened a new issue #14776:
URL: https://github.com/apache/echarts/issues/14776


   ### Version
   5.0.2
   
   ### Steps to reproduce
   using typescript, create an echarts chart (I am using vuejs/vue-echarts) , using the options from the simple candlestick example
     {
       xAxis: {
           data: ['2017-10-24', '2017-10-25', '2017-10-26', '2017-10-27']
       },
       yAxis: {},
       series: [{
           type: 'k',
           data: [
               [20, 34, 10,38],
               [40, 35, 30, 50],
               [31, 38, 33, 44],
               [38, 15, 5, 42]
           ]
       }]
   }
   
   ### What is expected?
   should see the simple example chart, like the simple pie chart example
   
   ### What is actually happening?
   see nothing:
   getting a  'TypeError: Cannot read property 'get' of undefined' error in the console
   
   ---
   error trace:
   TypeError: Cannot read property 'get' of undefined
       at CandlestickSeriesModel.WhiskerBoxCommonMixin.getInitialData (whiskerBoxCommon.js?d851:65)
       at CandlestickSeriesModel.SeriesModel.init (Series.js?bbbc:98)
       at GlobalModel.eval (Global.js?96f4:271)
       at Array.forEach (<anonymous>)
       at each (util.js?f160:206)
       at GlobalModel.visitComponent (Global.js?96f4:235)
       at Function.entity.topologicalTravel (component.js?dff2:122)
       at GlobalModel._mergeOption (Global.js?96f4:216)
       at initBase (Global.js?96f4:672)
       at GlobalModel._resetOption (Global.js?96f4:128)
   
   line throwing the error:
    WhiskerBoxCommonMixin.prototype.getInitialData = function (option, ecModel) {
       // When both types of xAxis and yAxis are 'value', layout is
       // needed to be specified by user. Otherwise, layout can be
       // judged by which axis is category.
       var ordinalMeta;
       var xAxisModel = ecModel.getComponent('xAxis', this.get('xAxisIndex'));
       var yAxisModel = ecModel.getComponent('yAxis', this.get('yAxisIndex'));
       **var xAxisType = xAxisModel.get('type'); // <-- this line: xAxisModel is undefined**
       var yAxisType = yAxisModel.get('type'); 
   
   and, also, other examples, like pie chart, work without any issue, this issue happens only in CandlestickSeriesOption, as far as I can tell
   
   <!-- 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.

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] plainheart edited a comment on issue #14776: TypeScript: error when creating a CandlestickSeriesOption

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


   Have you imported the `GridComponent` from `echarts/components`?


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

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] plainheart removed a comment on issue #14776: TypeScript: error when creating a CandlestickSeriesOption

Posted by GitBox <gi...@apache.org>.
plainheart removed a comment on issue #14776:
URL: https://github.com/apache/echarts/issues/14776#issuecomment-825672044


   Have you imported the `GridComponent` from `echarts/core`?


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

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 #14776: TypeScript: error when creating a CandlestickSeriesOption

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


   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.

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] galrub edited a comment on issue #14776: TypeScript: error when creating a CandlestickSeriesOption

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


   Yes, that's it!
   Many thanks, closing this issue, it actually from echarts/components


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

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] galrub commented on issue #14776: TypeScript: error when creating a CandlestickSeriesOption

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


   Yes, that's it!
   Many thanks, closing this 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.

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] galrub closed issue #14776: TypeScript: error when creating a CandlestickSeriesOption

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


   


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

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] plainheart commented on issue #14776: TypeScript: error when creating a CandlestickSeriesOption

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


   Have you imported the `GridComponent` from `echarts/core`?


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

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] plainheart commented on issue #14776: TypeScript: error when creating a CandlestickSeriesOption

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


   Have you imported the `GridComponent` from `echarts/core`?


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

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