rtcpts 0.0.30 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{charts-DpNGi6Y4.cjs → charts-DJRnfFOn.cjs} +1 -1
- package/dist/{charts-DFjKd2J4.js → charts-fA1hE3y8.js} +65 -61
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- package/dist/components/j-ch-line/index.d.ts +9 -0
- package/dist/components/j-q-autocomplete/index.d.ts +9 -0
- package/dist/components/j-q-confirm-dialog/index.d.ts +326 -0
- package/dist/components/j-q-table/pagination.d.ts +20 -19
- package/dist/index.css +1 -1
- package/dist/rtcpt.cjs.js +1 -1
- package/dist/rtcpt.es.js +1873 -1868
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),g=require("chart.js/auto"),y=(e,i)=>{const n=e.__vccOpts||e;for(const[o,s]of i)n[o]=s;return n};function k(e){return Object.prototype.toString.call(e)==="[object Object]"}function h(e,i){if(!i)return{...e};const n={...e};for(const o of Object.keys(i)){const s=i[o],u=e[o];if(s!==void 0){if(s===null){n[o]=null;continue}k(u)&&k(s)?n[o]=h(u,s):n[o]=s}}return n}const $=a.defineComponent({name:"JChBar",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null),n=a.ref(null);let o=null;const s=d=>{let t=d.querySelector("div.chartjs-tooltip");return t||(t=document.createElement("div"),t.className="chartjs-tooltip",t.style.background="#ffffff",t.style.borderRadius="8px",t.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)",t.style.color="#323232",t.style.opacity="0",t.style.pointerEvents="none",t.style.position="absolute",t.style.transform="translate(-50%, 0)",t.style.transition="all .1s ease",t.style.padding="8px 10px",t.style.font="12px Open Sans, sans-serif",d.appendChild(t)),t},u=d=>{const{chart:t,tooltip:l}=d,c=n.value;if(!c)return;const r=s(c);if(l.opacity===0){r.style.opacity="0";return}if(l.body){const m=l.title||[],v=l.body.map(p=>p.lines);if(r.innerHTML="",m.length){const p=document.createElement("div");p.style.fontWeight="600",p.style.marginBottom="4px",p.textContent=m.join(" "),r.appendChild(p)}v.forEach(p=>{const C=document.createElement("div");C.textContent=p.join(" "),r.appendChild(C)})}const{offsetLeft:b,offsetTop:x}=t.canvas;r.style.opacity="1",r.style.left=`${b+l.caretX}px`,r.style.top=`${x+l.caretY}px`},f=()=>{var c;o&&o.destroy();const d=(c=i.value)==null?void 0:c.getContext("2d");if(!d)return;const t={labels:e.labels,datasets:e.datasets.map(r=>({...r,type:"bar",borderWidth:r.borderWidth??0,borderRadius:r.borderRadius??4,maxBarThickness:r.maxBarThickness??34,backgroundColor:r.backgroundColor||"#3A416F"}))},l={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{enabled:!1,external:u}},scales:{y:{border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799"}},x:{border:{display:!1},grid:{display:!1,drawOnChartArea:!0,drawTicks:!0},ticks:{display:!0,color:"#969799",padding:10}}}};o=new g.Chart(d,{type:"bar",data:t,options:h(l,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{f()},{deep:!0}),{barChartCanvas:i,chartContainer:n}}}),O={ref:"chartContainer",style:{position:"relative"}};function w(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",O,[a.createElementVNode("div",null,[a.createElementVNode("canvas",{ref:"barChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])],512)}const S=y($,[["render",w],["__scopeId","data-v-ab70454a"]]),_=a.defineComponent({name:"JChBarLine",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var t;n&&n.destroy();const s=(t=i.value)==null?void 0:t.getContext("2d");if(!s)return;const u=e.datasets.map(l=>{let c={};const r=l.type==="line"?"line":"bar";return l.type==="line"?c={type:"line",tension:.4,pointRadius:0,borderWidth:3,fill:!1,backgroundColor:"transparent",maxBarThickness:void 0}:l.type==="bar"&&(c={type:"bar",borderWidth:0,borderRadius:4,borderSkipped:!1,fill:void 0,maxBarThickness:34,backgroundColor:l.backgroundColor}),{type:r,...l,...c}}),f={labels:e.labels,datasets:u},d={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:l=>`${l.dataset.label||""}: ${l.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1},grid:{display:!1,drawOnChartArea:!0,drawTicks:!0},ticks:{display:!0,color:"#969799",padding:10,font:{size:11,family:"Open Sans",style:"normal",lineHeight:2},callback:(l,c)=>{const r=e.labels[c];return r&&r.length>13?`${r.slice(0,13)}...`:r}}}}};n=new g.Chart(s,{data:f,options:h(d,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{mixedChartCanvas:i}}});function A(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"mixedChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const E=y(_,[["render",A]]),q=a.defineComponent({name:"JChBubble",props:{labels:{type:Array,default:()=>[],required:!1},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,backgroundColor:t.backgroundColor||"rgba(54, 162, 235, 0.6)"}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!0,color:"#f5f6fa"},ticks:{display:!0,color:"#969799",padding:10,font:{size:11,family:"Open Sans",style:"normal",lineHeight:2},callback:(t,l)=>{const c=e.labels[l];return c?typeof c=="string"&&c.length>13?`${c.slice(0,13)}...`:c:t}}}}};n=new g.Chart(s,{type:"bubble",data:u,options:h(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{bubbleChartCanvas:i}}});function T(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"bubbleChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const B=y(q,[["render",T]]),H=a.defineComponent({name:"JChLine",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,tension:.4,pointRadius:2,borderWidth:3,fill:!1,backgroundColor:"transparent",type:"line"}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"line",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1,dash:[5,5]},grid:{display:!1,drawOnChartArea:!1,drawTicks:!1},ticks:{display:!0,color:"#969799",padding:20,font:{size:10,family:"Open Sans",style:"normal"},callback:(t,l,c)=>{const r=e.labels[l];return r.length>13?`${r.slice(0,13)}...`:r}}}}};n=new g.Chart(s,{type:"line",data:u,options:h(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets],()=>{o()},{deep:!0}),{lineChartCanvas:i}}}),j={ref:"chartContainer"};function z(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",j,[a.createElementVNode("canvas",{ref:"lineChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)],512)}const N=y(H,[["render",z],["__scopeId","data-v-3bd61468"]]),W=a.defineComponent({name:"JChPieDoughnut",props:{type:{type:String,required:!0,validator:e=>["pie","doughnut"].includes(e)},labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null),n=a.ref(null);let o=null;const s=d=>{let t=d.querySelector("div.chartjs-tooltip");return t||(t=document.createElement("div"),t.className="chartjs-tooltip",t.style.background="#ffffff",t.style.borderRadius="8px",t.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)",t.style.color="#323232",t.style.opacity="0",t.style.pointerEvents="none",t.style.position="absolute",t.style.transform="translate(-50%, 0)",t.style.transition="all .1s ease",t.style.padding="8px 10px",t.style.font="12px Open Sans, sans-serif",d.appendChild(t)),t},u=d=>{const{chart:t,tooltip:l}=d,c=n.value;if(!c)return;const r=s(c);if(l.opacity===0){r.style.opacity="0";return}if(l.body){const m=l.title||[],v=l.body.map(p=>p.lines);if(r.innerHTML="",m.length){const p=document.createElement("div");p.style.fontWeight="600",p.style.marginBottom="4px",p.textContent=m.join(" "),r.appendChild(p)}v.forEach(p=>{const C=document.createElement("div");C.textContent=p.join(" "),r.appendChild(C)})}const{offsetLeft:b,offsetTop:x}=t.canvas;r.style.opacity="1",r.style.left=`${b+l.caretX}px`,r.style.top=`${x+l.caretY}px`},f=()=>{var r;o&&o.destroy();const d=(r=i.value)==null?void 0:r.getContext("2d");if(!d)return;const t=e.type,l={labels:e.labels,datasets:e.datasets.map(b=>({...b,type:t,borderWidth:b.borderWidth??2}))},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{enabled:!1,external:u}},interaction:{intersect:!1,mode:"index"}};o=new g.Chart(d,{type:t,data:l,options:h(c,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.type],()=>{f()},{deep:!0}),{chartCanvas:i,chartContainer:n}}}),R={ref:"chartContainer",style:{position:"relative"}};function V(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",R,[a.createElementVNode("canvas",{ref:"chartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)],512)}const L=y(W,[["render",V]]),P=a.defineComponent({name:"JChRadar",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,type:"radar",fill:t.fill??!0,backgroundColor:t.backgroundColor||"rgba(58,65,111,0.2)",borderColor:t.borderColor||"rgba(58,65,111,1)",borderWidth:t.borderWidth??2}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{r:{beginAtZero:!0,angleLines:{color:"#f5f6fa"},grid:{color:"#f5f6fa"},pointLabels:{color:"#969799",font:{size:11,family:"Open Sans"}},ticks:{display:!1}}}};n=new g.Chart(s,{type:"radar",data:u,options:h(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{radarChartCanvas:i}}});function D(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"radarChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const I=y(P,[["render",D]]);exports._export_sfc=y;exports.index=S;exports.index$1=E;exports.index$2=B;exports.index$3=N;exports.index$4=L;exports.index$5=I;
|
|
1
|
+
"use strict";const a=require("vue"),g=require("chart.js/auto"),y=(e,i)=>{const n=e.__vccOpts||e;for(const[o,s]of i)n[o]=s;return n};function k(e){return Object.prototype.toString.call(e)==="[object Object]"}function h(e,i){if(!i)return{...e};const n={...e};for(const o of Object.keys(i)){const s=i[o],u=e[o];if(s!==void 0){if(s===null){n[o]=null;continue}k(u)&&k(s)?n[o]=h(u,s):n[o]=s}}return n}const $=a.defineComponent({name:"JChBar",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null),n=a.ref(null);let o=null;const s=d=>{let t=d.querySelector("div.chartjs-tooltip");return t||(t=document.createElement("div"),t.className="chartjs-tooltip",t.style.background="#ffffff",t.style.borderRadius="8px",t.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)",t.style.color="#323232",t.style.opacity="0",t.style.pointerEvents="none",t.style.position="absolute",t.style.transform="translate(-50%, 0)",t.style.transition="all .1s ease",t.style.padding="8px 10px",t.style.font="12px Open Sans, sans-serif",d.appendChild(t)),t},u=d=>{const{chart:t,tooltip:l}=d,c=n.value;if(!c)return;const r=s(c);if(l.opacity===0){r.style.opacity="0";return}if(l.body){const m=l.title||[],v=l.body.map(p=>p.lines);if(r.innerHTML="",m.length){const p=document.createElement("div");p.style.fontWeight="600",p.style.marginBottom="4px",p.textContent=m.join(" "),r.appendChild(p)}v.forEach(p=>{const C=document.createElement("div");C.textContent=p.join(" "),r.appendChild(C)})}const{offsetLeft:b,offsetTop:x}=t.canvas;r.style.opacity="1",r.style.left=`${b+l.caretX}px`,r.style.top=`${x+l.caretY}px`},f=()=>{var c;o&&o.destroy();const d=(c=i.value)==null?void 0:c.getContext("2d");if(!d)return;const t={labels:e.labels,datasets:e.datasets.map(r=>({...r,type:"bar",borderWidth:r.borderWidth??0,borderRadius:r.borderRadius??4,maxBarThickness:r.maxBarThickness??34,backgroundColor:r.backgroundColor||"#3A416F"}))},l={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{enabled:!1,external:u}},scales:{y:{border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799"}},x:{border:{display:!1},grid:{display:!1,drawOnChartArea:!0,drawTicks:!0},ticks:{display:!0,color:"#969799",padding:10}}}};o=new g.Chart(d,{type:"bar",data:t,options:h(l,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{f()},{deep:!0}),{barChartCanvas:i,chartContainer:n}}}),O={ref:"chartContainer",style:{position:"relative"}};function S(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",O,[a.createElementVNode("div",null,[a.createElementVNode("canvas",{ref:"barChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])],512)}const w=y($,[["render",S],["__scopeId","data-v-e2691574"]]),_=a.defineComponent({name:"JChBarLine",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var t;n&&n.destroy();const s=(t=i.value)==null?void 0:t.getContext("2d");if(!s)return;const u=e.datasets.map(l=>{let c={};const r=l.type==="line"?"line":"bar";return l.type==="line"?c={type:"line",tension:.4,pointRadius:0,borderWidth:3,fill:!1,backgroundColor:"transparent",maxBarThickness:void 0}:l.type==="bar"&&(c={type:"bar",borderWidth:0,borderRadius:4,borderSkipped:!1,fill:void 0,maxBarThickness:34,backgroundColor:l.backgroundColor}),{type:r,...l,...c}}),f={labels:e.labels,datasets:u},d={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:l=>`${l.dataset.label||""}: ${l.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1},grid:{display:!1,drawOnChartArea:!0,drawTicks:!0},ticks:{display:!0,color:"#969799",padding:10,font:{size:11,family:"Open Sans",style:"normal",lineHeight:2},callback:(l,c)=>{const r=e.labels[c];return r&&r.length>13?`${r.slice(0,13)}...`:r}}}}};n=new g.Chart(s,{data:f,options:h(d,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{mixedChartCanvas:i}}});function A(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"mixedChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const E=y(_,[["render",A]]),q=a.defineComponent({name:"JChBubble",props:{labels:{type:Array,default:()=>[],required:!1},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,backgroundColor:t.backgroundColor||"rgba(54, 162, 235, 0.6)"}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!0,color:"#f5f6fa"},ticks:{display:!0,color:"#969799",padding:10,font:{size:11,family:"Open Sans",style:"normal",lineHeight:2},callback:(t,l)=>{const c=e.labels[l];return c?typeof c=="string"&&c.length>13?`${c.slice(0,13)}...`:c:t}}}}};n=new g.Chart(s,{type:"bubble",data:u,options:h(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{bubbleChartCanvas:i}}});function T(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"bubbleChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const B=y(q,[["render",T]]),H=a.defineComponent({name:"JChLine",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300},unitName:{type:String,default:""}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,tension:.4,pointRadius:2,borderWidth:3,fill:!1,backgroundColor:"transparent",type:"line"}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"line",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue} ${e.unitName}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1,dash:[5,5]},grid:{display:!1,drawOnChartArea:!1,drawTicks:!1},ticks:{display:!0,color:"#969799",padding:20,font:{size:10,family:"Open Sans",style:"normal"},callback:(t,l,c)=>{const r=e.labels[l];return r.length>13?`${r.slice(0,13)}...`:r}}}}};n=new g.Chart(s,{type:"line",data:u,options:h(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets],()=>{o()},{deep:!0}),{lineChartCanvas:i}}}),j={ref:"chartContainer"};function z(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",j,[a.createElementVNode("canvas",{ref:"lineChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)],512)}const N=y(H,[["render",z],["__scopeId","data-v-1a079ae0"]]),W=a.defineComponent({name:"JChPieDoughnut",props:{type:{type:String,required:!0,validator:e=>["pie","doughnut"].includes(e)},labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null),n=a.ref(null);let o=null;const s=d=>{let t=d.querySelector("div.chartjs-tooltip");return t||(t=document.createElement("div"),t.className="chartjs-tooltip",t.style.background="#ffffff",t.style.borderRadius="8px",t.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)",t.style.color="#323232",t.style.opacity="0",t.style.pointerEvents="none",t.style.position="absolute",t.style.transform="translate(-50%, 0)",t.style.transition="all .1s ease",t.style.padding="8px 10px",t.style.font="12px Open Sans, sans-serif",d.appendChild(t)),t},u=d=>{const{chart:t,tooltip:l}=d,c=n.value;if(!c)return;const r=s(c);if(l.opacity===0){r.style.opacity="0";return}if(l.body){const m=l.title||[],v=l.body.map(p=>p.lines);if(r.innerHTML="",m.length){const p=document.createElement("div");p.style.fontWeight="600",p.style.marginBottom="4px",p.textContent=m.join(" "),r.appendChild(p)}v.forEach(p=>{const C=document.createElement("div");C.textContent=p.join(" "),r.appendChild(C)})}const{offsetLeft:b,offsetTop:x}=t.canvas;r.style.opacity="1",r.style.left=`${b+l.caretX}px`,r.style.top=`${x+l.caretY}px`},f=()=>{var r;o&&o.destroy();const d=(r=i.value)==null?void 0:r.getContext("2d");if(!d)return;const t=e.type,l={labels:e.labels,datasets:e.datasets.map(b=>({...b,type:t,borderWidth:b.borderWidth??2}))},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{enabled:!1,external:u}},interaction:{intersect:!0,mode:"index"}};o=new g.Chart(d,{type:t,data:l,options:h(c,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.type],()=>{f()},{deep:!0}),{chartCanvas:i,chartContainer:n}}}),R={ref:"chartContainer",style:{position:"relative"}};function V(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",R,[a.createElementVNode("canvas",{ref:"chartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)],512)}const L=y(W,[["render",V]]),P=a.defineComponent({name:"JChRadar",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,type:"radar",fill:t.fill??!0,backgroundColor:t.backgroundColor||"rgba(58,65,111,0.2)",borderColor:t.borderColor||"rgba(58,65,111,1)",borderWidth:t.borderWidth??2}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{r:{beginAtZero:!0,angleLines:{color:"#f5f6fa"},grid:{color:"#f5f6fa"},pointLabels:{color:"#969799",font:{size:11,family:"Open Sans"}},ticks:{display:!1}}}};n=new g.Chart(s,{type:"radar",data:u,options:h(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{radarChartCanvas:i}}});function D(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"radarChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const I=y(P,[["render",D]]);exports._export_sfc=y;exports.index=w;exports.index$1=E;exports.index$2=B;exports.index$3=N;exports.index$4=L;exports.index$5=I;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { defineComponent as g, ref as f, onMounted as m, watch as C, createElementBlock as x, openBlock as v, createElementVNode as y, normalizeStyle as k } from "vue";
|
|
2
2
|
import { Chart as $ } from "chart.js/auto";
|
|
3
|
-
const O = (e,
|
|
3
|
+
const O = (e, i) => {
|
|
4
4
|
const a = e.__vccOpts || e;
|
|
5
|
-
for (const [l, o] of
|
|
5
|
+
for (const [l, o] of i)
|
|
6
6
|
a[l] = o;
|
|
7
7
|
return a;
|
|
8
8
|
};
|
|
9
9
|
function T(e) {
|
|
10
10
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
11
11
|
}
|
|
12
|
-
function h(e,
|
|
13
|
-
if (!
|
|
12
|
+
function h(e, i) {
|
|
13
|
+
if (!i)
|
|
14
14
|
return { ...e };
|
|
15
15
|
const a = { ...e };
|
|
16
|
-
for (const l of Object.keys(
|
|
17
|
-
const o =
|
|
16
|
+
for (const l of Object.keys(i)) {
|
|
17
|
+
const o = i[l], c = e[l];
|
|
18
18
|
if (o !== void 0) {
|
|
19
19
|
if (o === null) {
|
|
20
20
|
a[l] = null;
|
|
@@ -48,13 +48,13 @@ const q = g({
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
setup(e) {
|
|
51
|
-
const
|
|
51
|
+
const i = f(null), a = f(null);
|
|
52
52
|
let l = null;
|
|
53
|
-
const o = (
|
|
54
|
-
let t =
|
|
55
|
-
return t || (t = document.createElement("div"), t.className = "chartjs-tooltip", t.style.background = "#ffffff", t.style.borderRadius = "8px", t.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.15)", t.style.color = "#323232", t.style.opacity = "0", t.style.pointerEvents = "none", t.style.position = "absolute", t.style.transform = "translate(-50%, 0)", t.style.transition = "all .1s ease", t.style.padding = "8px 10px", t.style.font = "12px Open Sans, sans-serif",
|
|
56
|
-
}, c = (
|
|
57
|
-
const { chart: t, tooltip: r } =
|
|
53
|
+
const o = (s) => {
|
|
54
|
+
let t = s.querySelector("div.chartjs-tooltip");
|
|
55
|
+
return t || (t = document.createElement("div"), t.className = "chartjs-tooltip", t.style.background = "#ffffff", t.style.borderRadius = "8px", t.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.15)", t.style.color = "#323232", t.style.opacity = "0", t.style.pointerEvents = "none", t.style.position = "absolute", t.style.transform = "translate(-50%, 0)", t.style.transition = "all .1s ease", t.style.padding = "8px 10px", t.style.font = "12px Open Sans, sans-serif", s.appendChild(t)), t;
|
|
56
|
+
}, c = (s) => {
|
|
57
|
+
const { chart: t, tooltip: r } = s, d = a.value;
|
|
58
58
|
if (!d) return;
|
|
59
59
|
const n = o(d);
|
|
60
60
|
if (r.opacity === 0) {
|
|
@@ -68,17 +68,17 @@ const q = g({
|
|
|
68
68
|
u.style.fontWeight = "600", u.style.marginBottom = "4px", u.textContent = _.join(" "), n.appendChild(u);
|
|
69
69
|
}
|
|
70
70
|
A.forEach((u) => {
|
|
71
|
-
const
|
|
72
|
-
|
|
71
|
+
const S = document.createElement("div");
|
|
72
|
+
S.textContent = u.join(" "), n.appendChild(S);
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
const { offsetLeft: b, offsetTop:
|
|
76
|
-
n.style.opacity = "1", n.style.left = `${b + r.caretX}px`, n.style.top = `${
|
|
75
|
+
const { offsetLeft: b, offsetTop: w } = t.canvas;
|
|
76
|
+
n.style.opacity = "1", n.style.left = `${b + r.caretX}px`, n.style.top = `${w + r.caretY}px`;
|
|
77
77
|
}, p = () => {
|
|
78
78
|
var d;
|
|
79
79
|
l && l.destroy();
|
|
80
|
-
const
|
|
81
|
-
if (!
|
|
80
|
+
const s = (d = i.value) == null ? void 0 : d.getContext("2d");
|
|
81
|
+
if (!s) return;
|
|
82
82
|
const t = {
|
|
83
83
|
labels: e.labels,
|
|
84
84
|
datasets: e.datasets.map((n) => ({
|
|
@@ -148,7 +148,7 @@ const q = g({
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
|
-
l = new $(
|
|
151
|
+
l = new $(s, {
|
|
152
152
|
type: "bar",
|
|
153
153
|
data: t,
|
|
154
154
|
options: h(r, e.options)
|
|
@@ -163,7 +163,7 @@ const q = g({
|
|
|
163
163
|
},
|
|
164
164
|
{ deep: !0 }
|
|
165
165
|
), {
|
|
166
|
-
barChartCanvas:
|
|
166
|
+
barChartCanvas: i,
|
|
167
167
|
chartContainer: a
|
|
168
168
|
};
|
|
169
169
|
}
|
|
@@ -171,7 +171,7 @@ const q = g({
|
|
|
171
171
|
ref: "chartContainer",
|
|
172
172
|
style: { position: "relative" }
|
|
173
173
|
};
|
|
174
|
-
function j(e,
|
|
174
|
+
function j(e, i, a, l, o, c) {
|
|
175
175
|
return v(), x("div", H, [
|
|
176
176
|
y("div", null, [
|
|
177
177
|
y("canvas", {
|
|
@@ -181,7 +181,7 @@ function j(e, s, a, l, o, c) {
|
|
|
181
181
|
])
|
|
182
182
|
], 512);
|
|
183
183
|
}
|
|
184
|
-
const Z = /* @__PURE__ */ O(q, [["render", j], ["__scopeId", "data-v-
|
|
184
|
+
const Z = /* @__PURE__ */ O(q, [["render", j], ["__scopeId", "data-v-e2691574"]]), E = g({
|
|
185
185
|
name: "JChBarLine",
|
|
186
186
|
props: {
|
|
187
187
|
labels: {
|
|
@@ -205,12 +205,12 @@ const Z = /* @__PURE__ */ O(q, [["render", j], ["__scopeId", "data-v-ab70454a"]]
|
|
|
205
205
|
}
|
|
206
206
|
},
|
|
207
207
|
setup(e) {
|
|
208
|
-
const
|
|
208
|
+
const i = f(null);
|
|
209
209
|
let a = null;
|
|
210
210
|
const l = () => {
|
|
211
211
|
var t;
|
|
212
212
|
a && a.destroy();
|
|
213
|
-
const o = (t =
|
|
213
|
+
const o = (t = i.value) == null ? void 0 : t.getContext("2d");
|
|
214
214
|
if (!o) return;
|
|
215
215
|
const c = e.datasets.map((r) => {
|
|
216
216
|
let d = {};
|
|
@@ -240,7 +240,7 @@ const Z = /* @__PURE__ */ O(q, [["render", j], ["__scopeId", "data-v-ab70454a"]]
|
|
|
240
240
|
}), p = {
|
|
241
241
|
labels: e.labels,
|
|
242
242
|
datasets: c
|
|
243
|
-
},
|
|
243
|
+
}, s = {
|
|
244
244
|
responsive: !0,
|
|
245
245
|
maintainAspectRatio: !1,
|
|
246
246
|
plugins: {
|
|
@@ -312,7 +312,7 @@ const Z = /* @__PURE__ */ O(q, [["render", j], ["__scopeId", "data-v-ab70454a"]]
|
|
|
312
312
|
};
|
|
313
313
|
a = new $(o, {
|
|
314
314
|
data: p,
|
|
315
|
-
options: h(
|
|
315
|
+
options: h(s, e.options)
|
|
316
316
|
});
|
|
317
317
|
};
|
|
318
318
|
return m(() => {
|
|
@@ -324,11 +324,11 @@ const Z = /* @__PURE__ */ O(q, [["render", j], ["__scopeId", "data-v-ab70454a"]]
|
|
|
324
324
|
},
|
|
325
325
|
{ deep: !0 }
|
|
326
326
|
), {
|
|
327
|
-
mixedChartCanvas:
|
|
327
|
+
mixedChartCanvas: i
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
330
|
});
|
|
331
|
-
function W(e,
|
|
331
|
+
function W(e, i, a, l, o, c) {
|
|
332
332
|
return v(), x("div", null, [
|
|
333
333
|
y("canvas", {
|
|
334
334
|
ref: "mixedChartCanvas",
|
|
@@ -359,12 +359,12 @@ const M = /* @__PURE__ */ O(E, [["render", W]]), z = g({
|
|
|
359
359
|
}
|
|
360
360
|
},
|
|
361
361
|
setup(e) {
|
|
362
|
-
const
|
|
362
|
+
const i = f(null);
|
|
363
363
|
let a = null;
|
|
364
364
|
const l = () => {
|
|
365
|
-
var
|
|
365
|
+
var s;
|
|
366
366
|
a && a.destroy();
|
|
367
|
-
const o = (
|
|
367
|
+
const o = (s = i.value) == null ? void 0 : s.getContext("2d");
|
|
368
368
|
if (!o) return;
|
|
369
369
|
const c = {
|
|
370
370
|
labels: e.labels,
|
|
@@ -444,11 +444,11 @@ const M = /* @__PURE__ */ O(E, [["render", W]]), z = g({
|
|
|
444
444
|
},
|
|
445
445
|
{ deep: !0 }
|
|
446
446
|
), {
|
|
447
|
-
bubbleChartCanvas:
|
|
447
|
+
bubbleChartCanvas: i
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
|
-
function R(e,
|
|
451
|
+
function R(e, i, a, l, o, c) {
|
|
452
452
|
return v(), x("div", null, [
|
|
453
453
|
y("canvas", {
|
|
454
454
|
ref: "bubbleChartCanvas",
|
|
@@ -476,15 +476,19 @@ const F = /* @__PURE__ */ O(z, [["render", R]]), L = g({
|
|
|
476
476
|
height: {
|
|
477
477
|
type: Number,
|
|
478
478
|
default: 300
|
|
479
|
+
},
|
|
480
|
+
unitName: {
|
|
481
|
+
type: String,
|
|
482
|
+
default: ""
|
|
479
483
|
}
|
|
480
484
|
},
|
|
481
485
|
setup(e) {
|
|
482
|
-
const
|
|
486
|
+
const i = f(null);
|
|
483
487
|
let a = null;
|
|
484
488
|
const l = () => {
|
|
485
|
-
var
|
|
489
|
+
var s;
|
|
486
490
|
a && a.destroy();
|
|
487
|
-
const o = (
|
|
491
|
+
const o = (s = i.value) == null ? void 0 : s.getContext("2d");
|
|
488
492
|
if (!o) return;
|
|
489
493
|
const c = {
|
|
490
494
|
labels: e.labels,
|
|
@@ -530,7 +534,7 @@ const F = /* @__PURE__ */ O(z, [["render", R]]), L = g({
|
|
|
530
534
|
// Optional: Add a border color
|
|
531
535
|
padding: 12,
|
|
532
536
|
callbacks: {
|
|
533
|
-
label: (t) => `${t.dataset.label || ""}: ${t.formattedValue}`
|
|
537
|
+
label: (t) => `${t.dataset.label || ""}: ${t.formattedValue} ${e.unitName}`
|
|
534
538
|
}
|
|
535
539
|
}
|
|
536
540
|
},
|
|
@@ -601,11 +605,11 @@ const F = /* @__PURE__ */ O(z, [["render", R]]), L = g({
|
|
|
601
605
|
},
|
|
602
606
|
{ deep: !0 }
|
|
603
607
|
), {
|
|
604
|
-
lineChartCanvas:
|
|
608
|
+
lineChartCanvas: i
|
|
605
609
|
};
|
|
606
610
|
}
|
|
607
611
|
}), B = { ref: "chartContainer" };
|
|
608
|
-
function N(e,
|
|
612
|
+
function N(e, i, a, l, o, c) {
|
|
609
613
|
return v(), x("div", B, [
|
|
610
614
|
y("canvas", {
|
|
611
615
|
ref: "lineChartCanvas",
|
|
@@ -613,7 +617,7 @@ function N(e, s, a, l, o, c) {
|
|
|
613
617
|
}, null, 4)
|
|
614
618
|
], 512);
|
|
615
619
|
}
|
|
616
|
-
const G = /* @__PURE__ */ O(L, [["render", N], ["__scopeId", "data-v-
|
|
620
|
+
const G = /* @__PURE__ */ O(L, [["render", N], ["__scopeId", "data-v-1a079ae0"]]), P = g({
|
|
617
621
|
name: "JChPieDoughnut",
|
|
618
622
|
props: {
|
|
619
623
|
type: {
|
|
@@ -642,13 +646,13 @@ const G = /* @__PURE__ */ O(L, [["render", N], ["__scopeId", "data-v-3bd61468"]]
|
|
|
642
646
|
}
|
|
643
647
|
},
|
|
644
648
|
setup(e) {
|
|
645
|
-
const
|
|
649
|
+
const i = f(null), a = f(null);
|
|
646
650
|
let l = null;
|
|
647
|
-
const o = (
|
|
648
|
-
let t =
|
|
649
|
-
return t || (t = document.createElement("div"), t.className = "chartjs-tooltip", t.style.background = "#ffffff", t.style.borderRadius = "8px", t.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.15)", t.style.color = "#323232", t.style.opacity = "0", t.style.pointerEvents = "none", t.style.position = "absolute", t.style.transform = "translate(-50%, 0)", t.style.transition = "all .1s ease", t.style.padding = "8px 10px", t.style.font = "12px Open Sans, sans-serif",
|
|
650
|
-
}, c = (
|
|
651
|
-
const { chart: t, tooltip: r } =
|
|
651
|
+
const o = (s) => {
|
|
652
|
+
let t = s.querySelector("div.chartjs-tooltip");
|
|
653
|
+
return t || (t = document.createElement("div"), t.className = "chartjs-tooltip", t.style.background = "#ffffff", t.style.borderRadius = "8px", t.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.15)", t.style.color = "#323232", t.style.opacity = "0", t.style.pointerEvents = "none", t.style.position = "absolute", t.style.transform = "translate(-50%, 0)", t.style.transition = "all .1s ease", t.style.padding = "8px 10px", t.style.font = "12px Open Sans, sans-serif", s.appendChild(t)), t;
|
|
654
|
+
}, c = (s) => {
|
|
655
|
+
const { chart: t, tooltip: r } = s, d = a.value;
|
|
652
656
|
if (!d) return;
|
|
653
657
|
const n = o(d);
|
|
654
658
|
if (r.opacity === 0) {
|
|
@@ -662,17 +666,17 @@ const G = /* @__PURE__ */ O(L, [["render", N], ["__scopeId", "data-v-3bd61468"]]
|
|
|
662
666
|
u.style.fontWeight = "600", u.style.marginBottom = "4px", u.textContent = _.join(" "), n.appendChild(u);
|
|
663
667
|
}
|
|
664
668
|
A.forEach((u) => {
|
|
665
|
-
const
|
|
666
|
-
|
|
669
|
+
const S = document.createElement("div");
|
|
670
|
+
S.textContent = u.join(" "), n.appendChild(S);
|
|
667
671
|
});
|
|
668
672
|
}
|
|
669
|
-
const { offsetLeft: b, offsetTop:
|
|
670
|
-
n.style.opacity = "1", n.style.left = `${b + r.caretX}px`, n.style.top = `${
|
|
673
|
+
const { offsetLeft: b, offsetTop: w } = t.canvas;
|
|
674
|
+
n.style.opacity = "1", n.style.left = `${b + r.caretX}px`, n.style.top = `${w + r.caretY}px`;
|
|
671
675
|
}, p = () => {
|
|
672
676
|
var n;
|
|
673
677
|
l && l.destroy();
|
|
674
|
-
const
|
|
675
|
-
if (!
|
|
678
|
+
const s = (n = i.value) == null ? void 0 : n.getContext("2d");
|
|
679
|
+
if (!s) return;
|
|
676
680
|
const t = e.type, r = {
|
|
677
681
|
labels: e.labels,
|
|
678
682
|
datasets: e.datasets.map((b) => ({
|
|
@@ -706,9 +710,9 @@ const G = /* @__PURE__ */ O(L, [["render", N], ["__scopeId", "data-v-3bd61468"]]
|
|
|
706
710
|
external: c
|
|
707
711
|
}
|
|
708
712
|
},
|
|
709
|
-
interaction: { intersect: !
|
|
713
|
+
interaction: { intersect: !0, mode: "index" }
|
|
710
714
|
};
|
|
711
|
-
l = new $(
|
|
715
|
+
l = new $(s, {
|
|
712
716
|
type: t,
|
|
713
717
|
data: r,
|
|
714
718
|
// 需要使用 'as any' 来避免 TypeScript 对不同 ChartOptions 类型的严格检查
|
|
@@ -724,7 +728,7 @@ const G = /* @__PURE__ */ O(L, [["render", N], ["__scopeId", "data-v-3bd61468"]]
|
|
|
724
728
|
},
|
|
725
729
|
{ deep: !0 }
|
|
726
730
|
), {
|
|
727
|
-
chartCanvas:
|
|
731
|
+
chartCanvas: i,
|
|
728
732
|
chartContainer: a
|
|
729
733
|
};
|
|
730
734
|
}
|
|
@@ -732,7 +736,7 @@ const G = /* @__PURE__ */ O(L, [["render", N], ["__scopeId", "data-v-3bd61468"]]
|
|
|
732
736
|
ref: "chartContainer",
|
|
733
737
|
style: { position: "relative" }
|
|
734
738
|
};
|
|
735
|
-
function I(e,
|
|
739
|
+
function I(e, i, a, l, o, c) {
|
|
736
740
|
return v(), x("div", D, [
|
|
737
741
|
y("canvas", {
|
|
738
742
|
ref: "chartCanvas",
|
|
@@ -763,12 +767,12 @@ const K = /* @__PURE__ */ O(P, [["render", I]]), V = g({
|
|
|
763
767
|
}
|
|
764
768
|
},
|
|
765
769
|
setup(e) {
|
|
766
|
-
const
|
|
770
|
+
const i = f(null);
|
|
767
771
|
let a = null;
|
|
768
772
|
const l = () => {
|
|
769
|
-
var
|
|
773
|
+
var s;
|
|
770
774
|
a && a.destroy();
|
|
771
|
-
const o = (
|
|
775
|
+
const o = (s = i.value) == null ? void 0 : s.getContext("2d");
|
|
772
776
|
if (!o) return;
|
|
773
777
|
const c = {
|
|
774
778
|
labels: e.labels,
|
|
@@ -852,11 +856,11 @@ const K = /* @__PURE__ */ O(P, [["render", I]]), V = g({
|
|
|
852
856
|
},
|
|
853
857
|
{ deep: !0 }
|
|
854
858
|
), {
|
|
855
|
-
radarChartCanvas:
|
|
859
|
+
radarChartCanvas: i
|
|
856
860
|
};
|
|
857
861
|
}
|
|
858
862
|
});
|
|
859
|
-
function J(e,
|
|
863
|
+
function J(e, i, a, l, o, c) {
|
|
860
864
|
return v(), x("div", null, [
|
|
861
865
|
y("canvas", {
|
|
862
866
|
ref: "radarChartCanvas",
|
package/dist/charts.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./charts-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./charts-DJRnfFOn.cjs");exports.JChBar=e.index;exports.JChBarLine=e.index$1;exports.JChBubble=e.index$2;exports.JChLine=e.index$3;exports.JChPieDoughnut=e.index$4;exports.JChRadar=e.index$5;
|
package/dist/charts.es.js
CHANGED
|
@@ -19,6 +19,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
19
19
|
type: NumberConstructor;
|
|
20
20
|
default: number;
|
|
21
21
|
};
|
|
22
|
+
unitName: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
22
26
|
}>, {
|
|
23
27
|
lineChartCanvas: Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
|
|
24
28
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
@@ -40,9 +44,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
40
44
|
type: NumberConstructor;
|
|
41
45
|
default: number;
|
|
42
46
|
};
|
|
47
|
+
unitName: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
43
51
|
}>> & Readonly<{}>, {
|
|
44
52
|
options: {};
|
|
45
53
|
labels: unknown[];
|
|
46
54
|
height: number;
|
|
55
|
+
unitName: string;
|
|
47
56
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
48
57
|
export default _default;
|
|
@@ -27,6 +27,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
27
27
|
type: StringConstructor;
|
|
28
28
|
required: true;
|
|
29
29
|
};
|
|
30
|
+
tooltipDisabled: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
30
34
|
}>, {
|
|
31
35
|
historyParams: {
|
|
32
36
|
filterList: {
|
|
@@ -71,12 +75,17 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
71
75
|
type: StringConstructor;
|
|
72
76
|
required: true;
|
|
73
77
|
};
|
|
78
|
+
tooltipDisabled: {
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
default: boolean;
|
|
81
|
+
};
|
|
74
82
|
}>> & Readonly<{
|
|
75
83
|
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
76
84
|
}>, {
|
|
77
85
|
label: string;
|
|
78
86
|
deletable: boolean;
|
|
79
87
|
maxLength: number;
|
|
88
|
+
tooltipDisabled: boolean;
|
|
80
89
|
}, {}, {
|
|
81
90
|
JCTooltip: DefineComponent<ExtractPropTypes<{
|
|
82
91
|
content: {
|