add legend

This commit is contained in:
MuslemRahimi 2025-03-15 16:56:04 +01:00
parent 7dffc56fb6
commit 8d15e072a1
3 changed files with 30 additions and 4 deletions

View File

@ -102,9 +102,17 @@
title: {
text: null,
},
legend: {
enabled: false,
enabled: true,
align: "left", // Positions legend at the left edge
verticalAlign: "top", // Positions legend at the top
layout: "horizontal", // Align items horizontally (use 'vertical' if preferred)
itemStyle: {
color: $mode === "light" ? "black" : "white",
},
symbolWidth: 16, // Controls the width of the legend symbol
symbolRadius: 8, // Creates circular symbols (adjust radius as needed)
squareSymbol: false, // Ensures symbols are circular, not square
},
credits: {
enabled: false,

View File

@ -267,7 +267,16 @@
},
legend: {
enabled: false,
enabled: true,
align: "left", // Positions legend at the left edge
verticalAlign: "top", // Positions legend at the top
layout: "horizontal", // Align items horizontally (use 'vertical' if preferred)
itemStyle: {
color: $mode === "light" ? "black" : "white",
},
symbolWidth: 16, // Controls the width of the legend symbol
symbolRadius: 8, // Creates circular symbols (adjust radius as needed)
squareSymbol: false, // Ensures symbols are circular, not square
},
credits: {
enabled: false,

View File

@ -292,7 +292,16 @@
},
legend: {
enabled: false,
enabled: true,
align: "left", // Positions legend at the left edge
verticalAlign: "top", // Positions legend at the top
layout: "horizontal", // Align items horizontally (use 'vertical' if preferred)
itemStyle: {
color: $mode === "light" ? "black" : "white",
},
symbolWidth: 16, // Controls the width of the legend symbol
symbolRadius: 8, // Creates circular symbols (adjust radius as needed)
squareSymbol: false, // Ensures symbols are circular, not square
},
credits: {
enabled: false,