Modify js charts

This commit is contained in:
Sam 2024-08-09 00:07:23 +01:00
parent bbada45e84
commit 11c8c73319
3 changed files with 4 additions and 9 deletions

View File

@ -32,12 +32,7 @@ function updateChart() {
option = {
backgroundColor: backgroundColor,
grid: grid,
tooltip: {
backgroundColor: tooltipBgColor,
order: "seriesDesc",
textStyle: textStyleMain,
trigger: "axis",
},
tooltip: tooltip,
toolbox: toolboxParams,
xAxis: {
axisTick: axisTick,
@ -54,7 +49,7 @@ function updateChart() {
fontSize: 12 * fontScale,
color: textColor,
formatter(value, index) {
return nFormatter(value, 0);
return nFormatter(value, 2);
},
},
axisLine: axisLine,

View File

@ -51,7 +51,7 @@ function createTable(data) {
const tr = document.createElement("tr");
const checkbox = document.createElement("input");
checkbox.type = "checkbox";
checkbox.checked = index < 5; // Check the top 5 rows by default
checkbox.checked = index < 1;
checkbox.addEventListener("change", function () {
if (this.checked) {
checkedBoxes.push(row["country_name"]);

View File

@ -19,7 +19,7 @@ const tooltip = {
};
const toolboxParams = {
itemSize: 8 * fontScale,
itemSize: 16 * fontScale,
showTitle: true,
top: "-1%",
right: "20%",