| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- /*
- * @Author: your name
- * @Date: 2024-11-20 09:14:10
- * @LastEditTime: 2024-11-27 17:06:24
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/assets/js/constants/echarts-config/boxPlot.js
- */
- //箱线图-boxPlot
- //不同季节的风速分布
- import { colorPalette } from "../color";
- export const option = {
- color: colorPalette,
- title: {
- text: "季节的风速分布",
- },
- tooltip: {
- trigger: "item",
- },
- legend: {
- top: "bottom",
- },
- toolbox: {
- feature: {
- dataView: { show: true, readOnly: false },
- // magicType: { show: true, type: ["line", "bar"] },
- restore: { show: true },
- saveAsImage: { show: true },
- },
- },
- dataZoom: [
- {
- type: "inside",
- xAxisIndex: [0, 1],
- start: 0,
- end: 100,
- },
- {
- show: true,
- xAxisIndex: [0, 1],
- type: "slider",
- bottom: 10,
- start: 0,
- end: 100,
- },
- ],
- xAxis: {
- type: "category",
- data: ["春季", "夏季", "秋季", "冬季"],
- name: "季节",
- },
- yAxis: {
- type: "value",
- name: "风速 (m/s)",
- },
- series: [
- {
- name: "风速分布",
- type: "boxplot",
- data: [
- [1.5, 5, 7, 12, 20], // 最小值, Q1, 中位数, Q3, 最大值
- [2, 6, 8, 14, 22],
- [1, 4, 6, 10, 18],
- [0.5, 3, 5, 8, 15],
- ],
- },
- ],
- };
|