UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 1.85 kB
(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.13.4`}}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]=`7ac8769d-7faa-47a1-b928-11233ad8e16a`,e._sentryDebugIdIdentifier=`sentry-dbid-7ac8769d-7faa-47a1-b928-11233ad8e16a`)})()}catch{}import{$ as e,N as t,S as n,Wt as r,w as i}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{bt as a}from"./_MapCache-CUJwh2qp.js";import"./merge-BqvKZ38d.js";import"./dateformat-CYfyw486.js";import{a as o,t as s}from"./insights.constants-BWd0PYhd.js";import{l as c}from"./insights.utils-BGXnT8rV.js";import{l}from"./chart-y0goNHjN.js";import{r as u}from"./dist-DCXTMsxp.js";import{n as d,r as f}from"./chartjs.utils-CB90P002.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-DMu8QWDF.js.map