TrendChart.css 1.69 KB
/* 趋势图样式与看板页面同目录,色值全部取设计令牌。 */
.uc-trend {
  position: relative;
  margin-top: var(--uj-space-5);
  min-height: 264px;
  overflow-x: auto;
}
.uc-trend__chart {
  display: block;
  width: 100%;
  height: 264px;
}
.uc-trend__grid {
  stroke: var(--uj-divider);
  stroke-width: 1;
}
.uc-trend__line {
  fill: none;
  stroke: var(--uj-primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}
.uc-trend__point {
  fill: var(--uj-surface);
  stroke: var(--uj-primary);
  stroke-width: 2.5;
  transition: r 160ms ease;
}
.uc-trend__point:hover {
  r: 6;
}
.uc-trend__tooltip {
  position: absolute;
  z-index: 1;
  min-width: 150px;
  padding: var(--uj-space-3) var(--uj-space-4);
  border: 1px solid var(--uj-border);
  border-radius: var(--uj-radius-md);
  background: var(--uj-surface);
  box-shadow: var(--uj-shadow-pop);
  color: var(--uj-text-2);
  font-size: var(--uj-font-sm);
  line-height: 1.6;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - var(--uj-space-3)));
}
.uc-trend__tooltip-date {
  margin-bottom: var(--uj-space-1);
  color: var(--uj-text-2);
}
.uc-trend__tooltip-value {
  display: flex;
  align-items: center;
  gap: var(--uj-space-2);
}
.uc-trend__tooltip-dot {
  width: var(--uj-space-1);
  height: var(--uj-space-1);
  border-radius: var(--uj-radius-pill);
  background: var(--uj-primary);
}
.uc-trend__axis-label,
.uc-trend__unit {
  fill: var(--uj-text-3);
  font-size: var(--uj-font-xs);
  font-variant-numeric: var(--uj-num);
}
.uc-trend__unit {
  fill: var(--uj-text-header);
}
.uc-trend__empty {
  padding: var(--uj-space-8) 0;
  color: var(--uj-text-3);
  font-size: var(--uj-font-sm);
  text-align: center;
}