vue-chrts 0.0.156 → 0.0.157

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.
Files changed (96) hide show
  1. package/dist/Area/AreaChart.vue.d.ts +11 -0
  2. package/dist/Area/index.d.ts +23 -0
  3. package/dist/AreaStacked/AreaStackedChart.vue.d.ts +8 -0
  4. package/dist/AreaStacked/index.d.ts +7 -0
  5. package/dist/Bar/BarChart.vue.d.ts +11 -0
  6. package/dist/Bar/index.d.ts +23 -0
  7. package/dist/Donut/DonutChart.vue.d.ts +11 -0
  8. package/dist/Donut/index.d.ts +12 -0
  9. package/dist/Line/LineChart.vue.d.ts +8 -0
  10. package/dist/Line/index.d.ts +20 -0
  11. package/dist/Progress/Progress.vue.d.ts +2 -0
  12. package/dist/Status/Status.vue.d.ts +2 -0
  13. package/dist/Tooltip/Tooltip.vue.d.ts +10 -0
  14. package/dist/charts-CO6Yq10P.js +16172 -0
  15. package/dist/charts.d.ts +19 -0
  16. package/dist/index.d.ts +16 -1
  17. package/dist/index.js +192 -14
  18. package/package.json +16 -14
  19. package/dist/components/Area/AreaChart.cjs +0 -7
  20. package/dist/components/Area/AreaChart.cjs.map +0 -1
  21. package/dist/components/Area/AreaChart.js +0 -123
  22. package/dist/components/Area/AreaChart.js.map +0 -1
  23. package/dist/components/Area/AreaChart.vue.d.ts +0 -36
  24. package/dist/components/Area/AreaChart2.cjs +0 -2
  25. package/dist/components/Area/AreaChart2.cjs.map +0 -1
  26. package/dist/components/Area/AreaChart2.js +0 -5
  27. package/dist/components/Area/AreaChart2.js.map +0 -1
  28. package/dist/components/Area/index.d.ts +0 -1
  29. package/dist/components/AreaStacked/AreaStackedChart.cjs +0 -2
  30. package/dist/components/AreaStacked/AreaStackedChart.cjs.map +0 -1
  31. package/dist/components/AreaStacked/AreaStackedChart.js +0 -51
  32. package/dist/components/AreaStacked/AreaStackedChart.js.map +0 -1
  33. package/dist/components/AreaStacked/AreaStackedChart.vue.d.ts +0 -18
  34. package/dist/components/AreaStacked/AreaStackedChart2.cjs +0 -2
  35. package/dist/components/AreaStacked/AreaStackedChart2.cjs.map +0 -1
  36. package/dist/components/AreaStacked/AreaStackedChart2.js +0 -5
  37. package/dist/components/AreaStacked/AreaStackedChart2.js.map +0 -1
  38. package/dist/components/AreaStacked/index.d.ts +0 -1
  39. package/dist/components/Bar/BarChart.cjs +0 -2
  40. package/dist/components/Bar/BarChart.cjs.map +0 -1
  41. package/dist/components/Bar/BarChart.js +0 -107
  42. package/dist/components/Bar/BarChart.js.map +0 -1
  43. package/dist/components/Bar/BarChart.vue.d.ts +0 -36
  44. package/dist/components/Bar/BarChart2.cjs +0 -2
  45. package/dist/components/Bar/BarChart2.cjs.map +0 -1
  46. package/dist/components/Bar/BarChart2.js +0 -5
  47. package/dist/components/Bar/BarChart2.js.map +0 -1
  48. package/dist/components/Bar/index.d.ts +0 -1
  49. package/dist/components/Crosshair/Crosshair.cjs +0 -2
  50. package/dist/components/Crosshair/Crosshair.cjs.map +0 -1
  51. package/dist/components/Crosshair/Crosshair.js +0 -40
  52. package/dist/components/Crosshair/Crosshair.js.map +0 -1
  53. package/dist/components/Crosshair/Crosshair.vue.d.ts +0 -38
  54. package/dist/components/Crosshair/Crosshair2.cjs +0 -2
  55. package/dist/components/Crosshair/Crosshair2.cjs.map +0 -1
  56. package/dist/components/Crosshair/Crosshair2.js +0 -5
  57. package/dist/components/Crosshair/Crosshair2.js.map +0 -1
  58. package/dist/components/Crosshair/index.d.ts +0 -1
  59. package/dist/components/Donut/DonutChart.cjs +0 -6
  60. package/dist/components/Donut/DonutChart.cjs.map +0 -1
  61. package/dist/components/Donut/DonutChart.js +0 -59
  62. package/dist/components/Donut/DonutChart.js.map +0 -1
  63. package/dist/components/Donut/DonutChart.vue.d.ts +0 -31
  64. package/dist/components/Donut/DonutChart2.cjs +0 -2
  65. package/dist/components/Donut/DonutChart2.cjs.map +0 -1
  66. package/dist/components/Donut/DonutChart2.js +0 -5
  67. package/dist/components/Donut/DonutChart2.js.map +0 -1
  68. package/dist/components/Donut/index.d.ts +0 -1
  69. package/dist/components/Line/LineChart.cjs +0 -2
  70. package/dist/components/Line/LineChart.cjs.map +0 -1
  71. package/dist/components/Line/LineChart.js +0 -85
  72. package/dist/components/Line/LineChart.js.map +0 -1
  73. package/dist/components/Line/LineChart.vue.d.ts +0 -27
  74. package/dist/components/Line/LineChart2.cjs +0 -2
  75. package/dist/components/Line/LineChart2.cjs.map +0 -1
  76. package/dist/components/Line/LineChart2.js +0 -5
  77. package/dist/components/Line/LineChart2.js.map +0 -1
  78. package/dist/components/Line/index.d.ts +0 -1
  79. package/dist/components/Tooltip.cjs +0 -2
  80. package/dist/components/Tooltip.cjs.map +0 -1
  81. package/dist/components/Tooltip.js +0 -21
  82. package/dist/components/Tooltip.js.map +0 -1
  83. package/dist/components/Tooltip.vue.d.ts +0 -14
  84. package/dist/components/Tooltip2.cjs +0 -2
  85. package/dist/components/Tooltip2.cjs.map +0 -1
  86. package/dist/components/Tooltip2.js +0 -5
  87. package/dist/components/Tooltip2.js.map +0 -1
  88. package/dist/components.d.ts +0 -6
  89. package/dist/index.cjs +0 -2
  90. package/dist/index.cjs.map +0 -1
  91. package/dist/index.js.map +0 -1
  92. package/dist/types.cjs +0 -2
  93. package/dist/types.cjs.map +0 -1
  94. package/dist/types.d.ts +0 -4
  95. package/dist/types.js +0 -5
  96. package/dist/types.js.map +0 -1
@@ -1 +0,0 @@
1
- export { default as AreaStackedChart } from './AreaStackedChart.vue';
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("@unovis/ts"),i=require("@unovis/vue"),m=require("../Tooltip.cjs"),c=require("../../types.cjs"),f=e.defineComponent({__name:"BarChart",props:{data:{},stacked:{type:Boolean},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{},yFormatter:{},yNumTicks:{},xNumTicks:{},yAxis:{},groupPadding:{},barPadding:{},radius:{},hideLegend:{type:Boolean},orientation:{default:o.Orientation.Vertical},paginationPosition:{default:c.PaginationPosition.Bottom}},setup(p){const r=p,s=e.computed(()=>r.yAxis.map(a=>n=>n[a])),d=(a,n)=>Object.values(r.categories)[n].color,g=e.computed(()=>a=>{const n=e.createApp(m.default,{data:a,categories:r.categories}),l=document.createElement("div");n.mount(l);const t=l.innerHTML;return n.unmount(),t}),u=e.computed(()=>r.paginationPosition===c.PaginationPosition.Top);return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col space-y-4",{"flex-col-reverse":u.value}])},[e.createVNode(e.unref(i.VisXYContainer),{height:a.height},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VisTooltip),{triggers:{[e.unref(o.GroupedBar).selectors.bar]:g.value}},null,8,["triggers"]),a.stacked?(e.openBlock(),e.createBlock(e.unref(i.VisStackedBar),{key:1,data:a.data,x:(l,t)=>t,y:s.value,"grid-line":!1,"domain-line":!1,color:d,"rounded-corners":a.radius??0,"group-padding":a.groupPadding??0,"bar-padding":a.barPadding??.2,orientation:a.orientation??e.unref(o.Orientation).Vertical},null,8,["data","x","y","rounded-corners","group-padding","bar-padding","orientation"])):(e.openBlock(),e.createBlock(e.unref(i.VisGroupedBar),{key:0,data:a.data,x:(l,t)=>t,y:s.value,"grid-line":!1,"domain-line":!1,color:d,"rounded-corners":a.radius??0,"group-padding":a.groupPadding??0,"bar-padding":a.barPadding??.2,orientation:a.orientation??e.unref(o.Orientation).Vertical},null,8,["data","x","y","rounded-corners","group-padding","bar-padding","orientation"])),e.createVNode(e.unref(i.VisAxis),{type:"x",label:a.xLabel,"grid-line":!1,"domain-line":!1,"tick-format":a.xFormatter,"num-ticks":a.xNumTicks,"tick-line":!1},null,8,["label","tick-format","num-ticks"]),e.createVNode(e.unref(i.VisAxis),{type:"y",label:a.yLabel,"grid-line":a.orientation!==e.unref(o.Orientation).Horizontal,"domain-line":!1,"tick-format":a.yFormatter},null,8,["label","grid-line","tick-format"])]),_:1},8,["height"]),a.hideLegend?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex items center justify-end",{"pb-4":u.value}])},[e.createVNode(e.unref(i.VisBulletLegend),{items:Object.values(a.categories)},null,8,["items"])],2))],2))}});exports.default=f;
2
- //# sourceMappingURL=BarChart.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BarChart.cjs","sources":["../../../src/components/Bar/BarChart.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { computed, ComputedRef, createApp } from \"vue\";\nimport { BulletLegendItemInterface, GroupedBar, Orientation } from \"@unovis/ts\";\n\nimport {\n VisAxis,\n VisBulletLegend,\n VisGroupedBar,\n VisStackedBar,\n VisTooltip,\n VisXYContainer,\n} from \"@unovis/vue\";\n\nimport Tooltip from \"./../Tooltip.vue\";\nimport { PaginationPosition } from \"../../types\";\n\ntype BarChartProps<T> = {\n data: T[];\n stacked?: boolean;\n height: number;\n xLabel?: string;\n yLabel?: string;\n categories: Record<string, BulletLegendItemInterface>;\n xFormatter: (i: number, idx?: number) => string | number;\n yFormatter?: (i: number, idx?: number) => string | number;\n yNumTicks?: number;\n xNumTicks?: number;\n yAxis: (keyof T)[];\n groupPadding?: number;\n barPadding?: number;\n radius?: number;\n hideLegend?: boolean;\n orientation?: Orientation;\n paginationPosition?: PaginationPosition;\n};\n\nconst props = withDefaults(defineProps<BarChartProps<T>>(), {\n orientation: Orientation.Vertical,\n paginationPosition: PaginationPosition.Bottom,\n});\n\nconst yAxis: ComputedRef<((d: T) => T[keyof T])[]> = computed(() => {\n return props.yAxis.map((key) => (d: T) => {\n return d[key];\n });\n});\n\nconst color = (_: T, i: number) => Object.values(props.categories)[i].color;\n\nconst generateTooltip = computed(() => (d: T) => {\n const app = createApp(Tooltip, {\n data: d,\n categories: props.categories,\n });\n\n const container = document.createElement(\"div\");\n app.mount(container);\n\n const html = container.innerHTML;\n app.unmount();\n\n return html;\n});\n\nconst PaginationPositionTop = computed(\n () => props.paginationPosition === PaginationPosition.Top\n);\n</script>\n\n<template>\n <div\n class=\"flex flex-col space-y-4\"\n :class=\"{ 'flex-col-reverse': PaginationPositionTop }\"\n >\n <VisXYContainer :height=\"height\">\n <VisTooltip\n :triggers=\"{\n [GroupedBar.selectors.bar]: generateTooltip,\n }\"\n />\n\n <VisGroupedBar\n v-if=\"!stacked\"\n :data=\"data\"\n :x=\"(_: T, i: number) => i\"\n :y=\"yAxis\"\n :grid-line=\"false\"\n :domain-line=\"false\"\n :color=\"color\"\n :rounded-corners=\"radius ?? 0\"\n :group-padding=\"groupPadding ?? 0\"\n :bar-padding=\"barPadding ?? 0.2\"\n :orientation=\"orientation ?? Orientation.Vertical\"\n />\n <VisStackedBar\n v-else\n :data=\"data\"\n :x=\"(_: T, i: number) => i\"\n :y=\"yAxis\"\n :grid-line=\"false\"\n :domain-line=\"false\"\n :color=\"color\"\n :rounded-corners=\"radius ?? 0\"\n :group-padding=\"groupPadding ?? 0\"\n :bar-padding=\"barPadding ?? 0.2\"\n :orientation=\"orientation ?? Orientation.Vertical\"\n />\n <VisAxis\n type=\"x\"\n :label=\"xLabel\"\n :grid-line=\"false\"\n :domain-line=\"false\"\n :tick-format=\"xFormatter\"\n :num-ticks=\"xNumTicks\"\n :tick-line=\"false\"\n />\n <VisAxis\n type=\"y\"\n :label=\"yLabel\"\n :grid-line=\"orientation !== Orientation.Horizontal\"\n :domain-line=\"false\"\n :tick-format=\"yFormatter\"\n />\n </VisXYContainer>\n <div\n v-if=\"!hideLegend\"\n class=\"flex items center justify-end\"\n :class=\"{ 'pb-4': PaginationPositionTop }\"\n >\n <VisBulletLegend :items=\"Object.values(categories)\" />\n </div>\n </div>\n</template>\n"],"names":["props","__props","yAxis","computed","key","d","color","_","i","generateTooltip","app","createApp","Tooltip","container","html","PaginationPositionTop","PaginationPosition"],"mappings":"ulBAoCA,MAAMA,EAAQC,EAKRC,EAA+CC,EAAAA,SAAS,IACrDH,EAAM,MAAM,IAAKI,GAASC,GACxBA,EAAED,CAAG,CACb,CACF,EAEKE,EAAQ,CAACC,EAAMC,IAAc,OAAO,OAAOR,EAAM,UAAU,EAAEQ,CAAC,EAAE,MAEhEC,EAAkBN,EAAAA,SAAS,IAAOE,GAAS,CACzC,MAAAK,EAAMC,YAAUC,UAAS,CAC7B,KAAMP,EACN,WAAYL,EAAM,UAAA,CACnB,EAEKa,EAAY,SAAS,cAAc,KAAK,EAC9CH,EAAI,MAAMG,CAAS,EAEnB,MAAMC,EAAOD,EAAU,UACvB,OAAAH,EAAI,QAAQ,EAELI,CAAA,CACR,EAEKC,EAAwBZ,EAAA,SAC5B,IAAMH,EAAM,qBAAuBgB,qBAAmB,GACxD"}
@@ -1,107 +0,0 @@
1
- import { defineComponent as P, computed as s, createApp as v, createElementBlock as m, openBlock as l, normalizeClass as c, createVNode as n, createCommentVNode as B, unref as a, withCtx as V, createBlock as f } from "vue";
2
- import { Orientation as d, GroupedBar as L } from "@unovis/ts";
3
- import { VisXYContainer as T, VisTooltip as C, VisGroupedBar as A, VisStackedBar as N, VisAxis as y, VisBulletLegend as F } from "@unovis/vue";
4
- import j from "../Tooltip.js";
5
- import { PaginationPosition as b } from "../../types.js";
6
- const H = /* @__PURE__ */ P({
7
- __name: "BarChart",
8
- props: {
9
- data: {},
10
- stacked: { type: Boolean },
11
- height: {},
12
- xLabel: {},
13
- yLabel: {},
14
- categories: {},
15
- xFormatter: {},
16
- yFormatter: {},
17
- yNumTicks: {},
18
- xNumTicks: {},
19
- yAxis: {},
20
- groupPadding: {},
21
- barPadding: {},
22
- radius: {},
23
- hideLegend: { type: Boolean },
24
- orientation: { default: d.Vertical },
25
- paginationPosition: { default: b.Bottom }
26
- },
27
- setup(k) {
28
- const r = k, u = s(() => r.yAxis.map((e) => (i) => i[e])), p = (e, i) => Object.values(r.categories)[i].color, h = s(() => (e) => {
29
- const i = v(j, {
30
- data: e,
31
- categories: r.categories
32
- }), t = document.createElement("div");
33
- i.mount(t);
34
- const o = t.innerHTML;
35
- return i.unmount(), o;
36
- }), g = s(
37
- () => r.paginationPosition === b.Top
38
- );
39
- return (e, i) => (l(), m("div", {
40
- class: c(["flex flex-col space-y-4", { "flex-col-reverse": g.value }])
41
- }, [
42
- n(a(T), { height: e.height }, {
43
- default: V(() => [
44
- n(a(C), {
45
- triggers: {
46
- [a(L).selectors.bar]: h.value
47
- }
48
- }, null, 8, ["triggers"]),
49
- e.stacked ? (l(), f(a(N), {
50
- key: 1,
51
- data: e.data,
52
- x: (t, o) => o,
53
- y: u.value,
54
- "grid-line": !1,
55
- "domain-line": !1,
56
- color: p,
57
- "rounded-corners": e.radius ?? 0,
58
- "group-padding": e.groupPadding ?? 0,
59
- "bar-padding": e.barPadding ?? 0.2,
60
- orientation: e.orientation ?? a(d).Vertical
61
- }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (l(), f(a(A), {
62
- key: 0,
63
- data: e.data,
64
- x: (t, o) => o,
65
- y: u.value,
66
- "grid-line": !1,
67
- "domain-line": !1,
68
- color: p,
69
- "rounded-corners": e.radius ?? 0,
70
- "group-padding": e.groupPadding ?? 0,
71
- "bar-padding": e.barPadding ?? 0.2,
72
- orientation: e.orientation ?? a(d).Vertical
73
- }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])),
74
- n(a(y), {
75
- type: "x",
76
- label: e.xLabel,
77
- "grid-line": !1,
78
- "domain-line": !1,
79
- "tick-format": e.xFormatter,
80
- "num-ticks": e.xNumTicks,
81
- "tick-line": !1
82
- }, null, 8, ["label", "tick-format", "num-ticks"]),
83
- n(a(y), {
84
- type: "y",
85
- label: e.yLabel,
86
- "grid-line": e.orientation !== a(d).Horizontal,
87
- "domain-line": !1,
88
- "tick-format": e.yFormatter
89
- }, null, 8, ["label", "grid-line", "tick-format"])
90
- ]),
91
- _: 1
92
- }, 8, ["height"]),
93
- e.hideLegend ? B("", !0) : (l(), m("div", {
94
- key: 0,
95
- class: c(["flex items center justify-end", { "pb-4": g.value }])
96
- }, [
97
- n(a(F), {
98
- items: Object.values(e.categories)
99
- }, null, 8, ["items"])
100
- ], 2))
101
- ], 2));
102
- }
103
- });
104
- export {
105
- H as default
106
- };
107
- //# sourceMappingURL=BarChart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BarChart.js","sources":["../../../src/components/Bar/BarChart.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { computed, ComputedRef, createApp } from \"vue\";\nimport { BulletLegendItemInterface, GroupedBar, Orientation } from \"@unovis/ts\";\n\nimport {\n VisAxis,\n VisBulletLegend,\n VisGroupedBar,\n VisStackedBar,\n VisTooltip,\n VisXYContainer,\n} from \"@unovis/vue\";\n\nimport Tooltip from \"./../Tooltip.vue\";\nimport { PaginationPosition } from \"../../types\";\n\ntype BarChartProps<T> = {\n data: T[];\n stacked?: boolean;\n height: number;\n xLabel?: string;\n yLabel?: string;\n categories: Record<string, BulletLegendItemInterface>;\n xFormatter: (i: number, idx?: number) => string | number;\n yFormatter?: (i: number, idx?: number) => string | number;\n yNumTicks?: number;\n xNumTicks?: number;\n yAxis: (keyof T)[];\n groupPadding?: number;\n barPadding?: number;\n radius?: number;\n hideLegend?: boolean;\n orientation?: Orientation;\n paginationPosition?: PaginationPosition;\n};\n\nconst props = withDefaults(defineProps<BarChartProps<T>>(), {\n orientation: Orientation.Vertical,\n paginationPosition: PaginationPosition.Bottom,\n});\n\nconst yAxis: ComputedRef<((d: T) => T[keyof T])[]> = computed(() => {\n return props.yAxis.map((key) => (d: T) => {\n return d[key];\n });\n});\n\nconst color = (_: T, i: number) => Object.values(props.categories)[i].color;\n\nconst generateTooltip = computed(() => (d: T) => {\n const app = createApp(Tooltip, {\n data: d,\n categories: props.categories,\n });\n\n const container = document.createElement(\"div\");\n app.mount(container);\n\n const html = container.innerHTML;\n app.unmount();\n\n return html;\n});\n\nconst PaginationPositionTop = computed(\n () => props.paginationPosition === PaginationPosition.Top\n);\n</script>\n\n<template>\n <div\n class=\"flex flex-col space-y-4\"\n :class=\"{ 'flex-col-reverse': PaginationPositionTop }\"\n >\n <VisXYContainer :height=\"height\">\n <VisTooltip\n :triggers=\"{\n [GroupedBar.selectors.bar]: generateTooltip,\n }\"\n />\n\n <VisGroupedBar\n v-if=\"!stacked\"\n :data=\"data\"\n :x=\"(_: T, i: number) => i\"\n :y=\"yAxis\"\n :grid-line=\"false\"\n :domain-line=\"false\"\n :color=\"color\"\n :rounded-corners=\"radius ?? 0\"\n :group-padding=\"groupPadding ?? 0\"\n :bar-padding=\"barPadding ?? 0.2\"\n :orientation=\"orientation ?? Orientation.Vertical\"\n />\n <VisStackedBar\n v-else\n :data=\"data\"\n :x=\"(_: T, i: number) => i\"\n :y=\"yAxis\"\n :grid-line=\"false\"\n :domain-line=\"false\"\n :color=\"color\"\n :rounded-corners=\"radius ?? 0\"\n :group-padding=\"groupPadding ?? 0\"\n :bar-padding=\"barPadding ?? 0.2\"\n :orientation=\"orientation ?? Orientation.Vertical\"\n />\n <VisAxis\n type=\"x\"\n :label=\"xLabel\"\n :grid-line=\"false\"\n :domain-line=\"false\"\n :tick-format=\"xFormatter\"\n :num-ticks=\"xNumTicks\"\n :tick-line=\"false\"\n />\n <VisAxis\n type=\"y\"\n :label=\"yLabel\"\n :grid-line=\"orientation !== Orientation.Horizontal\"\n :domain-line=\"false\"\n :tick-format=\"yFormatter\"\n />\n </VisXYContainer>\n <div\n v-if=\"!hideLegend\"\n class=\"flex items center justify-end\"\n :class=\"{ 'pb-4': PaginationPositionTop }\"\n >\n <VisBulletLegend :items=\"Object.values(categories)\" />\n </div>\n </div>\n</template>\n"],"names":["props","__props","yAxis","computed","key","d","color","_","generateTooltip","app","createApp","Tooltip","container","html","PaginationPositionTop","PaginationPosition"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,UAAMA,IAAQC,GAKRC,IAA+CC,EAAS,MACrDH,EAAM,MAAM,IAAI,CAACI,MAAQ,CAACC,MACxBA,EAAED,CAAG,CACb,CACF,GAEKE,IAAQ,CAACC,GAAM,MAAc,OAAO,OAAOP,EAAM,UAAU,EAAE,CAAC,EAAE,OAEhEQ,IAAkBL,EAAS,MAAM,CAACE,MAAS;AACzC,YAAAI,IAAMC,EAAUC,GAAS;AAAA,QAC7B,MAAMN;AAAA,QACN,YAAYL,EAAM;AAAA,MAAA,CACnB,GAEKY,IAAY,SAAS,cAAc,KAAK;AAC9C,MAAAH,EAAI,MAAMG,CAAS;AAEnB,YAAMC,IAAOD,EAAU;AACvB,aAAAH,EAAI,QAAQ,GAELI;AAAA,IAAA,CACR,GAEKC,IAAwBX;AAAA,MAC5B,MAAMH,EAAM,uBAAuBe,EAAmB;AAAA,IACxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,36 +0,0 @@
1
- import { BulletLegendItemInterface, Orientation } from '@unovis/ts';
2
- import { PaginationPosition } from '../../types';
3
-
4
- declare const _default: <T>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
- props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & {
6
- data: T[];
7
- stacked?: boolean;
8
- height: number;
9
- xLabel?: string;
10
- yLabel?: string;
11
- categories: Record<string, BulletLegendItemInterface>;
12
- xFormatter: (i: number, idx?: number) => string | number;
13
- yFormatter?: (i: number, idx?: number) => string | number;
14
- yNumTicks?: number;
15
- xNumTicks?: number;
16
- yAxis: (keyof T)[];
17
- groupPadding?: number;
18
- barPadding?: number;
19
- radius?: number;
20
- hideLegend?: boolean;
21
- orientation?: Orientation;
22
- paginationPosition?: PaginationPosition;
23
- }, keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
24
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
25
- attrs: any;
26
- slots: ReturnType<() => {}>;
27
- emit: typeof __VLS_emit;
28
- }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
29
- [key: string]: any;
30
- }> & {
31
- __ctx?: Awaited<typeof __VLS_setup>;
32
- };
33
- export default _default;
34
- type __VLS_Prettify<T> = {
35
- [K in keyof T]: T[K];
36
- } & {};
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./BarChart.cjs");exports.default=e.default;
2
- //# sourceMappingURL=BarChart2.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BarChart2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import f from "./BarChart.js";
2
- export {
3
- f as default
4
- };
5
- //# sourceMappingURL=BarChart2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BarChart2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- export { default as BarChart } from './BarChart.vue';
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@unovis/ts"),i=require("@unovis/vue"),_=e.defineComponent({__name:"Crosshair",props:{colors:{default:()=>[]},index:{},items:{},customTooltip:{}},setup(s){const o=s,r=new WeakMap;function c(t){if(r.has(t))return r.get(t);if(typeof window<"u"){const n=document.createElement("div"),u=Object.entries(d.omit(t,[o.index])).map(([p,m])=>({...o.items.find(f=>f.name===p),value:m})),l=o.customTooltip??i.VisTooltip;return e.createApp(l,{title:t[o.index].toString(),data:u}).mount(n),r.set(t,n.innerHTML),n.innerHTML}}function a(t,n){return o.colors[n]??"transparent"}return(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(i.VisTooltip),{"horizontal-shift":20,"vertical-shift":20}),e.createVNode(e.unref(i.VisCrosshair),{template:c,color:a})],64))}});exports.default=_;
2
- //# sourceMappingURL=Crosshair.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Crosshair.cjs","sources":["../../../src/components/Crosshair/Crosshair.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { BulletLegendItemInterface } from '@unovis/ts'\nimport { omit } from '@unovis/ts'\nimport { VisCrosshair, VisTooltip } from '@unovis/vue'\nimport { type Component, createApp } from 'vue'\n\nconst props = withDefaults(defineProps<{\n colors: string[]\n index: string\n items: BulletLegendItemInterface[]\n customTooltip?: Component\n}>(), {\n colors: () => [],\n})\n\n// Use weakmap to store reference to each datapoint for Tooltip\nconst wm = new WeakMap()\nfunction template(d: any) {\n if (wm.has(d)) {\n return wm.get(d)\n }\n else {\n if (typeof window !== 'undefined') {\n const componentDiv = document.createElement('div')\n const omittedData = Object.entries(omit(d, [props.index])).map(([key, value]) => {\n const legendReference = props.items.find(i => i.name === key)\n return { ...legendReference, value }\n })\n const TooltipComponent = props.customTooltip ?? VisTooltip\n createApp(TooltipComponent, { title: d[props.index].toString(), data: omittedData }).mount(componentDiv)\n wm.set(d, componentDiv.innerHTML)\n return componentDiv.innerHTML\n }\n\n }\n}\n\nfunction color(_: unknown, i: number) {\n return props.colors[i] ?? 'transparent'\n}\n</script>\n\n<template>\n <VisTooltip :horizontal-shift=\"20\" :vertical-shift=\"20\" />\n <VisCrosshair :template=\"template\" :color=\"color\" />\n</template>"],"names":["props","__props","wm","template","d","componentDiv","omittedData","omit","key","value","i","TooltipComponent","VisTooltip","createApp","color","_"],"mappings":"wSAMA,MAAMA,EAAQC,EAURC,MAAS,QACf,SAASC,EAASC,EAAQ,CACpB,GAAAF,EAAG,IAAIE,CAAC,EACH,OAAAF,EAAG,IAAIE,CAAC,EAGX,GAAA,OAAO,OAAW,IAAa,CAC3B,MAAAC,EAAe,SAAS,cAAc,KAAK,EAC3CC,EAAc,OAAO,QAAQC,EAAK,KAAAH,EAAG,CAACJ,EAAM,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAACQ,EAAKC,CAAK,KAElE,CAAE,GADeT,EAAM,MAAM,KAAUU,GAAAA,EAAE,OAASF,CAAG,EAC/B,MAAAC,CAAM,EACpC,EACGE,EAAmBX,EAAM,eAAiBY,EAAA,WAChDC,OAAAA,EAAAA,UAAUF,EAAkB,CAAE,MAAOP,EAAEJ,EAAM,KAAK,EAAE,SAAS,EAAG,KAAMM,CAAa,CAAA,EAAE,MAAMD,CAAY,EACpGH,EAAA,IAAIE,EAAGC,EAAa,SAAS,EACzBA,EAAa,SAAA,CAGtB,CAGO,SAAAS,EAAMC,EAAYL,EAAW,CAC7B,OAAAV,EAAM,OAAOU,CAAC,GAAK,aAAA"}
@@ -1,40 +0,0 @@
1
- import { defineComponent as h, createElementBlock as _, openBlock as T, Fragment as g, createVNode as r, unref as i, createApp as x } from "vue";
2
- import { omit as w } from "@unovis/ts";
3
- import { VisTooltip as s, VisCrosshair as C } from "@unovis/vue";
4
- const B = /* @__PURE__ */ h({
5
- __name: "Crosshair",
6
- props: {
7
- colors: { default: () => [] },
8
- index: {},
9
- items: {},
10
- customTooltip: {}
11
- },
12
- setup(c) {
13
- const n = c, o = /* @__PURE__ */ new WeakMap();
14
- function a(e) {
15
- if (o.has(e))
16
- return o.get(e);
17
- if (typeof window < "u") {
18
- const t = document.createElement("div"), p = Object.entries(w(e, [n.index])).map(([f, u]) => ({ ...n.items.find((d) => d.name === f), value: u })), l = n.customTooltip ?? s;
19
- return x(l, { title: e[n.index].toString(), data: p }).mount(t), o.set(e, t.innerHTML), t.innerHTML;
20
- }
21
- }
22
- function m(e, t) {
23
- return n.colors[t] ?? "transparent";
24
- }
25
- return (e, t) => (T(), _(g, null, [
26
- r(i(s), {
27
- "horizontal-shift": 20,
28
- "vertical-shift": 20
29
- }),
30
- r(i(C), {
31
- template: a,
32
- color: m
33
- })
34
- ], 64));
35
- }
36
- });
37
- export {
38
- B as default
39
- };
40
- //# sourceMappingURL=Crosshair.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Crosshair.js","sources":["../../../src/components/Crosshair/Crosshair.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { BulletLegendItemInterface } from '@unovis/ts'\nimport { omit } from '@unovis/ts'\nimport { VisCrosshair, VisTooltip } from '@unovis/vue'\nimport { type Component, createApp } from 'vue'\n\nconst props = withDefaults(defineProps<{\n colors: string[]\n index: string\n items: BulletLegendItemInterface[]\n customTooltip?: Component\n}>(), {\n colors: () => [],\n})\n\n// Use weakmap to store reference to each datapoint for Tooltip\nconst wm = new WeakMap()\nfunction template(d: any) {\n if (wm.has(d)) {\n return wm.get(d)\n }\n else {\n if (typeof window !== 'undefined') {\n const componentDiv = document.createElement('div')\n const omittedData = Object.entries(omit(d, [props.index])).map(([key, value]) => {\n const legendReference = props.items.find(i => i.name === key)\n return { ...legendReference, value }\n })\n const TooltipComponent = props.customTooltip ?? VisTooltip\n createApp(TooltipComponent, { title: d[props.index].toString(), data: omittedData }).mount(componentDiv)\n wm.set(d, componentDiv.innerHTML)\n return componentDiv.innerHTML\n }\n\n }\n}\n\nfunction color(_: unknown, i: number) {\n return props.colors[i] ?? 'transparent'\n}\n</script>\n\n<template>\n <VisTooltip :horizontal-shift=\"20\" :vertical-shift=\"20\" />\n <VisCrosshair :template=\"template\" :color=\"color\" />\n</template>"],"names":["props","__props","wm","template","d","componentDiv","omittedData","omit","key","value","i","TooltipComponent","VisTooltip","createApp","color","_"],"mappings":";;;;;;;;;;;;AAMA,UAAMA,IAAQC,GAURC,wBAAS,QAAQ;AACvB,aAASC,EAASC,GAAQ;AACpB,UAAAF,EAAG,IAAIE,CAAC;AACH,eAAAF,EAAG,IAAIE,CAAC;AAGX,UAAA,OAAO,SAAW,KAAa;AAC3B,cAAAC,IAAe,SAAS,cAAc,KAAK,GAC3CC,IAAc,OAAO,QAAQC,EAAKH,GAAG,CAACJ,EAAM,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAACQ,GAAKC,CAAK,OAElE,EAAE,GADeT,EAAM,MAAM,KAAK,CAAKU,MAAAA,EAAE,SAASF,CAAG,GAC/B,OAAAC,EAAM,EACpC,GACGE,IAAmBX,EAAM,iBAAiBY;AAChD,eAAAC,EAAUF,GAAkB,EAAE,OAAOP,EAAEJ,EAAM,KAAK,EAAE,SAAS,GAAG,MAAMM,EAAa,CAAA,EAAE,MAAMD,CAAY,GACpGH,EAAA,IAAIE,GAAGC,EAAa,SAAS,GACzBA,EAAa;AAAA,MAAA;AAAA,IAGtB;AAGO,aAAAS,EAAMC,GAAYL,GAAW;AAC7B,aAAAV,EAAM,OAAOU,CAAC,KAAK;AAAA,IAAA;;;;;;;;;;;;;"}
@@ -1,38 +0,0 @@
1
- import { BulletLegendItemInterface } from '@unovis/ts';
2
- import { Component } from 'vue';
3
-
4
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
- colors: string[];
6
- index: string;
7
- items: BulletLegendItemInterface[];
8
- customTooltip?: Component;
9
- }>, {
10
- colors: () => any[];
11
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
12
- colors: string[];
13
- index: string;
14
- items: BulletLegendItemInterface[];
15
- customTooltip?: Component;
16
- }>, {
17
- colors: () => any[];
18
- }>>> & Readonly<{}>, {
19
- colors: string[];
20
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
21
- export default _default;
22
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
- type __VLS_TypePropsToRuntimeProps<T> = {
24
- [K in keyof T]-?: {} extends Pick<T, K> ? {
25
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
26
- } : {
27
- type: import('vue').PropType<T[K]>;
28
- required: true;
29
- };
30
- };
31
- type __VLS_WithDefaults<P, D> = {
32
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
33
- default: D[K];
34
- }> : P[K];
35
- };
36
- type __VLS_Prettify<T> = {
37
- [K in keyof T]: T[K];
38
- } & {};
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Crosshair.cjs");exports.default=e.default;
2
- //# sourceMappingURL=Crosshair2.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Crosshair2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import f from "./Crosshair.js";
2
- export {
3
- f as default
4
- };
5
- //# sourceMappingURL=Crosshair2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Crosshair2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- export { default as Crosshair } from './Crosshair.vue';
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),o=require("@unovis/vue"),u={class:"flex items-center justify-center"},d={key:0,class:"flex items-center justify-center mt-4"},g=e.defineComponent({__name:"DonutChart",props:{type:{},data:{},height:{},radius:{},hidePagination:{type:Boolean},labels:{}},setup(r){const n=r,s=t=>t,l=n.type==="half",a={[c.Donut.selectors.segment]:t=>(console.log(),`<div class='flex items-center'><div class='w-2 h-2 rounded-full mr-2' style='background-color: ${n.labels[t.index].color} ;'></div>
2
- <div>${t.data}</div>
3
- </vistooltip>
4
- </vissinglecontainer>
5
- </div>`)};return(t,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",u,[e.createVNode(e.unref(o.VisSingleContainer),{class:e.normalizeClass(l?"mt-24":""),data:t.data,height:t.height,margin:{}},{default:e.withCtx(()=>[e.createVNode(e.unref(o.VisTooltip),{"horizontal-shift":20,"vertical-shift":20,triggers:a}),e.createVNode(e.unref(o.VisDonut),{value:s,"corner-radius":t.radius,color:n.labels.map(i=>i.color),"angle-range":l?[-1.5707963267948966,1.5707963267948966]:[]},null,8,["corner-radius","color","angle-range"])]),_:1},8,["class","data","height"]),e.renderSlot(t.$slots,"default")]),t.hidePagination?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",d,[e.createVNode(e.unref(o.VisBulletLegend),{items:t.labels},null,8,["items"])]))],64))}});exports.default=g;
6
- //# sourceMappingURL=DonutChart.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DonutChart.cjs","sources":["../../../src/components/Donut/DonutChart.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Donut } from \"@unovis/ts\";\nimport {\n VisBulletLegend,\n VisDonut,\n VisSingleContainer,\n VisTooltip,\n} from \"@unovis/vue\";\n\nexport type DonutChartProps = {\n type?: string;\n data: number[];\n height: number;\n radius: number;\n hidePagination?: boolean\n labels: {\n name: string;\n color: string;\n }[];\n }\n\nconst props = defineProps<DonutChartProps>();\n\nconst value = (d: number) => d;\n\nconst isHalf = props.type === \"half\";\n\nconst tooltip = {\n [Donut.selectors.segment]: (d: any) => {\n console.log();\n\n return `<div class='flex items-center'><div class='w-2 h-2 rounded-full mr-2' style='background-color: ${\n props.labels[d.index].color\n } ;'></div>\n <div>${d.data}</div>\n </vistooltip>\n </vissinglecontainer>\n </div>`;\n },\n};\n</script>\n\n<template>\n <div class=\"flex items-center justify-center\">\n <VisSingleContainer\n :class=\"isHalf ? 'mt-24' : ''\"\n :data=\"data\"\n :height=\"height\"\n :margin=\"{}\"\n >\n <VisTooltip\n :horizontal-shift=\"20\"\n :vertical-shift=\"20\"\n :triggers=\"tooltip\"\n />\n\n <VisDonut\n :value=\"value\"\n :corner-radius=\"radius\"\n :color=\"props.labels.map((l) => l.color)\"\n :angle-range=\"isHalf ? [-1.5707963267948966, 1.5707963267948966] : []\"\n />\n </VisSingleContainer>\n\n <slot />\n </div>\n\n <div v-if=\"!hidePagination\" class=\"flex items-center justify-center mt-4\">\n <VisBulletLegend :items=\"labels\" />\n </div>\n</template>\n"],"names":["props","__props","value","d","isHalf","tooltip","Donut"],"mappings":"+ZAqBA,MAAMA,EAAQC,EAERC,EAASC,GAAcA,EAEvBC,EAASJ,EAAM,OAAS,OAExBK,EAAU,CACd,CAACC,QAAM,UAAU,OAAO,EAAIH,IAC1B,QAAQ,IAAI,EAEL,kGACLH,EAAM,OAAOG,EAAE,KAAK,EAAE,KACxB;AAAA,eACWA,EAAE,IAAI;AAAA;AAAA;AAAA,UAKrB"}
@@ -1,59 +0,0 @@
1
- import { defineComponent as m, createElementBlock as i, openBlock as n, Fragment as u, createElementVNode as g, createCommentVNode as h, createVNode as t, renderSlot as f, unref as o, normalizeClass as p, withCtx as v } from "vue";
2
- import { Donut as y } from "@unovis/ts";
3
- import { VisSingleContainer as V, VisTooltip as C, VisDonut as b, VisBulletLegend as _ } from "@unovis/vue";
4
- const k = { class: "flex items-center justify-center" }, B = {
5
- key: 0,
6
- class: "flex items-center justify-center mt-4"
7
- }, w = /* @__PURE__ */ m({
8
- __name: "DonutChart",
9
- props: {
10
- type: {},
11
- data: {},
12
- height: {},
13
- radius: {},
14
- hidePagination: { type: Boolean },
15
- labels: {}
16
- },
17
- setup(a) {
18
- const s = a, r = (e) => e, l = s.type === "half", c = {
19
- [y.selectors.segment]: (e) => (console.log(), `<div class='flex items-center'><div class='w-2 h-2 rounded-full mr-2' style='background-color: ${s.labels[e.index].color} ;'></div>
20
- <div>${e.data}</div>
21
- </vistooltip>
22
- </vissinglecontainer>
23
- </div>`)
24
- };
25
- return (e, D) => (n(), i(u, null, [
26
- g("div", k, [
27
- t(o(V), {
28
- class: p(l ? "mt-24" : ""),
29
- data: e.data,
30
- height: e.height,
31
- margin: {}
32
- }, {
33
- default: v(() => [
34
- t(o(C), {
35
- "horizontal-shift": 20,
36
- "vertical-shift": 20,
37
- triggers: c
38
- }),
39
- t(o(b), {
40
- value: r,
41
- "corner-radius": e.radius,
42
- color: s.labels.map((d) => d.color),
43
- "angle-range": l ? [-1.5707963267948966, 1.5707963267948966] : []
44
- }, null, 8, ["corner-radius", "color", "angle-range"])
45
- ]),
46
- _: 1
47
- }, 8, ["class", "data", "height"]),
48
- f(e.$slots, "default")
49
- ]),
50
- e.hidePagination ? h("", !0) : (n(), i("div", B, [
51
- t(o(_), { items: e.labels }, null, 8, ["items"])
52
- ]))
53
- ], 64));
54
- }
55
- });
56
- export {
57
- w as default
58
- };
59
- //# sourceMappingURL=DonutChart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DonutChart.js","sources":["../../../src/components/Donut/DonutChart.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Donut } from \"@unovis/ts\";\nimport {\n VisBulletLegend,\n VisDonut,\n VisSingleContainer,\n VisTooltip,\n} from \"@unovis/vue\";\n\nexport type DonutChartProps = {\n type?: string;\n data: number[];\n height: number;\n radius: number;\n hidePagination?: boolean\n labels: {\n name: string;\n color: string;\n }[];\n }\n\nconst props = defineProps<DonutChartProps>();\n\nconst value = (d: number) => d;\n\nconst isHalf = props.type === \"half\";\n\nconst tooltip = {\n [Donut.selectors.segment]: (d: any) => {\n console.log();\n\n return `<div class='flex items-center'><div class='w-2 h-2 rounded-full mr-2' style='background-color: ${\n props.labels[d.index].color\n } ;'></div>\n <div>${d.data}</div>\n </vistooltip>\n </vissinglecontainer>\n </div>`;\n },\n};\n</script>\n\n<template>\n <div class=\"flex items-center justify-center\">\n <VisSingleContainer\n :class=\"isHalf ? 'mt-24' : ''\"\n :data=\"data\"\n :height=\"height\"\n :margin=\"{}\"\n >\n <VisTooltip\n :horizontal-shift=\"20\"\n :vertical-shift=\"20\"\n :triggers=\"tooltip\"\n />\n\n <VisDonut\n :value=\"value\"\n :corner-radius=\"radius\"\n :color=\"props.labels.map((l) => l.color)\"\n :angle-range=\"isHalf ? [-1.5707963267948966, 1.5707963267948966] : []\"\n />\n </VisSingleContainer>\n\n <slot />\n </div>\n\n <div v-if=\"!hidePagination\" class=\"flex items-center justify-center mt-4\">\n <VisBulletLegend :items=\"labels\" />\n </div>\n</template>\n"],"names":["props","__props","value","d","isHalf","tooltip","Donut"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,UAAMA,IAAQC,GAERC,IAAQ,CAACC,MAAcA,GAEvBC,IAASJ,EAAM,SAAS,QAExBK,IAAU;AAAA,MACd,CAACC,EAAM,UAAU,OAAO,GAAG,CAACH,OAC1B,QAAQ,IAAI,GAEL,kGACLH,EAAM,OAAOG,EAAE,KAAK,EAAE,KACxB;AAAA,eACWA,EAAE,IAAI;AAAA;AAAA;AAAA;AAAA,IAKrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,31 +0,0 @@
1
- export type DonutChartProps = {
2
- type?: string;
3
- data: number[];
4
- height: number;
5
- radius: number;
6
- hidePagination?: boolean;
7
- labels: {
8
- name: string;
9
- color: string;
10
- }[];
11
- };
12
- declare function __VLS_template(): {
13
- default?(_: {}): any;
14
- };
15
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DonutChartProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DonutChartProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
16
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
17
- export default _default;
18
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
- type __VLS_TypePropsToRuntimeProps<T> = {
20
- [K in keyof T]-?: {} extends Pick<T, K> ? {
21
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
- } : {
23
- type: import('vue').PropType<T[K]>;
24
- required: true;
25
- };
26
- };
27
- type __VLS_WithTemplateSlots<T, S> = T & {
28
- new (): {
29
- $slots: S;
30
- };
31
- };
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./DonutChart.cjs");exports.default=e.default;
2
- //# sourceMappingURL=DonutChart2.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DonutChart2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import f from "./DonutChart.js";
2
- export {
3
- f as default
4
- };
5
- //# sourceMappingURL=DonutChart2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DonutChart2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- export { default as DonutChart } from './DonutChart.vue';
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@unovis/ts"),o=require("@unovis/vue"),d=require("../Tooltip.cjs"),f={class:"flex items center justify-end"},y=e.defineComponent({__name:"LineChart",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{type:Function},yFormatter:{type:Function},curveType:{},yNumTicks:{},xNumTicks:{},paginationPosition:{}},setup(s){const n=s,u=t=>Object.values(n.categories)[t].color,m=e.computed(()=>t=>{const i=e.createApp(d.default,{data:t,categories:n.categories}),r=document.createElement("div");i.mount(r);const a=r.innerHTML;return i.unmount(),a});return(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["space-y-4 flex flex-col",{"flex-col-reverse":n.paginationPosition==="top"}])},[e.createVNode(e.unref(o.VisXYContainer),{data:t.data,height:t.height},{default:e.withCtx(()=>[e.createVNode(e.unref(o.VisTooltip),{"horizontal-placement":e.unref(l.Position).Right,"vertical-placement":e.unref(l.Position).Top},null,8,["horizontal-placement","vertical-placement"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(n.categories),(r,a)=>(e.openBlock(),e.createBlock(e.unref(o.VisLine),{key:a,x:(c,p)=>p,y:c=>c[r],color:u(a),"curve-type":t.curveType??e.unref(l.CurveType).MonotoneX},null,8,["x","y","color","curve-type"]))),128)),e.createVNode(e.unref(o.VisAxis),{type:"x","tick-format":t.xFormatter,"num-ticks":t.xNumTicks??4,label:t.xLabel,"label-margin":8,"domain-line":!1,"grid-line":!1},null,8,["tick-format","num-ticks","label"]),e.createVNode(e.unref(o.VisAxis),{type:"y","num-ticks":t.yNumTicks??4,"tick-format":t.yFormatter,label:t.yLabel,"domain-line":!1},null,8,["num-ticks","tick-format","label"]),e.createVNode(e.unref(o.VisCrosshair),{color:"#666",template:m.value},null,8,["template"])]),_:1},8,["data","height"]),e.createElementVNode("div",f,[e.createVNode(e.unref(o.VisBulletLegend),{items:Object.values(t.categories)},null,8,["items"])])],2))}});exports.default=y;
2
- //# sourceMappingURL=LineChart.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LineChart.cjs","sources":["../../../src/components/Line/LineChart.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { computed, createApp } from \"vue\";\n\nimport { CurveType, BulletLegendItemInterface, Position } from \"@unovis/ts\";\n\n\n\nimport {\n VisAxis,\n VisBulletLegend,\n VisCrosshair,\n VisLine,\n VisXYContainer,\n VisTooltip,\n} from \"@unovis/vue\";\n\nimport Tooltip from \"./../Tooltip.vue\";\nimport { PaginationPosition } from \"../../types\";\n\ntype LineChartProps<T> = {\n data: T[];\n height: number;\n xLabel?: string;\n yLabel?: string;\n categories: Record<string, BulletLegendItemInterface>;\n xFormatter: (i: number, idx: number) => string;\n yFormatter?: (i: number, idx: number) => string;\n curveType?: CurveType;\n yNumTicks?: number;\n xNumTicks?: number;\n paginationPosition?: PaginationPosition;\n};\n\nconst props = defineProps<LineChartProps<T>>();\n\nconst color = (key: number) => Object.values(props.categories)[key].color;\n\nconst generateTooltip = computed(() => (d: T) => {\n const app = createApp(Tooltip, {\n data: d,\n categories: props.categories,\n });\n\n const container = document.createElement(\"div\");\n app.mount(container);\n\n const html = container.innerHTML;\n app.unmount();\n\n return html;\n});\n</script>\n\n<template>\n <div\n class=\"space-y-4 flex flex-col\"\n :class=\"{\n 'flex-col-reverse': props.paginationPosition === 'top',\n }\"\n >\n <VisXYContainer :data=\"data\" :height=\"height\">\n <VisTooltip\n :horizontal-placement=\"Position.Right\"\n :vertical-placement=\"Position.Top\"\n />\n <template v-for=\"(i, iKey) in Object.keys(props.categories)\" :key=\"iKey\">\n <VisLine\n :x=\"(_: any, i: number) => i\"\n :y=\"(d: T) => d[i as keyof typeof d]\"\n :color=\"color(iKey)\"\n :curve-type=\"curveType ?? CurveType.MonotoneX\"\n />\n </template>\n <VisAxis\n type=\"x\"\n :tick-format=\"xFormatter\"\n :num-ticks=\"xNumTicks ?? 4\"\n :label=\"xLabel\"\n :label-margin=\"8\"\n :domain-line=\"false\"\n :grid-line=\"false\"\n />\n <VisAxis\n type=\"y\"\n :num-ticks=\"yNumTicks ?? 4\"\n :tick-format=\"yFormatter\"\n :label=\"yLabel\"\n :domain-line=\"false\"\n />\n <VisCrosshair color=\"#666\" :template=\"generateTooltip\" />\n </VisXYContainer>\n <div class=\"flex items center justify-end\">\n <VisBulletLegend :items=\"Object.values(categories)\" />\n </div>\n </div>\n</template>\n"],"names":["props","__props","color","key","generateTooltip","computed","d","app","createApp","Tooltip","container","html"],"mappings":"0dAiCA,MAAMA,EAAQC,EAERC,EAASC,GAAgB,OAAO,OAAOH,EAAM,UAAU,EAAEG,CAAG,EAAE,MAE9DC,EAAkBC,EAAAA,SAAS,IAAOC,GAAS,CACzC,MAAAC,EAAMC,YAAUC,UAAS,CAC7B,KAAMH,EACN,WAAYN,EAAM,UAAA,CACnB,EAEKU,EAAY,SAAS,cAAc,KAAK,EAC9CH,EAAI,MAAMG,CAAS,EAEnB,MAAMC,EAAOD,EAAU,UACvB,OAAAH,EAAI,QAAQ,EAELI,CAAA,CACR"}
@@ -1,85 +0,0 @@
1
- import { defineComponent as g, computed as h, createApp as k, createElementBlock as c, openBlock as r, normalizeClass as v, createVNode as o, createElementVNode as b, unref as t, withCtx as T, Fragment as L, renderList as V, createBlock as x } from "vue";
2
- import { Position as m, CurveType as C } from "@unovis/ts";
3
- import { VisXYContainer as F, VisTooltip as N, VisLine as j, VisAxis as u, VisCrosshair as B, VisBulletLegend as z } from "@unovis/vue";
4
- import E from "../Tooltip.js";
5
- const O = { class: "flex items center justify-end" }, _ = /* @__PURE__ */ g({
6
- __name: "LineChart",
7
- props: {
8
- data: {},
9
- height: {},
10
- xLabel: {},
11
- yLabel: {},
12
- categories: {},
13
- xFormatter: { type: Function },
14
- yFormatter: { type: Function },
15
- curveType: {},
16
- yNumTicks: {},
17
- xNumTicks: {},
18
- paginationPosition: {}
19
- },
20
- setup(p) {
21
- const a = p, d = (e) => Object.values(a.categories)[e].color, f = h(() => (e) => {
22
- const l = k(E, {
23
- data: e,
24
- categories: a.categories
25
- }), i = document.createElement("div");
26
- l.mount(i);
27
- const n = i.innerHTML;
28
- return l.unmount(), n;
29
- });
30
- return (e, l) => (r(), c("div", {
31
- class: v(["space-y-4 flex flex-col", {
32
- "flex-col-reverse": a.paginationPosition === "top"
33
- }])
34
- }, [
35
- o(t(F), {
36
- data: e.data,
37
- height: e.height
38
- }, {
39
- default: T(() => [
40
- o(t(N), {
41
- "horizontal-placement": t(m).Right,
42
- "vertical-placement": t(m).Top
43
- }, null, 8, ["horizontal-placement", "vertical-placement"]),
44
- (r(!0), c(L, null, V(Object.keys(a.categories), (i, n) => (r(), x(t(j), {
45
- key: n,
46
- x: (s, y) => y,
47
- y: (s) => s[i],
48
- color: d(n),
49
- "curve-type": e.curveType ?? t(C).MonotoneX
50
- }, null, 8, ["x", "y", "color", "curve-type"]))), 128)),
51
- o(t(u), {
52
- type: "x",
53
- "tick-format": e.xFormatter,
54
- "num-ticks": e.xNumTicks ?? 4,
55
- label: e.xLabel,
56
- "label-margin": 8,
57
- "domain-line": !1,
58
- "grid-line": !1
59
- }, null, 8, ["tick-format", "num-ticks", "label"]),
60
- o(t(u), {
61
- type: "y",
62
- "num-ticks": e.yNumTicks ?? 4,
63
- "tick-format": e.yFormatter,
64
- label: e.yLabel,
65
- "domain-line": !1
66
- }, null, 8, ["num-ticks", "tick-format", "label"]),
67
- o(t(B), {
68
- color: "#666",
69
- template: f.value
70
- }, null, 8, ["template"])
71
- ]),
72
- _: 1
73
- }, 8, ["data", "height"]),
74
- b("div", O, [
75
- o(t(z), {
76
- items: Object.values(e.categories)
77
- }, null, 8, ["items"])
78
- ])
79
- ], 2));
80
- }
81
- });
82
- export {
83
- _ as default
84
- };
85
- //# sourceMappingURL=LineChart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LineChart.js","sources":["../../../src/components/Line/LineChart.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { computed, createApp } from \"vue\";\n\nimport { CurveType, BulletLegendItemInterface, Position } from \"@unovis/ts\";\n\n\n\nimport {\n VisAxis,\n VisBulletLegend,\n VisCrosshair,\n VisLine,\n VisXYContainer,\n VisTooltip,\n} from \"@unovis/vue\";\n\nimport Tooltip from \"./../Tooltip.vue\";\nimport { PaginationPosition } from \"../../types\";\n\ntype LineChartProps<T> = {\n data: T[];\n height: number;\n xLabel?: string;\n yLabel?: string;\n categories: Record<string, BulletLegendItemInterface>;\n xFormatter: (i: number, idx: number) => string;\n yFormatter?: (i: number, idx: number) => string;\n curveType?: CurveType;\n yNumTicks?: number;\n xNumTicks?: number;\n paginationPosition?: PaginationPosition;\n};\n\nconst props = defineProps<LineChartProps<T>>();\n\nconst color = (key: number) => Object.values(props.categories)[key].color;\n\nconst generateTooltip = computed(() => (d: T) => {\n const app = createApp(Tooltip, {\n data: d,\n categories: props.categories,\n });\n\n const container = document.createElement(\"div\");\n app.mount(container);\n\n const html = container.innerHTML;\n app.unmount();\n\n return html;\n});\n</script>\n\n<template>\n <div\n class=\"space-y-4 flex flex-col\"\n :class=\"{\n 'flex-col-reverse': props.paginationPosition === 'top',\n }\"\n >\n <VisXYContainer :data=\"data\" :height=\"height\">\n <VisTooltip\n :horizontal-placement=\"Position.Right\"\n :vertical-placement=\"Position.Top\"\n />\n <template v-for=\"(i, iKey) in Object.keys(props.categories)\" :key=\"iKey\">\n <VisLine\n :x=\"(_: any, i: number) => i\"\n :y=\"(d: T) => d[i as keyof typeof d]\"\n :color=\"color(iKey)\"\n :curve-type=\"curveType ?? CurveType.MonotoneX\"\n />\n </template>\n <VisAxis\n type=\"x\"\n :tick-format=\"xFormatter\"\n :num-ticks=\"xNumTicks ?? 4\"\n :label=\"xLabel\"\n :label-margin=\"8\"\n :domain-line=\"false\"\n :grid-line=\"false\"\n />\n <VisAxis\n type=\"y\"\n :num-ticks=\"yNumTicks ?? 4\"\n :tick-format=\"yFormatter\"\n :label=\"yLabel\"\n :domain-line=\"false\"\n />\n <VisCrosshair color=\"#666\" :template=\"generateTooltip\" />\n </VisXYContainer>\n <div class=\"flex items center justify-end\">\n <VisBulletLegend :items=\"Object.values(categories)\" />\n </div>\n </div>\n</template>\n"],"names":["props","__props","color","key","generateTooltip","computed","d","app","createApp","Tooltip","container","html"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiCA,UAAMA,IAAQC,GAERC,IAAQ,CAACC,MAAgB,OAAO,OAAOH,EAAM,UAAU,EAAEG,CAAG,EAAE,OAE9DC,IAAkBC,EAAS,MAAM,CAACC,MAAS;AACzC,YAAAC,IAAMC,EAAUC,GAAS;AAAA,QAC7B,MAAMH;AAAA,QACN,YAAYN,EAAM;AAAA,MAAA,CACnB,GAEKU,IAAY,SAAS,cAAc,KAAK;AAC9C,MAAAH,EAAI,MAAMG,CAAS;AAEnB,YAAMC,IAAOD,EAAU;AACvB,aAAAH,EAAI,QAAQ,GAELI;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,27 +0,0 @@
1
- import { CurveType, BulletLegendItemInterface } from '@unovis/ts';
2
- import { PaginationPosition } from '../../types';
3
-
4
- declare const _default: <T>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
- props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & {
6
- data: T[];
7
- height: number;
8
- xLabel?: string;
9
- yLabel?: string;
10
- categories: Record<string, BulletLegendItemInterface>;
11
- xFormatter: (i: number, idx: number) => string;
12
- yFormatter?: (i: number, idx: number) => string;
13
- curveType?: CurveType;
14
- yNumTicks?: number;
15
- xNumTicks?: number;
16
- paginationPosition?: PaginationPosition;
17
- }, keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
18
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
19
- attrs: any;
20
- slots: ReturnType<() => {}>;
21
- emit: typeof __VLS_emit;
22
- }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
23
- [key: string]: any;
24
- }> & {
25
- __ctx?: Awaited<typeof __VLS_setup>;
26
- };
27
- export default _default;
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./LineChart.cjs");exports.default=e.default;
2
- //# sourceMappingURL=LineChart2.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LineChart2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}