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 2020/04/09 08:10:54 UTC

[GitHub] [incubator-echarts] Jayesh23 opened a new issue #12407: Graph options : TypeError: el is undefined

Jayesh23 opened a new issue #12407: Graph options : TypeError: el is undefined
URL: https://github.com/apache/incubator-echarts/issues/12407
 
 
   ### Version
   4.7.0
   
   ### Steps to reproduce
   import ReactEchartsCore from "echarts-for-react/lib/core";
   
   <ReactEchartsCore
   							ref={refRef}
   							echarts={echarts}
   							style={{ height: "100vh", left: 0, top: 0, width: "100%" }}
   							option={/* a function which returns an Echarts option to generate a timseries graph */}
   							onEvents={{
   								click: propertyTable,
   								// contextmenu: Playground
   							}}
   						/>
   When i try to set series.fixed : true
   i get an error :- TypeError: el is undefined
   
   its working fine when fixed is set to false.
   
   However when i push the output of the code manually to the ReactEchartsCore option it renders the graph, 
   I have cross checked by replacing the option in the apache echarts site also it renders the graph there as well.
   
   ### What is expected?
   A timeseries graph i.e i have a let's say data of 10 timestamps and for each timestamp i have data for 11 nodes, i just want to fix the position of all the nodes for each time stamp.
   
   ### What is actually happening?
   Not able to get the timeseries graph when trying to directly pass option through a function to the ReactEchartsCore option.
   
   <!-- 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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] Ovilia commented on issue #12407: Graph options : TypeError: el is undefined

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #12407: Graph options : TypeError: el is undefined
URL: https://github.com/apache/incubator-echarts/issues/12407#issuecomment-613256302
 
 
   @Jayesh23 Could you please simplifier with minimum data your demo so that it's easier to debug? 

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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12407: Graph options : TypeError: el is undefined

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12407: Graph options : TypeError: el is undefined
URL: https://github.com/apache/incubator-echarts/issues/12407#issuecomment-611394345
 
 
   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 **you have posted enough image to demo your request**. 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 questions.
   
   If you are interested in the project, you may also subscribe our [mail 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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #12407: Graph options : TypeError: el is undefined

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


   It should have been fixed in the latest version


-- 
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] [incubator-echarts] Ovilia commented on issue #12407: Graph options : TypeError: el is undefined

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #12407: Graph options : TypeError: el is undefined
URL: https://github.com/apache/incubator-echarts/issues/12407#issuecomment-614391782
 
 
   ECharts doesn't have such API as `var el = edge.getGraphicEl();`. Where do you find it?
   Perhaps it's provided from thiry-party libraries such as the react echarts framework you are using? If this is the case, please ask in there project's 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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12407: Graph options : TypeError: el is undefined

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12407: Graph options : TypeError: el is undefined
URL: https://github.com/apache/incubator-echarts/issues/12407#issuecomment-612345619
 
 
   @Jayesh23 Please provide a demo for the issue either with https://jsfiddle.net/ovilia/n6xc4df3/ or https://gallery.echartsjs.com/editor.html.

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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] Jayesh23 commented on issue #12407: Graph options : TypeError: el is undefined

Posted by GitBox <gi...@apache.org>.
Jayesh23 commented on issue #12407: Graph options : TypeError: el is undefined
URL: https://github.com/apache/incubator-echarts/issues/12407#issuecomment-613301576
 
 
   updated please check.
   https://gallery.echartsjs.com/editor.html?c=xZ9kqwdwb4&v=2 
   

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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] Jayesh23 commented on issue #12407: Graph options : TypeError: el is undefined

Posted by GitBox <gi...@apache.org>.
Jayesh23 commented on issue #12407: Graph options : TypeError: el is undefined
URL: https://github.com/apache/incubator-echarts/issues/12407#issuecomment-612791710
 
 
   https://gallery.echartsjs.com/editor.html?c=xZ9kqwdwb4&v=1
   
   I have added my option object in this link.
   
   But just to clarify :-
   If i pass the option object stored in a variable directly to echarts it works,
   but what I basically need to do is, an api data is passed to a function, which modifies that data according to the charts input and generated an option object which i am passing directly to echarts option, This is where I get the error.
   
   Also the echarts object attached in the above link is the exact output of the function which modifies the api data for me.

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


With regards,
Apache Git Services

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


[GitHub] [echarts] alexresolute commented on issue #12407: Graph options : TypeError: el is undefined

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


   I am having this same issue for the record. Any thoughts from anyone? Seems to be specific to usage with react...


-- 
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] [incubator-echarts] Jayesh23 closed issue #12407: Graph options : TypeError: el is undefined

Posted by GitBox <gi...@apache.org>.
Jayesh23 closed issue #12407: Graph options : TypeError: el is undefined
URL: https://github.com/apache/incubator-echarts/issues/12407
 
 
   

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


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] zd5043039119 commented on issue #12407: Graph options : TypeError: el is undefined

Posted by GitBox <gi...@apache.org>.
zd5043039119 commented on issue #12407:
URL: https://github.com/apache/incubator-echarts/issues/12407#issuecomment-693812285


   Hi @Ovilia 
   I believe Jayesh23 means the code in GraphView.js, line 181
   ```javascript
    data.graph.eachEdge(function (edge) {
               var el = edge.getGraphicEl();
   
               el[FOCUS_ADJACENCY] && el.off('mouseover', el[FOCUS_ADJACENCY]);
               el[UNFOCUS_ADJACENCY] && el.off('mouseout', el[UNFOCUS_ADJACENCY]);
   
               if (edge.getModel().get('focusNodeAdjacency')) {
                   el.on('mouseover', el[FOCUS_ADJACENCY] = function () {
                       graphView._clearTimer();
                       api.dispatchAction({
                           type: 'focusNodeAdjacency',
                           seriesId: seriesModel.id,
                           edgeDataIndex: edge.dataIndex
                       });
                   });
                   el.on('mouseout', el[UNFOCUS_ADJACENCY] = function () {
                       graphView._dispatchUnfocus(api);
                   });
               }
           });
   ```
   
   When set the node property fixed = true, it will happens when use the demo
   https://echarts.apache.org/examples/zh/editor.html?c=graph-force
   and change add 1 line like 
   ```javascript
       graph.nodes.forEach(function (node) {
           node.itemStyle = null;
           node.symbolSize = 10;
           node.value = node.symbolSize;
           node.category = node.attributes.modularity_class;
           // Use random x, y
           node.x = node.y = null;
           node.draggable = true;
           node.fixed = true;    // add this line 
       });
   ```
   it will throw the exception
   ```
   VM186 echarts.min.js:22 Uncaught TypeError: Cannot read property '__focusNodeAdjacency' of undefined
       at VM186 echarts.min.js:22
       at $_.J_.eachEdge (VM186 echarts.min.js:22)
       at e.render (VM186 echarts.min.js:22)
       at jh.progress (VM186 echarts.min.js:22)
       at ac (VM186 echarts.min.js:22)
       at jh.qh.perform (VM186 echarts.min.js:22)
       at VM186 echarts.min.js:22
       at e.<anonymous> (VM186 echarts.min.js:22)
       at Array.forEach (<anonymous>)
       at R (VM186 echarts.min.js:22)
   ```


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