@putianyi888/vue3-plots

Composable Vue 3 SVG plot layers for building charts from small, focused components.
8,240
Install
npm install @putianyi888/vue3-plots
Latest Version:0.7.0
Vue:3
License:MIT
Last Updated:Oct 19, 2026
Links: GitHub  ·  npm
Maintainer: putianyi888

vue3-plots

Composable Vue 3 SVG plot layers for building charts from small, focused components.

Links

Install

npm install @putianyi888/vue3-plots

Minimal Use

<script setup lang="ts">
import { Axis, Grid, Line, Scatter, TransformGroup, getDataDomain, getNiceTicks } from '@putianyi888/vue3-plots'
import '@putianyi888/vue3-plots/style.css'

const points = [
  { x: 0, y: 2 },
  { x: 1, y: 4 },
  { x: 2, y: 3 },
]
const domain = getDataDomain(points)
const size = { width: 640, height: 360 }
const xTicks = getNiceTicks(domain.xMin, domain.xMax)
const yTicks = getNiceTicks(domain.yMin, domain.yMax)
</script>

<template>
  <div style="position: relative; width: 640px; height: 360px;">
    <TransformGroup :domain="domain" :size="size">
      <Grid :x-ticks="xTicks" :y-ticks="yTicks" stroke-color="#e2e8f0" />
      <Line :points="points" stroke-color="#2563eb" :stroke-width="2" />
      <Scatter :points="points" :radius="4" fill-color="#0f172a" />
      <Axis direction="horizontal" :ticks="xTicks" style="color: #334155" />
      <Axis direction="vertical" :ticks="yTicks" style="color: #334155" />
    </TransformGroup>
  </div>
</template>

vue3-plots is intentionally composable: each layer handles one part of the chart, and TransformGroup keeps shared domain, size, and padding values synchronized.

Development

npm install
npm run docs:dev
npm run test:run
npm run build

docs:dev generates API tables once before starting VitePress, then watches component and TypeDoc sources for targeted API doc updates.

Related Packages

vccs

Composable charting components for Vue 3 — an unofficial port of Recharts

12,057 52
@affino/charts-vue

Reusable Vue SVG chart rendering package for Affino

943 0
vue3-charts

SVG charting library for Vue 3 built on d3

132,793 150
@qingmingmu/icons

青冥组件系统 —— SVG 图标集

598
nuxt-echarts

Nuxt Module for Apache ECharts™

816,976

Version History

Version Released License
0.7.0 MIT
0.6.4 MIT
0.6.3 MIT
0.6.2 MIT
0.6.1 MIT