Skip to content

IDuxFE/idux-charts

Repository files navigation

iDux Charts

ECharts for Vue, both v2.x and v3.x, see documentation for more.

English | 简体中文

📦 Installation

npm install echarts @idux/charts

To make @idux/charts work for Vue 2.x(< 2.7), you need to have @vue/composition-api installed:

npm install @vue/composition-api

🔨 Usage

// [email protected](< 2.7)
// import { createApp } from "@vue/composition-api";
import { createApp } from 'vue'
import { IxChart, IxLineChart } from '@idux/charts'

const app = createApp(App)
app.use(IxChart).use(IxLineChart)
<script setup lang="ts">
import { type LineChartProps } from '@idux/charts'

const data = [123, 324, 156, 244, 188]

const lineOption: LineChartProps = {
  xAxis: {
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
  },
}
</script>
<template>
  <IxLineChart :data="data" v-bind="lineOption" />
</template>

See Getting Started for more details.

⌨️ Development

pnpm install

pnpm start

Open a browser: http://localhost:8080/

🤝 Contributing

PRs Welcome

We welcome all contributions. Please read our CONTRIBUTING.md first. You can submit any ideas as Pull Request or as GitHub issues.

If you're new to posting issues, we ask that you read How To Ask Questions The Smart Way (This guide does not provide actual support services for this project!), How to Ask a Question in Open Source Community and How to Report Bugs Effectively prior to posting. Well written bug reports help us help you!

☀️ License

MIT © 2023-present IDuxFE