123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import { colorPalette } from "../color";
- export const option = {
- color: colorPalette,
- title: {
- text: "风速分布",
- },
- xAxis: {
- name: "风向 (°)",
- type: "category",
- },
- yAxis: {
- name: "风速 (m/s)",
- type: "value",
- },
- legend: {
- top: "bottom",
- },
- toolbox: {
- feature: {
- dataView: { show: true, readOnly: false },
- // magicType: { show: true, type: ["line", "bar"] },
- restore: { show: true },
- saveAsImage: { show: true },
- },
- },
- series: [
- {
- name: "风速分布",
- type: "scatter",
- data: [
- ["145", "5"],
- ["90", "10"],
- ["80", "7"],
- ["270", "12"],
- ], // [风向, 风速, 数据点大小]
- // symbolSize: (data) => data[2], // 根据大小调整气泡尺寸
- renderMode: "webgl", // 启用 WebGL 渲染
- itemStyle: {
- shadowBlur: 10,
- shadowColor: "rgba(25, 100, 150, 0.5)",
- shadowOffsetY: 5,
- },
- },
- ],
- tooltip: {
- trigger: "item",
- },
- };
|