vue-data-ui 2.6.29 → 2.6.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-Cc5-mdWT.cjs → Arrow-DlzoZbyy.cjs} +1 -1
- package/dist/{Arrow-B0z5z_VO.js → Arrow-P8JQ180M.js} +1 -1
- package/dist/{BaseIcon-BdZtuovW.js → BaseIcon-AmoKryXo.js} +1 -1
- package/dist/{BaseIcon-5W5V7roT.cjs → BaseIcon-q0bEOOzl.cjs} +1 -1
- package/dist/{DataTable-C2vZFP5z.js → DataTable-B4YF6guk.js} +2 -2
- package/dist/{DataTable-BNWwFOV4.cjs → DataTable-DL8_xKlk.cjs} +1 -1
- package/dist/{Legend-DHq9W83h.js → Legend-BMXzxIhA.js} +2 -2
- package/dist/{Legend-Ctes5ppf.cjs → Legend-tU5gqFrZ.cjs} +1 -1
- package/dist/{PackageVersion-B0quzSF4.cjs → PackageVersion-DHtx9fnE.cjs} +1 -1
- package/dist/{PackageVersion-DNlw7bFD.js → PackageVersion-DcMafJMi.js} +1 -1
- package/dist/{PenAndPaper-DvHA5IKH.cjs → PenAndPaper-DPoMEHE6.cjs} +1 -1
- package/dist/{PenAndPaper-DyuAJ4h_.js → PenAndPaper-ljJaW1FE.js} +3 -3
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-DUjJeHez.cjs → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-B-psJjxF.cjs} +1 -1
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-BiLXusIM.js → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-CF1vjG1v.js} +3 -3
- package/dist/{Shape-CtNgK9wE.js → Shape-Bs9E3f4-.js} +1 -1
- package/dist/{Shape-BvU3Ai7c.cjs → Shape-C_rBdSHr.cjs} +1 -1
- package/dist/{Slicer-ydrXx0Yy.cjs → Slicer-9-SDSvre.cjs} +1 -1
- package/dist/{Slicer-ClPl3HhX.js → Slicer-qokIr-TL.js} +2 -2
- package/dist/{Title-BzpoFNbW.js → Title-BwZtefYd.js} +1 -1
- package/dist/{Title-CSIfEX6Y.cjs → Title-CsERtJKI.cjs} +1 -1
- package/dist/{Tooltip-BanSNN1E.cjs → Tooltip-C06-4zGf.cjs} +1 -1
- package/dist/{Tooltip-COsfmesa.js → Tooltip-eCCz9HFo.js} +1 -1
- package/dist/{index-MpPojsyO.js → index-CHWA6Lnw.js} +3 -1
- package/dist/index-_gyicZFE.cjs +9 -0
- package/dist/llms.txt +232 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +2 -0
- package/dist/types/vue-data-ui.d.ts +2 -0
- package/dist/{useNestedProp-C3k1eZp3.cjs → useNestedProp-BJQoarHp.cjs} +1 -1
- package/dist/{useNestedProp-COOh5VgD.js → useNestedProp-ByBiJC9_.js} +1 -1
- package/dist/{usePrinter-C3L9Sy8a.cjs → usePrinter-BRTNfg7r.cjs} +1 -1
- package/dist/{usePrinter-BRM9AtPW.js → usePrinter-DibtVl2x.js} +1 -1
- package/dist/{vue-data-ui-CbA9pJio.js → vue-data-ui-JGaDyjOa.js} +61 -61
- package/dist/{vue-data-ui-BMDZH4fq.cjs → vue-data-ui-NwBkWKwf.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CFxp2SCt.cjs → vue-ui-3d-bar-DbmbJ68T.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-Cnbv9qgI.js → vue-ui-3d-bar-nYsGYklC.js} +9 -9
- package/dist/{vue-ui-accordion-CfWb_o5i.cjs → vue-ui-accordion-8mzPx86h.cjs} +1 -1
- package/dist/{vue-ui-accordion-B-1aLe1z.js → vue-ui-accordion-gHGrRoVr.js} +3 -3
- package/dist/{vue-ui-age-pyramid-2aYW6XXy.js → vue-ui-age-pyramid-BpGOmhzz.js} +10 -10
- package/dist/{vue-ui-age-pyramid-CJSjvTq5.cjs → vue-ui-age-pyramid-DLRaoIRm.cjs} +1 -1
- package/dist/{vue-ui-annotator-B7zcrWte.js → vue-ui-annotator-CjM5ctaG.js} +1 -1
- package/dist/{vue-ui-annotator-_exQcPLw.cjs → vue-ui-annotator-DhJ0ivNn.cjs} +1 -1
- package/dist/{vue-ui-bullet-CsKr0Gbw.js → vue-ui-bullet-DJvBVKjg.js} +8 -8
- package/dist/{vue-ui-bullet-DDjwx0R3.cjs → vue-ui-bullet-R702Xv5R.cjs} +1 -1
- package/dist/{vue-ui-candlestick-z0N4X9fX.js → vue-ui-candlestick-5cmDQiwo.js} +11 -11
- package/dist/{vue-ui-candlestick-C-ye8ouC.cjs → vue-ui-candlestick-DCBBy4C8.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CuBG9Mb1.cjs → vue-ui-carousel-table-CkGU0B6s.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BJOaMjAe.js → vue-ui-carousel-table-meUcOS-A.js} +4 -4
- package/dist/{vue-ui-chestnut-D-K1WM5o.cjs → vue-ui-chestnut-C-GeGI6H.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BCo_Bu6L.js → vue-ui-chestnut-C6DlvXs9.js} +8 -8
- package/dist/{vue-ui-circle-pack-DPnaetJC.js → vue-ui-circle-pack-3zIDTUNF.js} +9 -9
- package/dist/{vue-ui-circle-pack-DtFpGGhw.cjs → vue-ui-circle-pack-mZPZZ3IN.cjs} +1 -1
- package/dist/{vue-ui-cursor-CjCbzS4O.js → vue-ui-cursor-B-mv_xEC.js} +2 -2
- package/dist/{vue-ui-cursor-D7wYByvs.cjs → vue-ui-cursor-DOTfG9P-.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DRUBWbuu.cjs → vue-ui-dashboard-BLKM20n8.cjs} +1 -1
- package/dist/{vue-ui-dashboard-C74rE5xX.js → vue-ui-dashboard-i5ysWN1s.js} +2 -2
- package/dist/{vue-ui-digits-DIRnB2Ma.cjs → vue-ui-digits-B-LNRFDc.cjs} +1 -1
- package/dist/{vue-ui-digits-DXaAZ6fS.js → vue-ui-digits-B8crXGKw.js} +2 -2
- package/dist/{vue-ui-donut-Ckx0tTPo.cjs → vue-ui-donut-CdhiYoyd.cjs} +1 -1
- package/dist/{vue-ui-donut-DWnpA8JM.js → vue-ui-donut-_RwrFzJe.js} +12 -12
- package/dist/{vue-ui-donut-evolution-D2xCEuZD.cjs → vue-ui-donut-evolution-Byaufydi.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BBU5J-VI.js → vue-ui-donut-evolution-BynR7yrN.js} +11 -11
- package/dist/{vue-ui-dumbbell-B-InxxMw.cjs → vue-ui-dumbbell-B5z4t3b-.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-C2_W_ZGm.js → vue-ui-dumbbell-o86706ds.js} +10 -10
- package/dist/{vue-ui-flow-Br-2AaIC.js → vue-ui-flow-BkjQ5DxV.js} +9 -9
- package/dist/{vue-ui-flow-HQzOZx9P.cjs → vue-ui-flow-DepnWmwK.cjs} +1 -1
- package/dist/{vue-ui-funnel-CKf6Q1Rd.cjs → vue-ui-funnel-CoyfIA1Y.cjs} +1 -1
- package/dist/{vue-ui-funnel-CYX5THxQ.js → vue-ui-funnel-Dj7-Wzf2.js} +9 -9
- package/dist/{vue-ui-galaxy-DCzuNJZO.cjs → vue-ui-galaxy-DOzFYtp0.cjs} +1 -1
- package/dist/{vue-ui-galaxy-FmztrzLG.js → vue-ui-galaxy-n9zXvOd-.js} +11 -11
- package/dist/{vue-ui-gauge-DV2LKsLI.js → vue-ui-gauge-BPpaze3S.js} +7 -7
- package/dist/{vue-ui-gauge-x75Ovwuq.cjs → vue-ui-gauge-DrTs5UqB.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Cbk4auek.js → vue-ui-gizmo-CTmN8V32.js} +3 -3
- package/dist/{vue-ui-gizmo-vOw8ZIwS.cjs → vue-ui-gizmo-DJxRFhVW.cjs} +1 -1
- package/dist/{vue-ui-heatmap-NEesMWIK.cjs → vue-ui-heatmap-JYG2Pn3A.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CSEPwylo.js → vue-ui-heatmap-ljQkIdZn.js} +10 -10
- package/dist/{vue-ui-history-plot-Bveb3FiK.js → vue-ui-history-plot-CQx5XlN1.js} +11 -11
- package/dist/{vue-ui-history-plot-B0tCUQLV.cjs → vue-ui-history-plot-Ul0TT4Wf.cjs} +1 -1
- package/dist/{vue-ui-kpi-DKQTizBy.cjs → vue-ui-kpi--LMVG67F.cjs} +1 -1
- package/dist/{vue-ui-kpi-CnwUJjgc.js → vue-ui-kpi-BfCuGNby.js} +3 -3
- package/dist/{vue-ui-mini-loader-DeWB4l-Y.js → vue-ui-mini-loader-BqpELr7O.js} +2 -2
- package/dist/{vue-ui-mini-loader-Bxm4x_KC.cjs → vue-ui-mini-loader-cJg8IvUw.cjs} +1 -1
- package/dist/{vue-ui-molecule-Dfd4MZ59.js → vue-ui-molecule-Bv_Pe_8Q.js} +10 -10
- package/dist/{vue-ui-molecule-D_meQeUo.cjs → vue-ui-molecule-YDA7UdtF.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Bl-wi7lG.js → vue-ui-mood-radar-CcykgM0n.js} +11 -11
- package/dist/{vue-ui-mood-radar-GpaM_WzS.cjs → vue-ui-mood-radar-hKh_tnq2.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-CLwBFkxI.js → vue-ui-nested-donuts-BWcLao-y.js} +11 -11
- package/dist/{vue-ui-nested-donuts-L6WdkRHD.cjs → vue-ui-nested-donuts-Cix5WlV9.cjs} +1 -1
- package/dist/{vue-ui-onion-DTAoZoGJ.cjs → vue-ui-onion-Cgo2ZVwO.cjs} +1 -1
- package/dist/{vue-ui-onion-Dr0DxYti.js → vue-ui-onion-D6iR8PW6.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-CWbYZRrB.cjs → vue-ui-parallel-coordinate-plot-Bm-oID-Y.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-mhDv1UOP.js → vue-ui-parallel-coordinate-plot-DEE9ou_Q.js} +12 -12
- package/dist/{vue-ui-quadrant-QYR0ptv-.js → vue-ui-quadrant-CZQJGEbA.js} +12 -12
- package/dist/{vue-ui-quadrant-WByWYKYR.cjs → vue-ui-quadrant-DhSD6jGf.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BWhOv1-7.js → vue-ui-quick-chart-BX3hOGEG.js} +383 -379
- package/dist/vue-ui-quick-chart-GTYfOv6C.cjs +15 -0
- package/dist/{vue-ui-radar-STKzXt8W.js → vue-ui-radar-BIGFuJe_.js} +12 -12
- package/dist/{vue-ui-radar-DzHmss2q.cjs → vue-ui-radar-CRhU6BWh.cjs} +1 -1
- package/dist/{vue-ui-rating-rDskdGOZ.cjs → vue-ui-rating-BSGT8Rew.cjs} +1 -1
- package/dist/{vue-ui-rating-DnuB79Hc.js → vue-ui-rating-CSR7_gV-.js} +2 -2
- package/dist/{vue-ui-relation-circle-BvUdpdUW.js → vue-ui-relation-circle-JEjpgv8I.js} +7 -7
- package/dist/{vue-ui-relation-circle-CT1tfb53.cjs → vue-ui-relation-circle-tZFvSMa1.cjs} +1 -1
- package/dist/{vue-ui-rings-Cdp3bA6k.cjs → vue-ui-rings-C-i8ANyb.cjs} +1 -1
- package/dist/{vue-ui-rings-CoRv8cLM.js → vue-ui-rings-DoNQjBvE.js} +12 -12
- package/dist/{vue-ui-scatter-BBLGN8Mn.js → vue-ui-scatter-CW2fwwda.js} +12 -12
- package/dist/{vue-ui-scatter-DgQjhowR.cjs → vue-ui-scatter-_WWbvZen.cjs} +1 -1
- package/dist/{vue-ui-screenshot-D73U26fC.js → vue-ui-screenshot-B95FU-Gc.js} +1 -1
- package/dist/{vue-ui-screenshot-C543ziE_.cjs → vue-ui-screenshot-DfIuMlBS.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BSd6A4gJ.js → vue-ui-skeleton-BSUFPx4a.js} +3 -3
- package/dist/{vue-ui-skeleton-BmVoWkYO.cjs → vue-ui-skeleton-KlT3Rmkn.cjs} +1 -1
- package/dist/{vue-ui-smiley-Dxros8A_.cjs → vue-ui-smiley-CfLGqmi5.cjs} +1 -1
- package/dist/{vue-ui-smiley-DemPwemd.js → vue-ui-smiley-qDBRPyDQ.js} +2 -2
- package/dist/{vue-ui-spark-trend-C1H2ajOo.js → vue-ui-spark-trend-BSpnjX1o.js} +5 -5
- package/dist/{vue-ui-spark-trend-BKLGQ8Dc.cjs → vue-ui-spark-trend-S4a2SDhB.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CNp03-qo.cjs → vue-ui-sparkbar-CTLSRwph.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-B4GPU-C-.js → vue-ui-sparkbar-CrTC1o2D.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DEt750g5.cjs → vue-ui-sparkgauge-CEOGh__Q.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-D0sL36kf.js → vue-ui-sparkgauge-CXN-HNq2.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-B7cSzNt6.js → vue-ui-sparkhistogram-B_lhpWvH.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-R3o5VB6i.cjs → vue-ui-sparkhistogram-p7VmC6Jh.cjs} +1 -1
- package/dist/{vue-ui-sparkline-xon0fyhV.js → vue-ui-sparkline-D9ETPDKl.js} +4 -4
- package/dist/{vue-ui-sparkline-CS37nAVb.cjs → vue-ui-sparkline-FWL-fTwQ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CbFhWrCb.cjs → vue-ui-sparkstackbar-DtWHuAGZ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BJwj_BTC.js → vue-ui-sparkstackbar-QxbvlLet.js} +5 -5
- package/dist/{vue-ui-stackbar-D6Hg9U89.cjs → vue-ui-stackbar-CnXEfFH0.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DMIcmwUS.js → vue-ui-stackbar-lsjnigfJ.js} +13 -13
- package/dist/{vue-ui-strip-plot-BEheY0-i.cjs → vue-ui-strip-plot-D-wDSHF4.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-DDH7HHeb.js → vue-ui-strip-plot-D39kSpeQ.js} +11 -11
- package/dist/{vue-ui-table-DKyhJldD.cjs → vue-ui-table-C4ViP9oJ.cjs} +1 -1
- package/dist/{vue-ui-table-BpayQH5c.js → vue-ui-table-h-SNgy2Q.js} +1 -1
- package/dist/{vue-ui-table-heatmap-D3xHOMd7.cjs → vue-ui-table-heatmap-CeEQjHdT.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-B7n9HGmF.js → vue-ui-table-heatmap-ClhJSmyw.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CZh90m4f.cjs → vue-ui-table-sparkline-DLt4efL6.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CbYMkzFo.js → vue-ui-table-sparkline-RFOlGtum.js} +5 -5
- package/dist/{vue-ui-thermometer-DpwibDz-.cjs → vue-ui-thermometer-C9H37a-g.cjs} +1 -1
- package/dist/{vue-ui-thermometer-jEknhXqX.js → vue-ui-thermometer-CE6mLojO.js} +7 -7
- package/dist/{vue-ui-timer-DZyyNhPm.cjs → vue-ui-timer-BCnbpogm.cjs} +1 -1
- package/dist/{vue-ui-timer-DExfJT7b.js → vue-ui-timer-Bdq6_32v.js} +5 -5
- package/dist/{vue-ui-tiremarks-djpykwxW.js → vue-ui-tiremarks-CaqziySq.js} +7 -7
- package/dist/{vue-ui-tiremarks-DRpjUX74.cjs → vue-ui-tiremarks-CdOzGAzN.cjs} +1 -1
- package/dist/{vue-ui-treemap-Kpb_TUBo.cjs → vue-ui-treemap-BH7r2blb.cjs} +1 -1
- package/dist/{vue-ui-treemap-CnYfwkt5.js → vue-ui-treemap-fuhipZma.js} +11 -11
- package/dist/{vue-ui-vertical-bar-CbiVGX16.js → vue-ui-vertical-bar-ByHpElpA.js} +12 -12
- package/dist/{vue-ui-vertical-bar-C4q_SdFt.cjs → vue-ui-vertical-bar-DnUrxS2t.cjs} +1 -1
- package/dist/{vue-ui-waffle-Brix-cCW.cjs → vue-ui-waffle-CURVbAVs.cjs} +1 -1
- package/dist/{vue-ui-waffle-B2eqMbjr.js → vue-ui-waffle-D7Y55F5z.js} +12 -12
- package/dist/{vue-ui-wheel-BnscT7OQ.js → vue-ui-wheel-DjGKyAh5.js} +7 -7
- package/dist/{vue-ui-wheel-lRepxN2v.cjs → vue-ui-wheel-KCxiG6Xt.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DTM-SssN.js → vue-ui-word-cloud-CVTb20DJ.js} +10 -10
- package/dist/{vue-ui-word-cloud-Dc2X3fT-.cjs → vue-ui-word-cloud-H0hw5gjm.cjs} +1 -1
- package/dist/{vue-ui-xy-DSn5UhO6.js → vue-ui-xy-C80BPN7E.js} +14 -14
- package/dist/{vue-ui-xy-CGnwcyVD.cjs → vue-ui-xy-DnsJUjcc.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-Do2Qiecs.js → vue-ui-xy-canvas-BEx7_7h7.js} +12 -12
- package/dist/{vue-ui-xy-canvas-C86uI-1X.cjs → vue-ui-xy-canvas-BcUjj3X8.cjs} +1 -1
- package/package.json +2 -2
- package/dist/index-CUVUtIL0.cjs +0 -9
- package/dist/vue-ui-quick-chart-15w_Vv7j.cjs +0 -15
package/dist/llms.txt
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Vue Data UI
|
|
2
|
+
|
|
3
|
+
> VueDataUI is a Vue 3 data visualization library providing numerous chart components (pie/donut, bar, line, radar, etc.), as well as tables and rating components. This guide offers ready-to-use examples and best practices for integrating VueDataUI into your Vue application. The content is optimized for AI code editors (GitHub Copilot, Cursor, etc.) to suggest correct usage patterns.
|
|
4
|
+
|
|
5
|
+
Important notes:
|
|
6
|
+
- This library is *not* compatible with Vue2. It is to be used with Vue3.
|
|
7
|
+
- **Import and CSS:** Always import the required VueDataUI component and ensure you include the library's CSS.
|
|
8
|
+
- **Reactive Data:** Use Vue's reactivity (`ref` or `computed`) to manage your `dataset` and `config` objects.
|
|
9
|
+
- **Component Customization:** Use the config object to customize appearance (colors, legends, chart dimensions, etc.) based on your specific needs.
|
|
10
|
+
- **CLI Utilization:** Leverage `vue-data-ui-cli` for quick scaffolding of new components, ensuring proper structure and reducing setup errors.
|
|
11
|
+
- **AI Integration:** With these clear examples, AI code editors should suggest correct imports, prop bindings, and data structures, making it easier to build interactive charts with VueDataUI.
|
|
12
|
+
|
|
13
|
+
## Docs
|
|
14
|
+
|
|
15
|
+
- [README](https://github.com/graphieros/vue-data-ui/blob/master/README.md): Readme file of the vue-data-ui library
|
|
16
|
+
- [Documentation]https://vue-data-ui.graphieros.com/: Official documentation website for the vue-data-ui library
|
|
17
|
+
|
|
18
|
+
## Getting Started with VueDataUI
|
|
19
|
+
|
|
20
|
+
To begin, install the library and include its stylesheet:
|
|
21
|
+
|
|
22
|
+
npm install vue-data-ui
|
|
23
|
+
|
|
24
|
+
In your main entry file (e.g., main.js or main.ts), import the CSS and optionally register components globally:
|
|
25
|
+
|
|
26
|
+
import { createApp } from 'vue';
|
|
27
|
+
import App from './App.vue';
|
|
28
|
+
import 'vue-data-ui/style.css'; // Include VueDataUI styles
|
|
29
|
+
|
|
30
|
+
// Example: register a component globally (optional)
|
|
31
|
+
import { VueUiXy } from 'vue-data-ui';
|
|
32
|
+
const app = createApp(App);
|
|
33
|
+
app.component('VueUiXy', VueUiXy);
|
|
34
|
+
|
|
35
|
+
app.mount('#app');
|
|
36
|
+
|
|
37
|
+
You can also import components locally within Vue single-file components (see examples below). VueDataUI offers a **universal component** `<VueDataUi>` that can load any chart dynamically. For example:
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<!-- Using the universal component to load a Donut chart -->
|
|
41
|
+
<VueDataUi component="VueUiDonut" :dataset="dataset" :config="config" />
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script setup>
|
|
45
|
+
import { ref } from 'vue';
|
|
46
|
+
import { VueDataUi } from 'vue-data-ui'; // universal component
|
|
47
|
+
import 'vue-data-ui/style.css'; // ensure styles are imported
|
|
48
|
+
|
|
49
|
+
const dataset = ref([ /* ... data ... */ ]);
|
|
50
|
+
const config = ref({ /* ... config ... */ });
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
Using `VueDataUi` will lazy-load only the specified chart component.
|
|
54
|
+
|
|
55
|
+
## XY Chart Example
|
|
56
|
+
|
|
57
|
+
For line (or area) charts, bar chart, or combined charts, use the `VueUiXy` component. The dataset is an array of data points with the following datastructure:
|
|
58
|
+
|
|
59
|
+
type VueUiXyDatasetItem = {
|
|
60
|
+
name: string;
|
|
61
|
+
series: number[];
|
|
62
|
+
type: "bar" | "line" | "plot";
|
|
63
|
+
color?: string;
|
|
64
|
+
dashed?: boolean;
|
|
65
|
+
useTag?: "start" | "end" | "none";
|
|
66
|
+
showSerieName?: "start" | "end";
|
|
67
|
+
useArea?: boolean;
|
|
68
|
+
dataLabels?: boolean;
|
|
69
|
+
useProgression?: boolean; // Display a trend line
|
|
70
|
+
scaleSteps?: number; // The preferred number of scale segments on the y axis
|
|
71
|
+
scaleLabel?: string;
|
|
72
|
+
scaleMax?: number; // Force the max scale value
|
|
73
|
+
scaleMin?: number; // Force the min scale value
|
|
74
|
+
autoScaling?: boolean;
|
|
75
|
+
stackRatio?: number; // In stacked mode, sets the height ratio of the datapoint
|
|
76
|
+
comments?: string[]; // Provide an array of comments which will display at same index as the series item
|
|
77
|
+
shape?: Shape; // circle, triangle, square, pentagon, hexagon, star
|
|
78
|
+
smooth?: boolean; // Display as a spline
|
|
79
|
+
prefix?: string; // Use a prefix on data labels
|
|
80
|
+
suffix?: string; // Use a suffix on data labels
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
<!-- LineChart.vue - example of a basic line chart -->
|
|
84
|
+
<template>
|
|
85
|
+
<VueUiXy :dataset="dataset" :config="config" />
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<script setup>
|
|
89
|
+
import { ref } from 'vue';
|
|
90
|
+
import { VueUiXy } from 'vue-data-ui'; // import the XY chart component
|
|
91
|
+
|
|
92
|
+
// Reactive dataset: array of points with minimal required attributes
|
|
93
|
+
const dataset = ref([
|
|
94
|
+
{ name: 'Serie A', series: [1, 2, 3, 5], type: 'line' },
|
|
95
|
+
{ name: 'Serie B', series: [13, 21, 3, 2], type: 'bar' },
|
|
96
|
+
{ name: 'Serie C', series: [8, 2, 3, 6], type: 'plot' },
|
|
97
|
+
]);
|
|
98
|
+
|
|
99
|
+
// Minimal config for the line chart (optional). The TS type for the config is VueUiXyConfig
|
|
100
|
+
const config = ref({
|
|
101
|
+
chart: {
|
|
102
|
+
fontFamily: "inherit",
|
|
103
|
+
backgroundColor: "#FFFFFF",
|
|
104
|
+
color: "#1A1A1A",
|
|
105
|
+
grid: {
|
|
106
|
+
showHorizontalLines: false,
|
|
107
|
+
showVerticalLines: false,
|
|
108
|
+
labels: {
|
|
109
|
+
show: true, // shows datapoint labels if the
|
|
110
|
+
color: "#1A1A1A",
|
|
111
|
+
xAxisLabels: {
|
|
112
|
+
values: ['01-01-2026', '02-01-2026', '03-01-2026', '04-01-2026'], // The values displayed on the x axis (time labels)
|
|
113
|
+
rotation: 0, // to rotate the x axis labels
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
title: {
|
|
118
|
+
text: 'Title',
|
|
119
|
+
color: '#1A1A1A'
|
|
120
|
+
},
|
|
121
|
+
bar: { // Specific config for bar types
|
|
122
|
+
labels: {
|
|
123
|
+
show: true,
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
line: { // Specific config for line types
|
|
127
|
+
labels: {
|
|
128
|
+
show: true
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
plot: { // Specific config for plot types
|
|
132
|
+
labels: {
|
|
133
|
+
show: true
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
tooltip: {
|
|
137
|
+
show: true,
|
|
138
|
+
customFormat: null, // Provide a custom html content with a callback, for example: ({ seriesIndex, datapoint, series, config, bars, lines, plots }) => { return `Your content` }
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
</script>
|
|
143
|
+
|
|
144
|
+
## Sparkline Chart Example
|
|
145
|
+
|
|
146
|
+
Sparkline charts are mini charts for showing trends. The `VueUiSparkline` component renders a small, minimalist line chart. The dataset is an array of data points with the following datastructure:
|
|
147
|
+
|
|
148
|
+
type VueUiSparklineDatasetItem = {
|
|
149
|
+
period: string // For example, a date
|
|
150
|
+
value: number
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
<!-- SparklineChart.vue - example of a sparkline chart -->
|
|
154
|
+
<template>
|
|
155
|
+
<VueUiSparkline :dataset="dataset" :config="config" />
|
|
156
|
+
</template>
|
|
157
|
+
|
|
158
|
+
<script setup>
|
|
159
|
+
import { ref } from 'vue';
|
|
160
|
+
import { VueUiSparkline } from 'vue-data-ui'; // import the Sparkline component
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
// Reactive dataset: an array of objects of type VueUiSparklineDatasetItem
|
|
164
|
+
const dataset = ref([
|
|
165
|
+
{ period: 'January', value: 1 },
|
|
166
|
+
{ period: 'February', value: 2 },
|
|
167
|
+
{ period: 'March', value: 3 },
|
|
168
|
+
]);
|
|
169
|
+
|
|
170
|
+
// Minimal config example for the sparkline chart (optional). Full config type is VueUiSparklineConfig
|
|
171
|
+
const config = ref({
|
|
172
|
+
type: 'line', // or 'bar'
|
|
173
|
+
style: {
|
|
174
|
+
area: {
|
|
175
|
+
show: true,
|
|
176
|
+
},
|
|
177
|
+
dataLabel: {
|
|
178
|
+
show: true
|
|
179
|
+
},
|
|
180
|
+
line: {
|
|
181
|
+
color: '#6376DD'
|
|
182
|
+
},
|
|
183
|
+
plot: {
|
|
184
|
+
show: true,
|
|
185
|
+
radius: 4
|
|
186
|
+
},
|
|
187
|
+
title: {
|
|
188
|
+
show: true,
|
|
189
|
+
text: 'Title'
|
|
190
|
+
},
|
|
191
|
+
tooltip: {
|
|
192
|
+
show: true
|
|
193
|
+
},
|
|
194
|
+
verticalIndicator: {
|
|
195
|
+
show: true,
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
</script>
|
|
200
|
+
|
|
201
|
+
Notes:
|
|
202
|
+
- Ideal for embedding in dashboards or tables to indicate trends.
|
|
203
|
+
|
|
204
|
+
## Using the vue-data-ui-cli
|
|
205
|
+
|
|
206
|
+
VueDataUI offers a CLI tool, `vue-data-ui-cli`, to quickly generate chart component boilerplates.
|
|
207
|
+
|
|
208
|
+
### Installation:
|
|
209
|
+
|
|
210
|
+
npm install -g vue-data-ui-cli
|
|
211
|
+
|
|
212
|
+
This installs a global command `vdui-cli` (short for VueDataUI CLI).
|
|
213
|
+
|
|
214
|
+
### Usage:
|
|
215
|
+
|
|
216
|
+
Run the CLI in your project directory:
|
|
217
|
+
|
|
218
|
+
vdui-cli
|
|
219
|
+
|
|
220
|
+
You'll be prompted for:
|
|
221
|
+
- **Component Type:** Select the VueDataUI chart type (e.g., Donut, Radar, etc.).
|
|
222
|
+
- **Reactive API:** Choose how to manage reactive data (using `ref` or `computed`).
|
|
223
|
+
- **TypeScript Usage:** Decide if the component should be in TypeScript or JavaScript.
|
|
224
|
+
- **Component Name:** Provide a name for your component (e.g., `MyDonutChart`).
|
|
225
|
+
- **Target Directory:** Specify where to create the new component file.
|
|
226
|
+
|
|
227
|
+
The CLI will generate a Vue single-file component pre-populated with:
|
|
228
|
+
- Correct imports for VueDataUI components.
|
|
229
|
+
- Sample reactive `dataset` and `config` objects.
|
|
230
|
+
- A template ready to render the selected chart.
|
|
231
|
+
|
|
232
|
+
This tool helps maintain consistency and speeds up development by providing a reliable boilerplate.
|