PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 2.0.10
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v2.0.10
2.1.0 2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 1.40 1.41 All 42 releases
fluent-boards / assets / chartPalette.js

chartPalette.js in FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration 2.0.10, at assets/chartPalette.js

2 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{e}from"./vendor-echarts.js?ver=2.0.10";import{_ as r}from"./descriptionToPlainText.js?ver=2.0.10";import{aP as t,a5 as s,S as a,Z as n,a0 as o,a1 as i}from"./vendor.js?ver=2.0.10";import{a as h}from"./UpgradeUrl.js?ver=2.0.10";const c={name:"EChart",props:{option:{type:Object,required:!0},height:{type:Number,default:240},loading:{type:Boolean,default:!1}},data:()=>({chartInstance:null,resizeObserver:null}),watch:{option:{deep:!0,handler(){this.render()}}},mounted(){this.chartInstance=e.init(this.$refs.chart),this.render(),"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.handleResize()),this.resizeObserver.observe(this.$refs.chart)),window.addEventListener("resize",this.handleResize)},beforeUnmount(){window.removeEventListener("resize",this.handleResize),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.chartInstance&&(this.chartInstance.dispose(),this.chartInstance=null)},methods:{handleResize(){this.chartInstance&&this.chartInstance.resize()},render(){this.chartInstance&&this.chartInstance.setOption(this.option,!0)}}},d={class:"fbs_report_chart"};const p=r(c,[["render",function(e,r,h,c,p,m){const f=t("loading");return s((a(),n("div",d,[o("div",{ref:"chart",class:"fbs_report_chart--canvas",style:i({height:h.height+"px"})},null,4)])),[[f,h.loading]])}]]),m={"--fbs-report-chart-primary":"#335CFF","--fbs-report-chart-primary-soft":"#C0D5FF","--fbs-report-chart-medium":"#FA7319","--fbs-report-chart-neutral":"#717784","--fbs-report-chart-custom":"#7D52F4","--fbs-report-chart-track":"#E1E4EA","--fbs-success":"#1FC16B","--fbs-error":"#FB3748","--fbs-primary-text":"#0E121B","--fbs-secondary-text":"#525866","--fbs-text-muted":"#99A0AE","--fbs-primary-bg":"#FFFFFF","--fbs-primary-border":"#E1E4EA"},f={data:()=>({chartThemeVersion:0}),mounted(){this.onReportChartThemeChange=()=>{this.chartThemeVersion+=1},window.addEventListener(h,this.onReportChartThemeChange)},beforeUnmount(){this.onReportChartThemeChange&&window.removeEventListener(h,this.onReportChartThemeChange)},methods:{themedChartPalette(){return{primary:u("--fbs-report-chart-primary"),primarySoft:u("--fbs-report-chart-primary-soft"),medium:u("--fbs-report-chart-medium"),neutral:u("--fbs-report-chart-neutral"),custom:u("--fbs-report-chart-custom"),track:u("--fbs-report-chart-track"),success:u("--fbs-success"),error:u("--fbs-error"),text:u("--fbs-primary-text"),subText:u("--fbs-secondary-text"),mutedText:u("--fbs-text-muted"),surface:u("--fbs-primary-bg"),border:u("--fbs-primary-border"),_refreshKey:this.chartThemeVersion}}}};function u(e){if("undefined"==typeof window)return m[e];return window.getComputedStyle(document.documentElement).getPropertyValue(e).trim()||m[e]}function b(e,r){const t=[r.primary,r.success,r.medium,r.custom,r.error,r.neutral].filter(Boolean),s=[];for(let a=0;a<e;a+=1){if(a<t.length){s.push(t[a]);continue}const e=a-t.length,r=Math.round(137.508*e%360),n=e%2==0?58:44;s.push(`hsl(${r}, 62%, ${n}%)`)}return s}function l(e){return{backgroundColor:e.surface,borderColor:e.border,borderWidth:1,padding:[6,12],extraCssText:"border-radius:4px;box-shadow:0 12px 24px rgba(14,18,27,0.06),0 1px 2px rgba(14,18,27,0.03);",textStyle:{color:e.text,fontSize:12}}}export{p as E,b as a,f as c,l as t};
2