Vue Chrts (version 2.1.4, with recent releases indicating active maintenance) is a Vue 3 charting library designed to create beautiful, responsive data visualizations with minimal setup. Inspired by Tremor and built on top of Unovis, it offers a variety of chart types including Line, Bar, Area, Stacked Area, and Donut charts. Key differentiators include its intuitive API, full customizability, responsive design, and robust TypeScript support, making it well-suited for modern Vue.js and Nuxt 3 applications where aesthetic appeal and ease of integration are priorities. It handles the complexities of charting, allowing developers to focus on data presentation.
npm install vue-chrtsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates importing and using the LineChart component within a Vue 3 `<script setup>` component, binding data, defining categories, and setting up axis formatters and labels. It illustrates a basic chart with two data series.
Ensure your project's `vue` dependency in `package.json` is set to `^3.5.13` or higher and reinstall dependencies.
For Vue CLI/Vite projects, install `vue-chrts`. For Nuxt 3 projects, install `nuxt-charts` and configure it as a Nuxt module.
Refer to the official documentation for the specific chart type being used and verify your data and categories objects align with the expected format, especially the keys referenced by formatters or labels.
If a prop needs to be modified, create a local copy within the component using `ref` or `reactive` and modify the copy. Emit an event to the parent component to request a change to the original prop value.
Ensure you have `import { LineChart } from 'vue-chrts';` at the top of your `<script setup>` block or explicitly registered it if using the Options API.Verify that your `data` array objects contain the `month` property (or whatever property `xFormatter` expects) and that the `xFormatter` logic correctly handles the data structure.
Check your `package.json` for `vue-chrts` (for Vue projects) or `nuxt-charts` (for Nuxt projects). Ensure correct installation (`npm install vue-chrts` or `npm install nuxt-charts`) and that the import statement matches the installed package. For Nuxt, ensure the module is added to `nuxt.config.ts`.