n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 1.78 kB
JavaScript
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.16.1`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`0736f7c4-7d71-4927-90aa-9d5b6006d5b4`,e._sentryDebugIdIdentifier=`sentry-dbid-0736f7c4-7d71-4927-90aa-9d5b6006d5b4`)})()}catch{}import{$ as e,N as t,S as n,Wt as r,w as i}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{at as a}from"./core-Bz5WjPxS.js";import{a as o,t as s}from"./insights.constants-G43L9nIf.js";import{l as c}from"./insights.utils-YrW9I9r0.js";import{l}from"./chart-WZvcQ3IV.js";import{r as u}from"./dist-DHUGszlM.js";import{n as d,r as f}from"./chartjs.utils-Bw-74clp.js";var p=t({__name:`InsightsChartTimeSaved`,props:{data:{},type:{},granularity:{},startDate:{},endDate:{}},setup(t){let p=t,m=a(),h=n(()=>d({plugins:{tooltip:{callbacks:{label:e=>{let t=e.dataset.label??``,n=Number(e.parsed.y);return`${t} ${c(n).toLocaleString(`en-US`)}${o[p.type](n)}`}}}},scales:{y:{ticks:{callback(e){return c(Number(e))}}}}})),g=n(()=>{let e=[],t=[];for(let n of p.data)e.push(s[p.granularity](n.date)),t.push(n.values.timeSaved);return{labels:e,datasets:[{label:m.baseText(`insights.banner.title.timeSaved`),data:t,fill:`origin`,cubicInterpolationMode:`monotone`,backgroundColor:e=>f(e.chart.ctx,292),borderColor:`rgba(255, 64, 39, 1)`}]}});return(t,n)=>(e(),i(r(u),{"data-test-id":`insights-chart-time-saved`,data:g.value,options:h.value,plugins:[r(l)]},null,8,[`data`,`options`,`plugins`]))}});export{p as default};
//# sourceMappingURL=InsightsChartTimeSaved-B2oilVxG.js.map