vuechrts 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,8 @@ declare const _default: <T>(__VLS_props: Awaited<typeof __VLS_setup>["props"], _
8
8
  xLabel: string;
9
9
  yLabel: string;
10
10
  displayProps: string[];
11
+ yNumTicks?: number;
12
+ xNumTicks?: number;
11
13
  xFormatter: (v: number) => string;
12
14
  crossHairTemplate: (d: T) => string;
13
15
  }, keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
package/dist/index.js CHANGED
@@ -8836,6 +8836,8 @@ const l_ = { class: "space-y-2" }, c_ = /* @__PURE__ */ vt({
8836
8836
  xLabel: {},
8837
8837
  yLabel: {},
8838
8838
  displayProps: {},
8839
+ yNumTicks: {},
8840
+ xNumTicks: {},
8839
8841
  xFormatter: { type: Function },
8840
8842
  crossHairTemplate: { type: Function }
8841
8843
  },
@@ -417,7 +417,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
417
417
  <stop offset="0%" stop-color="${o}" stop-opacity="1" />
418
418
  <stop offset="100%" stop-color="${o}" stop-opacity="0" />
419
419
  </linearGradient>
420
- `).join("");return(o,s)=>(_.openBlock(),_.createElementBlock("div",O_,[_.createVNode(_.unref(hc),{items:Object.values(o.categories)},null,8,["items"]),_.createVNode(_.unref(w_),{data:o.data,height:o.height,"svg-defs":_.unref(r),class:""},{default:_.withCtx(()=>[_.createVNode(_.unref(fc),{"follow-cursor":!1,"horizontal-placement":_.unref(A).Right,"vertical-placement":_.unref(A).Top},null,8,["horizontal-placement","vertical-placement"]),(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(e.displayProps,(a,l)=>(_.openBlock(),_.createElementBlock(_.Fragment,{key:l},[_.createVNode(_.unref(T_),_.mergeProps({x:(c,u)=>u,ref_for:!0},i(a),{color:`url(#gradient${l}-${_.unref(n)[l]})`,opacity:.5,"curve-type":o.curveType??_.unref(W).MonotoneX}),null,16,["x","color","curve-type"]),_.createVNode(_.unref(E_),{x:(c,u)=>u,y:c=>c[a],color:_.unref(n)[l],"curve-type":o.curveType??_.unref(W).MonotoneX},null,8,["x","y","color","curve-type"])],64))),128)),_.createVNode(_.unref(uc),{type:"x","grid-line":!1,"domain-line":!1,"tick-format":o.xFormatter,"num-ticks":o.xNumTicks??4},null,8,["tick-format","num-ticks"]),_.createVNode(_.unref(uc),{type:"y","num-ticks":o.yNumTicks??4,"domain-line":!1,label:o.yLabel},null,8,["num-ticks","label"]),_.createVNode(_.unref(A_),{color:"#666",template:o.crossHairTemplate},null,8,["template"])]),_:1},8,["data","height","svg-defs"])]))}}),xo=_.defineComponent({__name:"AreaChart",props:{data:{},height:{},categories:{},xLabel:{},yLabel:{},displayProps:{},xFormatter:{type:Function},crossHairTemplate:{type:Function}},setup(t){const e=t;return(n,i)=>(_.openBlock(),_.createBlock(F_,_.normalizeProps(_.guardReactiveProps(e)),null,16))}}),z_={class:"flex items-center justify-center"},P_={class:"flex items-center justify-center mt-4"},L_=_.defineComponent({__name:"Donut",props:{type:{},data:{},height:{},radius:{},labels:{}},setup(t){const e=t,n=r=>r,i=e.type==="half";return(r,o)=>(_.openBlock(),_.createElementBlock(_.Fragment,null,[_.createElementVNode("div",z_,[_.createVNode(_.unref(k_),{class:_.normalizeClass(i?"mt-24":""),data:r.data,height:r.height,margin:{}},{default:_.withCtx(()=>[_.createVNode(_.unref(fc),{"horizontal-shift":20,"vertical-shift":20,triggers:{[_.unref(Ri).selectors.segment]:s=>(console.log(),`<div class='flex items-center'><div class='w-2 h-2 rounded-full mr-2' style='background-color: ${r.labels[s.index].color} ;'></div>
420
+ `).join("");return(o,s)=>(_.openBlock(),_.createElementBlock("div",O_,[_.createVNode(_.unref(hc),{items:Object.values(o.categories)},null,8,["items"]),_.createVNode(_.unref(w_),{data:o.data,height:o.height,"svg-defs":_.unref(r),class:""},{default:_.withCtx(()=>[_.createVNode(_.unref(fc),{"follow-cursor":!1,"horizontal-placement":_.unref(A).Right,"vertical-placement":_.unref(A).Top},null,8,["horizontal-placement","vertical-placement"]),(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(e.displayProps,(a,l)=>(_.openBlock(),_.createElementBlock(_.Fragment,{key:l},[_.createVNode(_.unref(T_),_.mergeProps({x:(c,u)=>u,ref_for:!0},i(a),{color:`url(#gradient${l}-${_.unref(n)[l]})`,opacity:.5,"curve-type":o.curveType??_.unref(W).MonotoneX}),null,16,["x","color","curve-type"]),_.createVNode(_.unref(E_),{x:(c,u)=>u,y:c=>c[a],color:_.unref(n)[l],"curve-type":o.curveType??_.unref(W).MonotoneX},null,8,["x","y","color","curve-type"])],64))),128)),_.createVNode(_.unref(uc),{type:"x","grid-line":!1,"domain-line":!1,"tick-format":o.xFormatter,"num-ticks":o.xNumTicks??4},null,8,["tick-format","num-ticks"]),_.createVNode(_.unref(uc),{type:"y","num-ticks":o.yNumTicks??4,"domain-line":!1,label:o.yLabel},null,8,["num-ticks","label"]),_.createVNode(_.unref(A_),{color:"#666",template:o.crossHairTemplate},null,8,["template"])]),_:1},8,["data","height","svg-defs"])]))}}),xo=_.defineComponent({__name:"AreaChart",props:{data:{},height:{},categories:{},xLabel:{},yLabel:{},displayProps:{},yNumTicks:{},xNumTicks:{},xFormatter:{type:Function},crossHairTemplate:{type:Function}},setup(t){const e=t;return(n,i)=>(_.openBlock(),_.createBlock(F_,_.normalizeProps(_.guardReactiveProps(e)),null,16))}}),z_={class:"flex items-center justify-center"},P_={class:"flex items-center justify-center mt-4"},L_=_.defineComponent({__name:"Donut",props:{type:{},data:{},height:{},radius:{},labels:{}},setup(t){const e=t,n=r=>r,i=e.type==="half";return(r,o)=>(_.openBlock(),_.createElementBlock(_.Fragment,null,[_.createElementVNode("div",z_,[_.createVNode(_.unref(k_),{class:_.normalizeClass(i?"mt-24":""),data:r.data,height:r.height,margin:{}},{default:_.withCtx(()=>[_.createVNode(_.unref(fc),{"horizontal-shift":20,"vertical-shift":20,triggers:{[_.unref(Ri).selectors.segment]:s=>(console.log(),`<div class='flex items-center'><div class='w-2 h-2 rounded-full mr-2' style='background-color: ${r.labels[s.index].color} ;'></div>
421
421
  <div>${s.data}</div>
422
422
  </vistooltip>
423
423
  </vissinglecontainer>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vuechrts",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "files": [