0.2.5 • Published 9 months ago

@jhit/echarts-web-component v0.2.5

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

jhit-echarts

jhit-echarts 是一个基于 ECharts 的 Web Component,并内置图表导出功能。

安装

npm i @jhit/echarts-web-component

使用

以HTML为例

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Echarts Web Component</title>
  <script src="https://unpkg.com/@jhit/echarts-web-component"></script>
</head>
<body>
  <jhit-echarts
    downloadable
    style="height: 300px; width: 500px;"
    option='{
      "title": {"text": "示例图表"},
      "xAxis": {"data": ["A", "B", "C"]},
      "yAxis": {},
      "series": [{"type": "bar", "data": [10, 20, 30]}]
    }'
  />
</body>
</html>

参数

参数名类型说明
optionstringECharts 图表配置项
stylestringECharts 容器样式
downloadableboolean是否显示导出按钮

开发

npm run build
npm run dev     # F5 Rrefresh

jhit 2025-04-25

0.2.5

9 months ago

0.2.4

10 months ago

0.2.3

10 months ago

0.2.2

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.0

10 months ago