开发者

defining highcharts in body

开发者 https://www.devze.com 2023-03-17 05:19 出处:网络
I\'m trying to use highcharts in my system but the limitation of having to define the entire content and style of the highchart object in the < head > is destroying my architecture.

I'm trying to use highcharts in my system but the limitation of having to define the entire content and style of the highchart object in the < head > is destroying my architecture. Is there a way I could describe the highchart object < script > section within the body?

http://www.highcharts.com/demo/

I did a bunch of experiments and with a flat html file I managed to just put the < script > inside < body > 开发者_C百科and defined the < div id="container" >< /div > right below it and that worked. For some unknown reason though when I try the same trick in my php system (which cuts and pastes various section of the html together to produce the final page, it does not work.

Any ideas?


You can place the content and style definition in an external file, and simply reference it in the document head:

<script src="url_to_your_file.js"></script>
0

精彩评论

暂无评论...
验证码 换一张
取 消