Highslide sometimes is not able to return its DIV, causing the view to be empty

孤者浪人 提交于 2020-01-06 18:11:19

问题


I have noticed that at random, when I click to open a view (I open highcharts inside HS), I get a blank view.

Checking the data, and everything is fine, but for some reason, the view is empty. I did a bit of debugging and I found that the issue is where I pass the renderTo to the chart:

chartOptions.chart.renderTo= $('.highslide-body')[IDchart];

while debugging, sometimes the renderTo is undefined; so I am trying to troubleshoot this and figure out what is actually wrong.

the IDChart is always supplied; I have 10 charts; so in the click event of the chart I pass the chart id

IDchart=this.container.parentElement.getAttribute("data-highcharts-chart");

So from what I understand; if there are 10 charts on a page, and I click on the second, the highslide-body div has to be 2; 3 if I click on the 3rd chart and so on.

I am using this fiddle as guideline about how to open a HC in HS: jsfiddle.net/newbiez/AeFp3/

Altho this uses just one chart.

Has anyone ever experienced such issue with HS not rendering the content?

来源:https://stackoverflow.com/questions/25238430/highslide-sometimes-is-not-able-to-return-its-div-causing-the-view-to-be-empty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!