時間帶

在數值軸上按比例位置顯示附有標籤的區段,並提供間隙、邊緣標記和資料表。

表格、資料網格、統計、樹、熱力圖和分頁。

lr-time-strip

import '@aceshooting/lyra-ui/components/lr-time-strip.js';

範例

<lr-time-strip label="Equipment activity" min="0" max="24" style="max-inline-size: 40rem"></lr-time-strip>

<script type="module">
  import '@aceshooting/lyra-ui/components/lr-time-strip.js';

  const strip = document.querySelector('lr-time-strip');
  strip.segments = [
    { start: 1, end: 6, kind: 'operating' },
    { start: 8, end: 13, kind: 'standby' },
    { start: 13, end: 17, kind: 'operating' },
    { start: 19, end: 22, kind: 'missing' },
  ];
  strip.kinds = [
    { kind: 'operating', label: 'Operating', style: 'solid' },
    { kind: 'standby', label: 'Standby', style: 'outline', height: 0.6 },
    { kind: 'missing', label: 'No telemetry', style: 'pattern' },
  ];
  strip.edges = [
    { start: 22, end: 24, label: 'Service' },
  ];
  strip.ticks = [
    { value: 0, label: '0h' },
    { value: 12, label: '12h' },
    { value: 24, label: '24h' },
  ];
</script>

閱讀指南(英文)

相關元件

  • 時間線 — 連線歷史事件行,用於審計軌跡、AI 代理歷程和變更記錄。
  • 時間線條目 — 帶顏色標記、標題、時間戳和描述的單條時間線事件。
  • 樹 — 可展開和摺疊的層級結構,用於瀏覽圖譜、文件或檔案。
  • 樹節點 — 在樹結構中遞迴呈現節點及其子節點的行。
  • 詞雲 — 無需依賴的 SVG 詞雲,按權重調整每個詞的大小。
  • 資料網格 — 面向大型或服務端資料集的虛擬化網格,內建排序、篩選、分組、分頁和選擇。