日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

highcharts 动态生成x轴和折线图

發布時間:2024/1/17 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 highcharts 动态生成x轴和折线图 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

highchart 動態生成x軸和折線圖

<!DOCTYPE HTML> <html><head><meta charset="utf-8"><link rel="icon" href="https://static.jianshukeji.com/highcharts/images/favicon.ico"><meta name="viewport" content="width=device-width, initial-scale=1"><style>/* css 代碼 */</style><script src="https://img.hcharts.cn/highcharts/highcharts.js"></script><script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script><script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script></head><body><div id="container" style="min-width:400px;height:400px"></div><script>var chart = new Highcharts.Chart('container', {title: {text: '不同城市的月平均氣溫',x: -20},subtitle: {text: '數據來源: WorldClimate.com',x: -20},xAxis: {categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']},yAxis: {title: {text: '溫度 (°C)'},plotLines: [{value: 0,width: 1,color: '#808080'}]},tooltip: {valueSuffix: '°C'},legend: {layout: 'vertical',align: 'right',verticalAlign: 'middle',borderWidth: 0},series: []});chart.xAxis[0].categories = ['1月', '2月', '3月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];var series = chart.addSeries({name: '紐約',data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]}, true);var series = chart.addSeries({name: '紐約2',data: [-0.3, 0.89, 6.7, 21.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 9.6, 12.5]}, true); </script></body> </html>

?

參考:

??[已解決] HighStock如何動態添加數據組
https://bbs.hcharts.cn/thread-43-1-1.html

?

轉載于:https://www.cnblogs.com/zhao1949/p/6927041.html

總結

以上是生活随笔為你收集整理的highcharts 动态生成x轴和折线图的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。