update timeline

This commit is contained in:
Qiuxia Fan 2022-06-22 18:28:02 +08:00
parent 441aabf2d2
commit 2a29a3a7db
2 changed files with 18 additions and 1 deletions

View File

@ -165,4 +165,20 @@ div.vis-tooltip {
.vis-item {
cursor: pointer;
height: 17px;
border: none !important;
}
.vis-item.Error {
background-color: rgb(238 102 102 / 80%);
color: #fff !important;
}
.vis-item.Normal {
background-color: #91cc75;
color: #333 !important;
}
.vis-item .vis-item-content {
padding: 0 5px !important;
}

View File

@ -56,14 +56,15 @@ function visTimeline() {
start: dateFormat(d.startTime),
end: dateFormat(d.endTime),
data: d,
className: d.type,
};
});
const items: any = new DataSet(events);
const options: any = {
height: h,
width: "100%",
minHeight: "150px",
locale: "en",
groupHeightMode: "fitItems",
autoResize: false,
tooltip: {
overflowMethod: "cap",