
本气象风速时序图充分体现 Highcharts 面向长时序监测场景的完整可视化能力解决长时间序列展示拥挤、分级标准不直观、时间轴构造繁琐等痛点。HTML 代码!DOCTYPE html html langzh-CN head meta charsetUTF-8 meta nameviewport contentwidthdevice-width, initial-scale1.0 title单日风速时序监测折线图/title script srchttps://code.highcharts.com/highcharts.js/script style #container { width: 100%; height: 80vh; } /style /head body div idcontainer/div script // 数据来源挪威气象监测站点 Highcharts.chart(container, { chart: { type: spline, // 横向滚动画布最小宽度600默认靠右显示 scrollablePlotArea: { minWidth: 600, scrollPositionX: 1 } }, title: { text: 单日24小时风速变化曲线, align: left }, subtitle: { text: 2024年2月29日 挪威维克两处气象监测点数据, align: left }, xAxis: { type: datetime, labels: { overflow: justify } }, yAxis: { title: { text: 风速 (米/秒) }, minorGridLineWidth: 0, gridLineWidth: 0, alternateGridColor: null, // 风力等级分层背景色带 plotBands: [{ // 软风 from: 0.3, to: 1.5, color: rgba(68, 170, 213, 0.1), label: { text: 软风, style: { opacity: 0.7 } } }, { // 轻风 from: 1.5, to: 3.3, color: rgba(0, 0, 0, 0), label: { text: 轻风, style: { opacity: 0.7 } } }, { // 微风 from: 3.3, to: 5.5, color: rgba(68, 170, 213, 0.1), label: { text: 微风, style: { opacity: 0.7 } } }, { // 和风 from: 5.5, to: 8, color: rgba(0, 0, 0, 0), label: { text: 和风, style: { opacity: 0.7 } } }, { // 清风 from: 8, to: 11, color: rgba(68, 170, 213, 0.1), label: { text: 清风, style: { opacity: 0.7 } } }, { // 强风 from: 11, to: 14, color: rgba(0, 0, 0, 0), label: { text: 强风, style: { opacity: 0.7 } } }, { // 疾风 from: 14, to: 17, color: rgba(68, 170, 213, 0.1), label: { text: 疾风, style: { opacity: 0.7 } } }, { // 大风 from: 17, to: 20.5, color: rgba(0, 0, 0, 0), label: { text: 大风, style: { opacity: 0.7 } } }, { // 烈风 from: 20.5, to: 24, color: rgba(68, 170, 213, 0.1), label: { text: 烈风, style: { opacity: 0.7 } } }] }, tooltip: { valueSuffix: m/s }, plotOptions: { spline: { lineWidth: 4, states: { hover: { lineWidth: 5 } }, marker: { enabled: false }, pointInterval: 3600000, // 数据间隔1小时 pointStart: 2014-02-29 } }, series: [{ name: 赫斯塔沃伦监测点, data: [ 12.9, 13.8, 10.2, 8.4, 10.0, 9.2, 10.0, 12.2, 13.2, 12.7, 12.5, 11.4, 10.4, 7.9, 8.0, 11.4, 11.5, 12.0, 12.0, 10.4, 11.2, 11.5, 12.2, 11.5, 8.3 ] }, { name: 维克监测点, data: [ null, 1.3, 1.1, 0.8, 1.8, 1.7, 0.8, 0.8, 1.0, 1.0, 1.0, 0.8, 1.4, 1.3, 2.9, 6.1, 6.4, 6.6, 6.4, 6.3, 5.4, 3.9, 3.0, 1.7, 1.4 ] }], navigation: { menuItemStyle: { fontSize: 10px } } }); /script /body /html图表类型可横向滚动平滑时序折线图spline适配长时间跨度气象、环境监测时序数据支持横向滚动浏览超长时间序列Y 轴多层分段背景带标注分级标准。核心功能拆解超长时序横向滚动画布scrollablePlotArea开启横向滚动当窗口宽度不足容纳全部时间点时底部自动出现横向滚动条适合 24 小时、多日连续监测数据。Y 轴多级风力分级背景带 plotBands按风速区间划分 9 档风力等级交替淡蓝色底色区分区间同时附带文字标注无需记忆风力标准直观判断当前风力等级。小时粒度固定时序数据pointInterval: 3600000固定数据间隔 1 小时pointStart指定起始时间无需手动填充时间轴数组自动生成连续时间刻度。双站点对比曲线 两组监测点位数据同图展示支持空值null自动断点平滑曲线无突兀折线关闭数据圆点画面简洁干净。悬浮提示带单位 鼠标悬浮显示精确风速 单位 m/shover 时线条自动加粗突出。精简坐标轴网格 关闭次要网格、纵向网格线仅保留分级底色视觉清爽适合气象大屏。适用业务场景气象站风速、温度、降雨量时序监测环境传感器长时间连续采集数据展示水文、风力发电场全天工况监控物联网设备 24 小时运行指标趋势超长时序历史数据报表支持横向滚动Highcharts原生支持横向滚动时序画布通过 plotBands 实现多层分级底色标注内置 datetime 时间轴自动生成小时刻度固定时间间隔快速批量录入监测数据双系列曲线对比、空值自动兼容轻量化适配气象、物联网长时间监测大屏。