<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Kole UI · ChartPanel（普通 H5）</title>
  <link rel="stylesheet" href="../.design_library/kole-ui/colors_and_type.css" />
  <link rel="stylesheet" href="ChartPanel.css" />
  <style>body{margin:0;padding:24px;background: var(--kole-color-page-bg);}</style>
</head>
<body>
  <div class="kole-chartpanel" id="panel">
    <div class="kole-chartpanel-head">
      <span class="kole-chartpanel-title">访问趋势</span>
      <div class="kole-chartpanel-tools">
        <button class="kole-chartpanel-tool" id="refresh">刷新</button>
        <button class="kole-chartpanel-tool" id="export">导出</button>
        <button class="kole-chartpanel-tool kole-chartpanel-caret" id="toggle">▾</button>
      </div>
    </div>
    <div class="kole-chartpanel-body" id="body">
      <div style="height:160px;background:linear-gradient(135deg,var(--color-brand-bg),var(--color-border));border-radius:6px;display:flex;align-items:center;justify-content:center;color:var(--color-brand);">图表区域（可放置折线/柱状/饼图）</div>
    </div>
  </div>

  <script>
    var panel = document.getElementById('panel');
    document.getElementById('toggle').onclick = function () { panel.classList.toggle('is-collapsed'); };
    document.getElementById('refresh').onclick = function () { alert('刷新图表'); };
    document.getElementById('export').onclick = function () { alert('导出图表'); };
  </script>
</body>
</html>
