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 2022/11/07 03:31:19 UTC

[GitHub] [echarts] naqibRDMA opened a new issue, #17879: [Bug] Can't use "document.getElementById('main')" for echarts.init in Grafana (v9.1.8)

naqibRDMA opened a new issue, #17879:
URL: https://github.com/apache/echarts/issues/17879

   ### Version
   
   3.5.0
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   Creating the chart itself is not a problem. I've managed to use their bar charts and line graphs with ease and no issue. 
   The problem comes in when I wanted to add a click event for a drill down activity. In Grafana, I need to add the chart's DOM to echarts.init. Below are the code that I've taken from the website's official documentation:
   
   var chartDom = document.getElementById('main');
   var myChart = echarts.init(chartDom);
   myChart.on('click', function (event) { . . . }
   
   
   
   ### Current Behavior
   
   chartDom will always return NULL as there is no div tags with the id 'main' in Grafana.  Grafana will render the echart into a panel and I don't know which of it's id to initialize the echart.
   
   ### Expected Behavior
   
   document.getElementById('main') should not return NULL
   
   ### Environment
   
   ```markdown
   - Browser: Google Chrome
   - Grafana: v9.1.8
   - Apache ECharts: 3.5.0
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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.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] Ovilia commented on issue #17879: [Bug] Can't use "document.getElementById('main')" for echarts.init in Grafana (v9.1.8)

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

   This doesn't seem to be a problem related to Apache ECharts. You have to find a way to input the DOM element somehow with Grafana. I believe there are some Grafana ECharts plugins which you may have a look to find if they are helpful.


-- 
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] naqibRDMA closed issue #17879: [Bug] Can't use "document.getElementById('main')" for echarts.init in Grafana (v9.1.8)

Posted by GitBox <gi...@apache.org>.
naqibRDMA closed issue #17879: [Bug] Can't use "document.getElementById('main')" for echarts.init in Grafana (v9.1.8)
URL: https://github.com/apache/echarts/issues/17879


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