Files
YunNanProject/static/js/data/index.js
2025-09-11 15:16:13 +08:00

144 lines
3.8 KiB
JavaScript

option_1_1 = {
grid: { left: 0, right: 0, top: 40, bottom: 10, containLabel: true },
textStyle: { color: "#fff" },
tooltip: {
trigger: "axis",
axisPointer: { type: "cross", crossStyle: { color: "#999" } },
textStyle: { color: "#fff" },
backgroundColor: "rgba(96,98,102,0.8)",
borderColor: "rgba(255,255,255,0.3)",
borderWidth: 1,
},
legend: {
data: ["城区", "镇区", "乡村", "总入园数", "2022年基数"],
top: 0,
textStyle: { color: "#fff" },
icon: "roundRect",
itemWidth: 12,
itemHeight: 12,
},
xAxis: [
{
type: "category",
data: [],
axisPointer: { type: "shadow" },
axisLine: { lineStyle: { color: "#fff" } },
axisLabel: { color: "#fff" },
nameTextStyle: { color: "#fff" },
},
],
yAxis: [
{ type: "value", axisLabel: { formatter: "{value}", color: "#fff" } },
{ type: "value", axisLabel: { formatter: "{value}", color: "#fff" } },
],
series: [
{
name: "城区",
type: "bar",
data: [],
tooltip: { valueFormatter: (v) => v + " 万人" },
itemStyle: { borderRadius: [6, 6, 0, 0] },
},
{
name: "镇区",
type: "bar",
data: [],
tooltip: { valueFormatter: (v) => v + " 万人" },
itemStyle: { borderRadius: [6, 6, 0, 0] },
},
{
name: "乡村",
type: "bar",
data: [],
tooltip: { valueFormatter: (v) => v + " 万人" },
itemStyle: { borderRadius: [6, 6, 0, 0] },
},
{
name: "总入园数",
type: "line",
yAxisIndex: 1,
data: [],
tooltip: { valueFormatter: (v) => v + " 万人" },
},
{
name: "2022年基数",
type: "line",
yAxisIndex: 1,
data: [],
tooltip: { valueFormatter: (v) => typeof v === "number" ? v + " 万人" : v },
},
],
};
option_1_2 = {
grid: { left: 0, right: 0, top: 40, bottom: 10, containLabel: true },
textStyle: { color: "#fff" },
tooltip: {
trigger: "axis",
axisPointer: { type: "cross", crossStyle: { color: "#999" } },
textStyle: { color: "#fff" },
backgroundColor: "rgba(96,98,102,0.8)",
borderColor: "rgba(255,255,255,0.3)",
borderWidth: 1,
},
legend: {
data: ["城区", "镇区", "乡村", "总在园数", "2022年基数"],
top: 0,
textStyle: { color: "#fff" },
icon: "roundRect",
itemWidth: 12,
itemHeight: 12,
},
xAxis: [
{
type: "category",
data: [],
axisPointer: { type: "shadow" },
axisLine: { lineStyle: { color: "#fff" } },
axisLabel: { color: "#fff" },
nameTextStyle: { color: "#fff" },
},
],
yAxis: [
{ type: "value", axisLabel: { formatter: "{value}", color: "#fff" } },
{ type: "value", axisLabel: { formatter: "{value}", color: "#fff" } },
],
series: [
{
name: "城区",
type: "bar",
data: [],
tooltip: { valueFormatter: (v) => v + " 万人" },
itemStyle: { borderRadius: [6, 6, 0, 0] },
},
{
name: "镇区",
type: "bar",
data: [],
tooltip: { valueFormatter: (v) => v + " 万人" },
itemStyle: { borderRadius: [6, 6, 0, 0] },
},
{
name: "乡村",
type: "bar",
data: [],
tooltip: { valueFormatter: (v) => v + " 万人" },
itemStyle: { borderRadius: [6, 6, 0, 0] },
},
{
name: "总在园数",
type: "line",
yAxisIndex: 1,
data: [],
tooltip: { valueFormatter: (v) => v + " 万人" },
},
{
name: "2022年基数",
type: "line",
yAxisIndex: 1,
data: [],
tooltip: { valueFormatter: (v) => typeof v === "number" ? v + " 万人" : v },
},
],
};