/* * @Author: your name * @Date: 2024-11-20 09:13:21 * @LastEditTime: 2024-11-27 17:39:46 * @LastEditors: bogon * @Description: In User Settings Edit * @FilePath: /performance-test/src/assets/js/constants/echarts-config/Heatmap.js */ //Heatmap-热力图 // 风速随时间和风向的分布 import { colorPalette } from "../color"; export const option = { color: colorPalette, // 使用 colorPalette 作为颜色设置 title: { text: "风速随时间和风向的分布", }, tooltip: { position: "top", }, legend: { top: "bottom", }, toolbox: { feature: { dataView: { show: true, readOnly: false }, restore: { show: true }, saveAsImage: { show: true }, }, }, xAxis: { type: "category", data: ["00:00", "01:00", "02:00", "03:00"], // 时间 name: "时间", }, yAxis: { data: ["0°", "90°", "180°", "270°"], // 风向 name: "风向", }, visualMap: { calculable: true, realtime: false, orient: "vertical", right: 20, top: "center", color: ["#0d59b7", "#bee8ff"], }, series: [ { // name: "风速", type: "heatmap", data: [ [0, 0, 5], [1, 0, 10], [2, 0, 15], [0, 1, 7], [1, 1, 8], [2, 1, 12], ], // [x, y, 风速值] emphasis: { itemStyle: { shadowBlur: 10, shadowColor: "rgba(0, 0, 0, 0.5)", }, }, }, ], };