vue-chrts 0.0.142 → 0.0.143

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.
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),n=require("@unovis/vue"),g=require("../Tooltip.cjs"),y={key:0,class:"flex items center justify-end"},k=e.defineComponent({__name:"AreaChart",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{},yFormatter:{},curveType:{},xNumTicks:{default:r=>r.data.length>24?24/4:r.data.length-1},yNumTicks:{default:r=>r.data.length>24?24/4:r.data.length-1},hideLegend:{type:Boolean},hideTooltip:{type:Boolean},gridLineX:{type:Boolean},domainLineX:{type:Boolean},gridLineY:{type:Boolean},domainLineY:{type:Boolean},paginationPoisition:{}},setup(r){const l=r,s=Object.values(l.categories).map(t=>t.color),m=e.computed(()=>t=>{const o=e.createApp(g.default,{data:t,categories:l.categories}),i=document.createElement("div");o.mount(i);const a=i.innerHTML;return o.unmount(),a});function p(t){var o;return{y:i=>Number(i[t]),color:((o=l.categories[t])==null?void 0:o.color)??"#3b82f6"}}const f=s.map((t,o)=>`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),n=require("@unovis/vue"),f=require("../Tooltip.cjs"),y={key:0,class:"flex items center justify-end"},k=e.defineComponent({__name:"AreaChart",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{},yFormatter:{},curveType:{},xNumTicks:{default:r=>r.data.length>24?24/4:r.data.length-1},yNumTicks:{default:r=>r.data.length>24?24/4:r.data.length-1},hideLegend:{type:Boolean},hideTooltip:{type:Boolean},gridLineX:{type:Boolean},domainLineX:{type:Boolean},gridLineY:{type:Boolean},domainLineY:{type:Boolean},paginationPoisition:{}},setup(r){const l=r,s=Object.values(l.categories).map(t=>t.color),p=e.computed(()=>t=>{const o=e.createApp(f.default,{data:t,categories:l.categories}),i=document.createElement("div");o.mount(i);const a=i.innerHTML;return o.unmount(),a});function m(t){var o;return{y:i=>Number(i[t]),color:((o=l.categories[t])==null?void 0:o.color)??"#3b82f6"}}const g=s.map((t,o)=>`
2
2
  <linearGradient id="gradient${o}-${t}" gradientTransform="rotate(90)">
3
3
  <stop offset="0%" stop-color="${t}" stop-opacity="1" />
4
4
  <stop offset="100%" stop-color="${t}" stop-opacity="0" />
5
5
  </linearGradient>
6
- `).join("");return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col space-y-4",{"flex-col-reverse":l.paginationPoisition==="top"}])},[e.createVNode(e.unref(n.VisXYContainer),{data:t.data,height:t.height,"svg-defs":e.unref(f)},{default:e.withCtx(()=>[t.hideTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n.VisTooltip),{key:0,"horizontal-placement":e.unref(c.Position).Right,"vertical-placement":e.unref(c.Position).Top},null,8,["horizontal-placement","vertical-placement"])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(l.categories),(i,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[e.createVNode(e.unref(n.VisArea),e.mergeProps({x:(u,d)=>d,ref_for:!0},p(i),{color:`url(#gradient${a}-${e.unref(s)[a]})`,opacity:.5,"curve-type":t.curveType??e.unref(c.CurveType).MonotoneX}),null,16,["x","color","curve-type"]),e.createVNode(e.unref(n.VisLine),{x:(u,d)=>d,y:u=>u[i],color:e.unref(s)[a],"curve-type":t.curveType??e.unref(c.CurveType).MonotoneX},null,8,["x","y","color","curve-type"])],64))),128)),e.createVNode(e.unref(n.VisAxis),{type:"x","tick-format":t.xFormatter,"num-ticks":t.xNumTicks,label:t.xLabel,"grid-line":t.gridLineX,"domain-line":t.domainLineX,"tick-line":!!t.gridLineX},null,8,["tick-format","num-ticks","label","grid-line","domain-line","tick-line"]),e.createVNode(e.unref(n.VisAxis),{type:"y","num-ticks":t.yNumTicks??t.data.length,"tick-format":t.yFormatter,label:t.yLabel,"grid-line":t.gridLineY,"domain-line":t.domainLineY,"tick-line":!!t.gridLineY},null,8,["num-ticks","tick-format","label","grid-line","domain-line","tick-line"]),t.hideTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n.VisCrosshair),{key:1,color:"#666",template:m.value},null,8,["template"]))]),_:1},8,["data","height","svg-defs"]),t.hideLegend?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(e.unref(n.VisBulletLegend),{items:Object.values(t.categories)},null,8,["items"])]))],2))}});exports.default=k;
6
+ `).join("");return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col space-y-4",{"flex-col-reverse":l.paginationPoisition==="top"}])},[e.createVNode(e.unref(n.VisXYContainer),{data:t.data,height:t.height,"svg-defs":e.unref(g)},{default:e.withCtx(()=>[t.hideTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n.VisTooltip),{key:0,"horizontal-placement":e.unref(c.Position).Right,"vertical-placement":e.unref(c.Position).Top},null,8,["horizontal-placement","vertical-placement"])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(l.categories),(i,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[e.createVNode(e.unref(n.VisArea),e.mergeProps({x:(u,d)=>d,ref_for:!0},m(i),{color:`url(#gradient${a}-${e.unref(s)[a]})`,opacity:.5,"curve-type":t.curveType??e.unref(c.CurveType).MonotoneX}),null,16,["x","color","curve-type"]),e.createVNode(e.unref(n.VisLine),{x:(u,d)=>d,y:u=>u[i],color:e.unref(s)[a],"curve-type":t.curveType??e.unref(c.CurveType).MonotoneX},null,8,["x","y","color","curve-type"])],64))),128)),e.createVNode(e.unref(n.VisAxis),{type:"x","tick-format":t.xFormatter,"num-ticks":t.xNumTicks,label:t.xLabel,"grid-line":t.gridLineX,"domain-line":t.domainLineX,"tick-line":!!t.gridLineX},null,8,["tick-format","num-ticks","label","grid-line","domain-line","tick-line"]),e.createVNode(e.unref(n.VisAxis),{type:"y","num-ticks":t.yNumTicks??t.data.length,"tick-format":t.yFormatter,label:t.yLabel,"grid-line":t.gridLineY,"domain-line":t.domainLineY,"tick-line":!!t.gridLineY},null,8,["num-ticks","tick-format","label","grid-line","domain-line","tick-line"]),t.hideTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n.VisCrosshair),{key:1,color:"#666",template:p.value},null,8,["template"]))]),_:1},8,["data","height","svg-defs"]),t.hideLegend?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(e.unref(n.VisBulletLegend),{items:Object.values(t.categories)},null,8,["items"])]))],2))}});exports.default=k;
7
7
  //# sourceMappingURL=AreaChart.cjs.map
@@ -1,6 +1,6 @@
1
- import { defineComponent as b, computed as B, createApp as V, createElementBlock as c, openBlock as r, normalizeClass as C, createVNode as l, createCommentVNode as u, unref as t, withCtx as X, createBlock as g, Fragment as y, renderList as N, mergeProps as Y } from "vue";
2
- import { Position as f, CurveType as h } from "@unovis/ts";
3
- import { VisXYContainer as $, VisTooltip as j, VisArea as F, VisLine as A, VisAxis as k, VisCrosshair as P, VisBulletLegend as z } from "@unovis/vue";
1
+ import { defineComponent as b, computed as B, createApp as V, createElementBlock as c, openBlock as r, normalizeClass as C, createVNode as l, createCommentVNode as u, unref as t, withCtx as X, createBlock as g, Fragment as f, renderList as N, mergeProps as $ } from "vue";
2
+ import { Position as y, CurveType as h } from "@unovis/ts";
3
+ import { VisXYContainer as Y, VisTooltip as j, VisArea as F, VisLine as A, VisAxis as k, VisCrosshair as P, VisBulletLegend as z } from "@unovis/vue";
4
4
  import M from "../Tooltip.js";
5
5
  const O = {
6
6
  key: 0,
@@ -56,7 +56,7 @@ const O = {
56
56
  "flex-col-reverse": s.paginationPoisition === "top"
57
57
  }])
58
58
  }, [
59
- l(t($), {
59
+ l(t(Y), {
60
60
  data: e.data,
61
61
  height: e.height,
62
62
  "svg-defs": t(T)
@@ -64,11 +64,11 @@ const O = {
64
64
  default: X(() => [
65
65
  e.hideTooltip ? u("", !0) : (r(), g(t(j), {
66
66
  key: 0,
67
- "horizontal-placement": t(f).Right,
68
- "vertical-placement": t(f).Top
67
+ "horizontal-placement": t(y).Right,
68
+ "vertical-placement": t(y).Top
69
69
  }, null, 8, ["horizontal-placement", "vertical-placement"])),
70
- (r(!0), c(y, null, N(Object.keys(s.categories), (n, a) => (r(), c(y, { key: a }, [
71
- l(t(F), Y({
70
+ (r(!0), c(f, null, N(Object.keys(s.categories), (n, a) => (r(), c(f, { key: a }, [
71
+ l(t(F), $({
72
72
  x: (d, p) => p,
73
73
  ref_for: !0
74
74
  }, L(n), {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("@unovis/vue"),d=require("@unovis/ts"),p=require("../Tooltip.cjs"),m={class:"flex flex-col space-y-4"},f={class:"flex items center justify-end"},v=e.defineComponent({__name:"AreaStackedChart",props:{data:{},categories:{},hideTooltip:{type:Boolean}},setup(s){const a=s,c=e.computed(()=>t=>{const n=e.createApp(p.default,{data:t,categories:a.categories}),r=document.createElement("div");n.mount(r);const l=r.innerHTML;return n.unmount(),l}),i=t=>Number.parseInt(t.time),u=[t=>t.firstTime,t=>t.returning];return(t,n)=>(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.unref(o.VisXYContainer),{data:t.data,height:200},{default:e.withCtx(()=>[e.createVNode(e.unref(o.VisArea),{x:i,y:u,color:Object.values(a.categories).map(r=>r.color),"curve-type":e.unref(d.CurveType).Linear},null,8,["color","curve-type"]),e.createVNode(e.unref(o.VisAxis),{type:"x",label:"Time","num-ticks":12}),e.createVNode(e.unref(o.VisAxis),{type:"y",label:"Number of visitors","num-ticks":3}),t.hideTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(o.VisCrosshair),{key:0,color:"#666",template:c.value},null,8,["template"]))]),_:1},8,["data"]),e.createElementVNode("div",f,[e.createVNode(e.unref(o.VisBulletLegend),{items:Object.values(t.categories)},null,8,["items"])])]))}});exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@unovis/vue"),p=require("@unovis/ts"),d=require("../Tooltip.cjs"),m={class:"flex flex-col space-y-4"},f={class:"flex items center justify-end"},_=e.defineComponent({__name:"AreaStackedChart",props:{data:{},categories:{},hideTooltip:{type:Boolean}},setup(s){const a=s,c=e.computed(()=>t=>{const n=e.createApp(d.default,{data:t,categories:a.categories}),o=document.createElement("div");n.mount(o);const l=o.innerHTML;return n.unmount(),l}),i=t=>Number.parseInt(t.time),u=[t=>t.firstTime,t=>t.returning];return(t,n)=>(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.unref(r.VisXYContainer),{data:t.data,height:200},{default:e.withCtx(()=>[e.createVNode(e.unref(r.VisArea),{x:i,y:u,color:Object.values(a.categories).map(o=>o.color),"curve-type":e.unref(p.CurveType).Linear},null,8,["color","curve-type"]),e.createVNode(e.unref(r.VisAxis),{type:"x",label:"Time","num-ticks":12}),e.createVNode(e.unref(r.VisAxis),{type:"y",label:"Number of visitors","num-ticks":3}),t.hideTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r.VisCrosshair),{key:0,color:"#666",template:c.value},null,8,["template"]))]),_:1},8,["data"]),e.createElementVNode("div",f,[e.createVNode(e.unref(r.VisBulletLegend),{items:Object.values(t.categories)},null,8,["items"])])]))}});exports.default=_;
2
2
  //# sourceMappingURL=AreaStackedChart.cjs.map
@@ -1,5 +1,5 @@
1
- import { defineComponent as d, computed as f, createApp as h, createElementBlock as y, openBlock as i, createVNode as o, createElementVNode as v, unref as t, withCtx as g, createBlock as T, createCommentVNode as V } from "vue";
2
- import { VisXYContainer as _, VisArea as k, VisAxis as s, VisCrosshair as C, VisBulletLegend as b } from "@unovis/vue";
1
+ import { defineComponent as d, computed as f, createApp as h, createElementBlock as y, openBlock as i, createVNode as o, createElementVNode as v, unref as t, withCtx as _, createBlock as g, createCommentVNode as V } from "vue";
2
+ import { VisXYContainer as k, VisArea as C, VisAxis as s, VisCrosshair as T, VisBulletLegend as b } from "@unovis/vue";
3
3
  import { CurveType as x } from "@unovis/ts";
4
4
  import B from "../Tooltip.js";
5
5
  const N = { class: "flex flex-col space-y-4" }, A = { class: "flex items center justify-end" }, w = /* @__PURE__ */ d({
@@ -20,12 +20,12 @@ const N = { class: "flex flex-col space-y-4" }, A = { class: "flex items center
20
20
  return a.unmount(), u;
21
21
  }), m = (e) => Number.parseInt(e.time), p = [(e) => e.firstTime, (e) => e.returning];
22
22
  return (e, a) => (i(), y("div", N, [
23
- o(t(_), {
23
+ o(t(k), {
24
24
  data: e.data,
25
25
  height: 200
26
26
  }, {
27
- default: g(() => [
28
- o(t(k), {
27
+ default: _(() => [
28
+ o(t(C), {
29
29
  x: m,
30
30
  y: p,
31
31
  color: Object.values(n.categories).map((r) => r.color),
@@ -41,7 +41,7 @@ const N = { class: "flex flex-col space-y-4" }, A = { class: "flex items center
41
41
  label: "Number of visitors",
42
42
  "num-ticks": 3
43
43
  }),
44
- e.hideTooltip ? V("", !0) : (i(), T(t(C), {
44
+ e.hideTooltip ? V("", !0) : (i(), g(t(T), {
45
45
  key: 0,
46
46
  color: "#666",
47
47
  template: l.value
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@unovis/ts"),i=require("@unovis/vue"),m=require("../Tooltip.cjs"),g=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:r.Orientation.Vertical},paginationPosition:{default:g.PaginationPosition.Bottom}},setup(p){const t=p,d=e.computed(()=>t.yAxis.map(a=>n=>n[a])),s=(a,n)=>Object.values(t.categories)[n].color,u=e.computed(()=>a=>{const n=e.createApp(m.default,{data:a,categories:t.categories}),l=document.createElement("div");n.mount(l);const o=l.innerHTML;return n.unmount(),o}),c=e.computed(()=>t.paginationPosition===g.PaginationPosition.Top);return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col space-y-4",{"flex-col-reverse":c.value}])},[e.createVNode(e.unref(i.VisXYContainer),{height:a.height},{default:e.withCtx(()=>[e.createVNode(e.unref(i.VisTooltip),{triggers:{[e.unref(r.GroupedBar).selectors.bar]:u.value,[e.unref(r.StackedBar).selectors.bar]:u.value}},null,8,["triggers"]),a.stacked?(e.openBlock(),e.createBlock(e.unref(i.VisStackedBar),{key:1,data:a.data,x:(l,o)=>o,y:d.value,"grid-line":!1,"domain-line":!1,color:s,"rounded-corners":a.radius??0,"group-padding":a.groupPadding??0,"bar-padding":a.barPadding??.2,orientation:a.orientation??e.unref(r.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,o)=>o,y:d.value,"grid-line":!1,"domain-line":!1,color:s,"rounded-corners":a.radius??0,"group-padding":a.groupPadding??0,"bar-padding":a.barPadding??.2,orientation:a.orientation??e.unref(r.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(r.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":c.value}])},[e.createVNode(e.unref(i.VisBulletLegend),{items:Object.values(a.categories)},null,8,["items"])],2))],2))}});exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@unovis/ts"),t=require("@unovis/vue"),m=require("../Tooltip.cjs"),p=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:r.Orientation.Vertical},paginationPosition:{default:p.PaginationPosition.Bottom}},setup(g){const o=g,s=e.computed(()=>o.yAxis.map(a=>n=>n[a])),d=(a,n)=>Object.values(o.categories)[n].color,u=e.computed(()=>a=>{const n=e.createApp(m.default,{data:a,categories:o.categories}),l=document.createElement("div");n.mount(l);const i=l.innerHTML;return n.unmount(),i}),c=e.computed(()=>o.paginationPosition===p.PaginationPosition.Top);return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col space-y-4",{"flex-col-reverse":c.value}])},[e.createVNode(e.unref(t.VisXYContainer),{height:a.height},{default:e.withCtx(()=>[e.createVNode(e.unref(t.VisTooltip),{triggers:{[e.unref(r.GroupedBar).selectors.bar]:u.value,[e.unref(r.StackedBar).selectors.bar]:u.value}},null,8,["triggers"]),a.stacked?(e.openBlock(),e.createBlock(e.unref(t.VisStackedBar),{key:1,data:a.data,x:(l,i)=>i,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(r.Orientation).Vertical},null,8,["data","x","y","rounded-corners","group-padding","bar-padding","orientation"])):(e.openBlock(),e.createBlock(e.unref(t.VisGroupedBar),{key:0,data:a.data,x:(l,i)=>i,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(r.Orientation).Vertical},null,8,["data","x","y","rounded-corners","group-padding","bar-padding","orientation"])),e.createVNode(e.unref(t.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(t.VisAxis),{type:"y",label:a.yLabel,"grid-line":a.orientation!==e.unref(r.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":c.value}])},[e.createVNode(e.unref(t.VisBulletLegend),{items:Object.values(a.categories)},null,8,["items"])],2))],2))}});exports.default=f;
2
2
  //# sourceMappingURL=BarChart.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as v, computed as s, createApp as B, createElementBlock as c, openBlock as l, normalizeClass as f, createVNode as r, createCommentVNode as P, unref as a, withCtx as V, createBlock as y } from "vue";
2
- import { Orientation as d, StackedBar as T, GroupedBar as L } from "@unovis/ts";
2
+ import { Orientation as d, StackedBar as L, GroupedBar as T } from "@unovis/ts";
3
3
  import { VisXYContainer as C, VisTooltip as A, VisGroupedBar as N, VisStackedBar as F, VisAxis as b, VisBulletLegend as j } from "@unovis/vue";
4
4
  import O from "../Tooltip.js";
5
5
  import { PaginationPosition as k } from "../../types.js";
@@ -25,16 +25,16 @@ const S = /* @__PURE__ */ v({
25
25
  paginationPosition: { default: k.Bottom }
26
26
  },
27
27
  setup(h) {
28
- const t = h, u = s(() => t.yAxis.map((e) => (i) => i[e])), p = (e, i) => Object.values(t.categories)[i].color, g = s(() => (e) => {
28
+ const n = h, u = s(() => n.yAxis.map((e) => (i) => i[e])), p = (e, i) => Object.values(n.categories)[i].color, g = s(() => (e) => {
29
29
  const i = B(O, {
30
30
  data: e,
31
- categories: t.categories
32
- }), n = document.createElement("div");
33
- i.mount(n);
34
- const o = n.innerHTML;
31
+ categories: n.categories
32
+ }), t = document.createElement("div");
33
+ i.mount(t);
34
+ const o = t.innerHTML;
35
35
  return i.unmount(), o;
36
36
  }), m = s(
37
- () => t.paginationPosition === k.Top
37
+ () => n.paginationPosition === k.Top
38
38
  );
39
39
  return (e, i) => (l(), c("div", {
40
40
  class: f(["flex flex-col space-y-4", { "flex-col-reverse": m.value }])
@@ -43,14 +43,14 @@ const S = /* @__PURE__ */ v({
43
43
  default: V(() => [
44
44
  r(a(A), {
45
45
  triggers: {
46
- [a(L).selectors.bar]: g.value,
47
- [a(T).selectors.bar]: g.value
46
+ [a(T).selectors.bar]: g.value,
47
+ [a(L).selectors.bar]: g.value
48
48
  }
49
49
  }, null, 8, ["triggers"]),
50
50
  e.stacked ? (l(), y(a(F), {
51
51
  key: 1,
52
52
  data: e.data,
53
- x: (n, o) => o,
53
+ x: (t, o) => o,
54
54
  y: u.value,
55
55
  "grid-line": !1,
56
56
  "domain-line": !1,
@@ -62,7 +62,7 @@ const S = /* @__PURE__ */ v({
62
62
  }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (l(), y(a(N), {
63
63
  key: 0,
64
64
  data: e.data,
65
- x: (n, o) => o,
65
+ x: (t, o) => o,
66
66
  y: u.value,
67
67
  "grid-line": !1,
68
68
  "domain-line": !1,
@@ -2,7 +2,7 @@ import { defineComponent as g, computed as h, createApp as k, createElementBlock
2
2
  import { Position as m, CurveType as C } from "@unovis/ts";
3
3
  import { VisXYContainer as F, VisTooltip as N, VisLine as j, VisAxis as u, VisCrosshair as B, VisBulletLegend as z } from "@unovis/vue";
4
4
  import E from "../Tooltip.js";
5
- const O = { class: "flex items center justify-end" }, w = /* @__PURE__ */ g({
5
+ const O = { class: "flex items center justify-end" }, _ = /* @__PURE__ */ g({
6
6
  __name: "LineChart",
7
7
  props: {
8
8
  data: {},
@@ -80,6 +80,6 @@ const O = { class: "flex items center justify-end" }, w = /* @__PURE__ */ g({
80
80
  }
81
81
  });
82
82
  export {
83
- w as default
83
+ _ as default
84
84
  };
85
85
  //# sourceMappingURL=LineChart.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Tooltip2.cjs");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-cce34be2"]]);exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i={class:"flex flex-col space-y-1"},d={class:"font-semibold mr-2 text-(--tooltip-label-color)"},u={class:"font-normal text-(--tooltip-value-color)"},m=e.defineComponent({__name:"Tooltip",props:{data:{},categories:{}},setup(n){const l=n,r=["_index","_stacked","_ending"],s=e.computed(()=>Object.entries(l.data).filter(([o,c])=>{var t;return!r.includes(o)&&((t=l.categories[o])==null?void 0:t.color)}));return(o,c)=>(e.openBlock(),e.createElementBlock("div",i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,([t,a])=>(e.openBlock(),e.createElementBlock("div",{key:t,class:"flex items-center mr-2"},[e.createElementVNode("span",{class:"w-2 h-2 rounded mr-2",style:e.normalizeStyle({backgroundColor:o.categories[t].color})},null,4),e.createElementVNode("div",null,[e.createElementVNode("span",d,e.toDisplayString(t)+":",1),e.createElementVNode("span",u,e.toDisplayString(a),1)])]))),128))]))}});exports.default=m;
2
2
  //# sourceMappingURL=Tooltip.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"Tooltip.cjs","sources":["../../src/components/Tooltip.vue"],"sourcesContent":["<script lang=\"ts\" setup generic=\"T\">\nimport { BulletLegendItemInterface } from \"@unovis/ts\";\nimport { computed } from \"vue\";\n\nconst props = defineProps<{\n data: T;\n categories: Record<string, BulletLegendItemInterface>;\n}>();\n\nconst keyBlockList = [\"_index\", \"_stacked\", \"_ending\"];\n\nconst visibleEntries = computed(() => {\n return Object.entries(props.data).filter(\n ([key, _]) => !keyBlockList.includes(key) && props.categories[key]?.color\n );\n});\n</script>\n\n<template>\n <div class=\"flex flex-col space-y-1\">\n <div \n v-for=\"[key, value] in visibleEntries\" \n :key=\"key\"\n class=\"flex items-center mr-2\"\n >\n <span\n class=\"w-2 h-2 rounded mr-2\"\n :style=\"{ backgroundColor: categories[key].color }\"\n ></span>\n <div>\n <span class=\"font-semibold mr-2 text-(--tooltip-label-color)\">{{ key }}:</span>\n <span class=\"font-normal text-(--tooltip-value-color)\">{{ value }}</span>\n </div>\n </div>\n </div>\n</template>\n"],"names":["props","__props","keyBlockList","visibleEntries","computed","key","_","_a"],"mappings":"qWAIA,MAAMA,EAAQC,EAKRC,EAAe,CAAC,SAAU,WAAY,SAAS,EAE/CC,EAAiBC,EAAAA,SAAS,IACvB,OAAO,QAAQJ,EAAM,IAAI,EAAE,OAChC,CAAC,CAACK,EAAKC,CAAC,IAAM,OAAA,OAACJ,EAAa,SAASG,CAAG,KAAKE,EAAAP,EAAM,WAAWK,CAAG,IAApB,YAAAE,EAAuB,OACtE,CACD"}
@@ -1,8 +1,35 @@
1
- import o from "./Tooltip2.js";
2
- /* empty css */
3
- import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cce34be2"]]);
1
+ import { defineComponent as m, computed as u, createElementBlock as s, openBlock as l, Fragment as _, renderList as f, createElementVNode as o, normalizeStyle as g, toDisplayString as r } from "vue";
2
+ const x = { class: "flex flex-col space-y-1" }, v = { class: "font-semibold mr-2 text-(--tooltip-label-color)" }, b = { class: "font-normal text-(--tooltip-value-color)" }, k = /* @__PURE__ */ m({
3
+ __name: "Tooltip",
4
+ props: {
5
+ data: {},
6
+ categories: {}
7
+ },
8
+ setup(c) {
9
+ const n = c, a = ["_index", "_stacked", "_ending"], i = u(() => Object.entries(n.data).filter(
10
+ ([t, d]) => {
11
+ var e;
12
+ return !a.includes(t) && ((e = n.categories[t]) == null ? void 0 : e.color);
13
+ }
14
+ ));
15
+ return (t, d) => (l(), s("div", x, [
16
+ (l(!0), s(_, null, f(i.value, ([e, p]) => (l(), s("div", {
17
+ key: e,
18
+ class: "flex items-center mr-2"
19
+ }, [
20
+ o("span", {
21
+ class: "w-2 h-2 rounded mr-2",
22
+ style: g({ backgroundColor: t.categories[e].color })
23
+ }, null, 4),
24
+ o("div", null, [
25
+ o("span", v, r(e) + ":", 1),
26
+ o("span", b, r(p), 1)
27
+ ])
28
+ ]))), 128))
29
+ ]));
30
+ }
31
+ });
5
32
  export {
6
- e as default
33
+ k as default
7
34
  };
8
35
  //# sourceMappingURL=Tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../src/components/Tooltip.vue"],"sourcesContent":["<script lang=\"ts\" setup generic=\"T\">\nimport { BulletLegendItemInterface } from \"@unovis/ts\";\nimport { computed } from \"vue\";\n\nconst props = defineProps<{\n data: T;\n categories: Record<string, BulletLegendItemInterface>;\n}>();\n\nconst keyBlockList = [\"_index\", \"_stacked\", \"_ending\"];\n\nconst visibleEntries = computed(() => {\n return Object.entries(props.data).filter(\n ([key, _]) => !keyBlockList.includes(key) && props.categories[key]?.color\n );\n});\n</script>\n\n<template>\n <div class=\"flex flex-col space-y-1\">\n <div \n v-for=\"[key, value] in visibleEntries\" \n :key=\"key\"\n class=\"flex items-center mr-2\"\n >\n <span\n class=\"w-2 h-2 rounded mr-2\"\n :style=\"{ backgroundColor: categories[key].color }\"\n ></span>\n <div>\n <span class=\"font-semibold mr-2 text-(--tooltip-label-color)\">{{ key }}:</span>\n <span class=\"font-normal text-(--tooltip-value-color)\">{{ value }}</span>\n </div>\n </div>\n </div>\n</template>\n"],"names":["props","__props","keyBlockList","visibleEntries","computed","key","_","_a"],"mappings":";;;;;;;;AAIA,UAAMA,IAAQC,GAKRC,IAAe,CAAC,UAAU,YAAY,SAAS,GAE/CC,IAAiBC,EAAS,MACvB,OAAO,QAAQJ,EAAM,IAAI,EAAE;AAAA,MAChC,CAAC,CAACK,GAAKC,CAAC,MAAM;;AAAA,gBAACJ,EAAa,SAASG,CAAG,OAAKE,IAAAP,EAAM,WAAWK,CAAG,MAApB,gBAAAE,EAAuB;AAAA;AAAA,IACtE,CACD;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i={class:"flex flex-col space-y-1"},d={id:"t-label",class:"font-semibold mr-2"},u={id:"t-value",class:"font-normal"},m=e.defineComponent({__name:"Tooltip",props:{data:{},categories:{}},setup(n){const l=n,s=["_index","_stacked","_ending"],r=e.computed(()=>Object.entries(l.data).filter(([o,c])=>{var t;return!s.includes(o)&&((t=l.categories[o])==null?void 0:t.color)}));return(o,c)=>(e.openBlock(),e.createElementBlock("div",i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,([t,a])=>(e.openBlock(),e.createElementBlock("div",{key:t,class:"flex items-center mr-2"},[e.createElementVNode("span",{class:"w-2 h-2 rounded mr-2",style:e.normalizeStyle({backgroundColor:o.categories[t].color})},null,4),e.createElementVNode("div",null,[e.createElementVNode("span",d,e.toDisplayString(t)+":",1),e.createElementVNode("span",u,e.toDisplayString(a),1)])]))),128))]))}});exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Tooltip.cjs");exports.default=e.default;
2
2
  //# sourceMappingURL=Tooltip2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip2.cjs","sources":["../../src/components/Tooltip.vue"],"sourcesContent":["<script lang=\"ts\" setup generic=\"T\">\nimport { BulletLegendItemInterface } from \"@unovis/ts\";\nimport { computed } from \"vue\";\n\nconst props = defineProps<{\n data: T;\n categories: Record<string, BulletLegendItemInterface>;\n}>();\n\nconst keyBlockList = [\"_index\", \"_stacked\", \"_ending\"];\n\nconst visibleEntries = computed(() => {\n return Object.entries(props.data).filter(\n ([key, _]) => !keyBlockList.includes(key) && props.categories[key]?.color\n );\n});\n</script>\n\n<template>\n <div class=\"flex flex-col space-y-1\">\n <div \n v-for=\"[key, value] in visibleEntries\" \n :key=\"key\"\n class=\"flex items-center mr-2\"\n >\n <span\n class=\"w-2 h-2 rounded mr-2\"\n :style=\"{ backgroundColor: categories[key].color }\"\n ></span>\n <div>\n <span id=\"t-label\" class=\"font-semibold mr-2\">{{ key }}:</span>\n <span id=\"t-value\" class=\"font-normal\">{{ value }}</span>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n#t-label {\n margin-right: 8px;\n color: var(--tooltip-label-color);\n text-transform: capitalize;\n}\n\n#t-value {\n color: var(--tooltip-value-color);\n}\n</style>\n"],"names":["props","__props","keyBlockList","visibleEntries","computed","key","_","_a"],"mappings":"qUAIA,MAAMA,EAAQC,EAKRC,EAAe,CAAC,SAAU,WAAY,SAAS,EAE/CC,EAAiBC,EAAAA,SAAS,IACvB,OAAO,QAAQJ,EAAM,IAAI,EAAE,OAChC,CAAC,CAACK,EAAKC,CAAC,IAAM,OAAA,OAACJ,EAAa,SAASG,CAAG,KAAKE,EAAAP,EAAM,WAAWK,CAAG,IAApB,YAAAE,EAAuB,OACtE,CACD"}
1
+ {"version":3,"file":"Tooltip2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,41 +1,5 @@
1
- import { defineComponent as p, computed as u, createElementBlock as s, openBlock as n, Fragment as _, renderList as f, createElementVNode as o, normalizeStyle as g, toDisplayString as r } from "vue";
2
- const v = { class: "flex flex-col space-y-1" }, b = {
3
- id: "t-label",
4
- class: "font-semibold mr-2"
5
- }, h = {
6
- id: "t-value",
7
- class: "font-normal"
8
- }, k = /* @__PURE__ */ p({
9
- __name: "Tooltip",
10
- props: {
11
- data: {},
12
- categories: {}
13
- },
14
- setup(c) {
15
- const l = c, a = ["_index", "_stacked", "_ending"], i = u(() => Object.entries(l.data).filter(
16
- ([t, d]) => {
17
- var e;
18
- return !a.includes(t) && ((e = l.categories[t]) == null ? void 0 : e.color);
19
- }
20
- ));
21
- return (t, d) => (n(), s("div", v, [
22
- (n(!0), s(_, null, f(i.value, ([e, m]) => (n(), s("div", {
23
- key: e,
24
- class: "flex items-center mr-2"
25
- }, [
26
- o("span", {
27
- class: "w-2 h-2 rounded mr-2",
28
- style: g({ backgroundColor: t.categories[e].color })
29
- }, null, 4),
30
- o("div", null, [
31
- o("span", b, r(e) + ":", 1),
32
- o("span", h, r(m), 1)
33
- ])
34
- ]))), 128))
35
- ]));
36
- }
37
- });
1
+ import f from "./Tooltip.js";
38
2
  export {
39
- k as default
3
+ f as default
40
4
  };
41
5
  //# sourceMappingURL=Tooltip2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip2.js","sources":["../../src/components/Tooltip.vue"],"sourcesContent":["<script lang=\"ts\" setup generic=\"T\">\nimport { BulletLegendItemInterface } from \"@unovis/ts\";\nimport { computed } from \"vue\";\n\nconst props = defineProps<{\n data: T;\n categories: Record<string, BulletLegendItemInterface>;\n}>();\n\nconst keyBlockList = [\"_index\", \"_stacked\", \"_ending\"];\n\nconst visibleEntries = computed(() => {\n return Object.entries(props.data).filter(\n ([key, _]) => !keyBlockList.includes(key) && props.categories[key]?.color\n );\n});\n</script>\n\n<template>\n <div class=\"flex flex-col space-y-1\">\n <div \n v-for=\"[key, value] in visibleEntries\" \n :key=\"key\"\n class=\"flex items-center mr-2\"\n >\n <span\n class=\"w-2 h-2 rounded mr-2\"\n :style=\"{ backgroundColor: categories[key].color }\"\n ></span>\n <div>\n <span id=\"t-label\" class=\"font-semibold mr-2\">{{ key }}:</span>\n <span id=\"t-value\" class=\"font-normal\">{{ value }}</span>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n#t-label {\n margin-right: 8px;\n color: var(--tooltip-label-color);\n text-transform: capitalize;\n}\n\n#t-value {\n color: var(--tooltip-value-color);\n}\n</style>\n"],"names":["props","__props","keyBlockList","visibleEntries","computed","key","_","_a"],"mappings":";;;;;;;;;;;;;;AAIA,UAAMA,IAAQC,GAKRC,IAAe,CAAC,UAAU,YAAY,SAAS,GAE/CC,IAAiBC,EAAS,MACvB,OAAO,QAAQJ,EAAM,IAAI,EAAE;AAAA,MAChC,CAAC,CAACK,GAAKC,CAAC,MAAM;;AAAA,gBAACJ,EAAa,SAASG,CAAG,OAAKE,IAAAP,EAAM,WAAWK,CAAG,MAApB,gBAAAE,EAAuB;AAAA;AAAA,IACtE,CACD;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Tooltip2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-chrts",
3
- "version": "0.0.142",
3
+ "version": "0.0.143",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=(e,o)=>{const t=e.__vccOpts||e;for(const[r,s]of o)t[r]=s;return t};exports.default=u;
2
- //# sourceMappingURL=_plugin-vue_export-helper.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_plugin-vue_export-helper.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- const s = (t, e) => {
2
- const o = t.__vccOpts || t;
3
- for (const [r, c] of e)
4
- o[r] = c;
5
- return o;
6
- };
7
- export {
8
- s as default
9
- };
10
- //# sourceMappingURL=_plugin-vue_export-helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_plugin-vue_export-helper.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
package/dist/index.css DELETED
@@ -1 +0,0 @@
1
- #t-label[data-v-cce34be2]{margin-right:8px;color:var(--tooltip-label-color);text-transform:capitalize}#t-value[data-v-cce34be2]{color:var(--tooltip-value-color)}