Modify js charts
This commit is contained in:
parent
bbada45e84
commit
11c8c73319
|
@ -32,12 +32,7 @@ function updateChart() {
|
||||||
option = {
|
option = {
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
grid: grid,
|
grid: grid,
|
||||||
tooltip: {
|
tooltip: tooltip,
|
||||||
backgroundColor: tooltipBgColor,
|
|
||||||
order: "seriesDesc",
|
|
||||||
textStyle: textStyleMain,
|
|
||||||
trigger: "axis",
|
|
||||||
},
|
|
||||||
toolbox: toolboxParams,
|
toolbox: toolboxParams,
|
||||||
xAxis: {
|
xAxis: {
|
||||||
axisTick: axisTick,
|
axisTick: axisTick,
|
||||||
|
@ -54,7 +49,7 @@ function updateChart() {
|
||||||
fontSize: 12 * fontScale,
|
fontSize: 12 * fontScale,
|
||||||
color: textColor,
|
color: textColor,
|
||||||
formatter(value, index) {
|
formatter(value, index) {
|
||||||
return nFormatter(value, 0);
|
return nFormatter(value, 2);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
axisLine: axisLine,
|
axisLine: axisLine,
|
||||||
|
|
|
@ -51,7 +51,7 @@ function createTable(data) {
|
||||||
const tr = document.createElement("tr");
|
const tr = document.createElement("tr");
|
||||||
const checkbox = document.createElement("input");
|
const checkbox = document.createElement("input");
|
||||||
checkbox.type = "checkbox";
|
checkbox.type = "checkbox";
|
||||||
checkbox.checked = index < 5; // Check the top 5 rows by default
|
checkbox.checked = index < 1;
|
||||||
checkbox.addEventListener("change", function () {
|
checkbox.addEventListener("change", function () {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
checkedBoxes.push(row["country_name"]);
|
checkedBoxes.push(row["country_name"]);
|
||||||
|
|
|
@ -19,7 +19,7 @@ const tooltip = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const toolboxParams = {
|
const toolboxParams = {
|
||||||
itemSize: 8 * fontScale,
|
itemSize: 16 * fontScale,
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
top: "-1%",
|
top: "-1%",
|
||||||
right: "20%",
|
right: "20%",
|
||||||
|
|
Loading…
Reference in New Issue