ui fix
This commit is contained in:
parent
7d6b2e9277
commit
9ae13bd5eb
@ -60,8 +60,8 @@
|
|||||||
const options = {
|
const options = {
|
||||||
animation: false,
|
animation: false,
|
||||||
grid: {
|
grid: {
|
||||||
left: "0%",
|
left: "5%",
|
||||||
right: "2%",
|
right: "5%",
|
||||||
bottom: "2%",
|
bottom: "2%",
|
||||||
top: "10%",
|
top: "10%",
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
@ -71,15 +71,16 @@
|
|||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
data: xData,
|
data: xData,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: "#fff",
|
|
||||||
formatter: function (value) {
|
formatter: function (value) {
|
||||||
// Assuming dates are in the format 'yyyy-mm-dd'
|
|
||||||
// Extract the month and day from the date string and convert the month to its abbreviated name
|
|
||||||
const dateParts = value.split("-");
|
const dateParts = value.split("-");
|
||||||
const year = dateParts[0].substring(2); // Extracting the last two digits of the year
|
const year = dateParts[0].substring(2); // Extracting the last two digits of the year
|
||||||
const monthIndex = parseInt(dateParts[1]) - 1; // Months are zero-indexed in JavaScript Date objects
|
const monthIndex = parseInt(dateParts[1]) - 1; // Months are zero-indexed in JavaScript Date objects
|
||||||
return `${monthNames[monthIndex]} '${year} `;
|
return `${monthNames[monthIndex]} '${year} `;
|
||||||
},
|
},
|
||||||
|
color: "#fff",
|
||||||
|
interval: 0, // Show all labels
|
||||||
|
rotate: 45, // Rotate labels for better readability
|
||||||
|
fontSize: 12, // Adjust font size if needed
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
yAxis: [
|
yAxis: [
|
||||||
@ -101,6 +102,7 @@
|
|||||||
type: "bar",
|
type: "bar",
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: "none",
|
symbol: "none",
|
||||||
|
barWidth: "60%",
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user