@glycanage/web-components 1.113.0 → 1.114.0

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.
@@ -1 +1 @@
1
- import{c as G,S as N,i as B,f as $,s as D,a as E,e as M,n as S,g as R,u as A,k as W,o as I,z as O}from"./index2.js";import{i as H,f as V,h as Z}from"./helpers.js";function q(a){E(a,"svelte-4pqnog",'@font-face{font-family:"Sen";src:url("https://dev.back-office.ga-internals-91.com/assets/fonts/Sen-Regular.ttf") format("truetype");font-weight:normal;font-display:swap}@font-face{font-family:"Sen";src:url("https://dev.back-office.ga-internals-91.com/assets/fonts/Sen-Bold.ttf") format("truetype");font-weight:bold;font-display:swap}')}function j(a){let e;return{c(){e=M("div"),S(e,"width","100%"),S(e,"height","100%"),S(e,"position","relative")},m(c,s){R(c,e,s),a[3](e)},p:A,i:A,o:A,d(c){c&&W(e),a[3](null)}}}function _(a,e,c){let{type:s}=e,{service:u=window.GaReportService}=e,L=[{name:"mature",csvPerc:"G0percentile",csvScore:"G0yourscore"},{name:"youth",csvPerc:"G2percentile",csvScore:"G2yourscore"},{name:"shield",csvPerc:"Spercentile",csvScore:"Syourscore"},{name:"lifestyle",csvPerc:"Bpercentile",csvScore:"Byourscore"},{name:"median",csvPerc:"G1percentile",csvScore:"G1yourscore"}],m,P,d,f=0,l=0,t={},v="",p=0,y;const g=L.find(o=>o.name===s);function x(){if(s=="median")return H(f);if(s=="shield"||s=="youth")return V(f);if(s=="mature"||s=="lifestyle")return Z(f)}function k(){y&&(t=echarts.init(y,null,{devicePixelRatio:4}));const o=y.getBoundingClientRect();var h={textStyle:{fontFamily:"Sen",fontStyle:"normal",fontSize:12,fontWeight:400,lineHeight:19.2,letterSpacing:.06},animation:!1,backgroundColor:"transparent",grid:{top:"65px",left:"50px",right:"55px",bottom:"40px"},dataset:[{source:P.data.map(i=>[i.x,i.y])},{source:d.data.map(i=>[i.x,i.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:"Age",nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(i){return i===0||i===100?"":i}},splitLine:{show:!0}},yAxis:{min:0,max:.6,name:"Index score",nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(i){return i===0||i===.6?"":i}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},itemStyle:{color:"#09341F",opacity:.1,borderWidth:1}},{name:"Measured result",type:"scatter",data:[{x:p,y:l}],itemStyle:{color:x()}},{name:"Population average",type:"line",smooth:!0,datasetIndex:1,symbol:"line",lineStyle:{name:"line",type:"line",color:"#09341F",opacity:.5,symbol:"none",width:5},showSymbol:!1}],graphic:[],legend:{show:!0,right:"50%",top:"3%",left:"70%",itemGap:.2,textStyle:{color:"#09341F",opacity:.8},selected:{"Measured result":!0,"Population average":!0},inactiveColor:"#fff"}};t.setOption(h),h.graphic.push({type:"line",shape:{x1:t.convertToPixel("xAxis",p),y1:t.convertToPixel("yAxis",0),x2:t.convertToPixel("xAxis",p),y2:t.convertToPixel("yAxis",l)},style:{stroke:x(),lineDash:[8,8],lineWidth:3},z:8}),h.graphic.push({type:"line",shape:{x1:t.convertToPixel("xAxis",0),y1:t.convertToPixel("yAxis",l),x2:t.convertToPixel("xAxis",p),y2:t.convertToPixel("yAxis",l)},style:{stroke:x(),lineDash:[8,8],lineWidth:3},z:8}),h.graphic.push({name:"Measured result",type:"circle",shape:{cx:t.convertToPixel("xAxis",p),cy:t.convertToPixel("yAxis",l),r:6},style:{fill:x(),stroke:"#FFFFFF",lineWidth:1},z:15});const F=t.convertToPixel("xAxis",p),T=t.convertToPixel("yAxis",l),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=document.createElement("div");n.setAttribute("width","71"),n.setAttribute("height","32"),n.setAttribute("viewBox","0 0 71 32"),n.setAttribute("fill","none"),n.setAttribute("xmlns","http://www.w3.org/2000/svg");const w=document.createElementNS("http://www.w3.org/2000/svg","path");w.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),w.setAttribute("fill",x());const b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),b.setAttribute("fill",x()),n.appendChild(w),n.appendChild(b),n.style.position="absolute",n.style.left=`${o.left+F+10}px`,n.style.top=`${o.top+T-15}px`,n.style.zIndex="8",r.innerText=`${Number.parseFloat(l).toFixed(3)}`,r.style.position="absolute",r.style.left=`${o.left+F+28}px`,r.style.top=`${o.top+T-8}px`,r.style.font="bold 16px sans-serif",r.style.color="white",r.style.zIndex="999",r.style.fontFamily="Sen",document.body.appendChild(r),document.body.appendChild(n),t.setOption(h)}I(async()=>{m=await u.getReport(),v=m.sex,P=await u.getScatterData(s,v),d=await u.getLineData(s,v),p=Number(m.chronologicalage),console.log("lineData:",d),g&&(f=Number(m[g.csvPerc]),l=Number(m[g.csvScore])),k()});function z(o){O[o?"unshift":"push"](()=>{y=o,c(0,y)})}return a.$$set=o=>{"type"in o&&c(1,s=o.type),"service"in o&&c(2,u=o.service)},[y,s,u,z]}class C extends N{constructor(e){super(),B(this,e,_,j,D,{type:1,service:2},q)}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),$()}get service(){return this.$$.ctx[2]}set service(e){this.$$set({service:e}),$()}}customElements.define("ga-scatter-plot-clp",G(C,{type:{},service:{}},[],[],!1));export{C as default};
1
+ import{c as G,S as N,i as B,f as $,s as D,a as E,e as M,p as R,n as b,g as W,u as A,k as I,o as O,z as H}from"./index2.js";import{i as V,f as Z,h as j}from"./helpers.js";function q(a){E(a,"svelte-c4lszg",'@font-face{font-family:"Sen";src:url("https://dev.back-office.ga-internals-91.com/assets/fonts/Sen-Regular.ttf") format("truetype");font-weight:normal;font-display:swap}@font-face{font-family:"Sen";src:url("https://dev.back-office.ga-internals-91.com/assets/fonts/Sen-Bold.ttf") format("truetype");font-weight:bold;font-display:swap}.targeting-class.svelte-c4lszg{font-family:"Sen", sans-serif}')}function J(a){let e;return{c(){e=M("div"),R(e,"class","targeting-class svelte-c4lszg"),b(e,"width","100%"),b(e,"height","100%"),b(e,"position","relative")},m(c,i){W(c,e,i),a[3](e)},p:A,i:A,o:A,d(c){c&&I(e),a[3](null)}}}function _(a,e,c){let{type:i}=e,{service:m=window.GaReportService}=e,C=[{name:"mature",csvPerc:"G0percentile",csvScore:"G0yourscore"},{name:"youth",csvPerc:"G2percentile",csvScore:"G2yourscore"},{name:"shield",csvPerc:"Spercentile",csvScore:"Syourscore"},{name:"lifestyle",csvPerc:"Bpercentile",csvScore:"Byourscore"},{name:"median",csvPerc:"G1percentile",csvScore:"G1yourscore"}],u,P,d,h=0,l=0,t={},v="",p=0,y;const g=C.find(s=>s.name===i);function x(){if(i=="median")return V(h);if(i=="shield"||i=="youth")return Z(h);if(i=="mature"||i=="lifestyle")return j(h)}function L(){y&&(t=echarts.init(y,null,{devicePixelRatio:4}));const s=y.getBoundingClientRect();var f={textStyle:{fontFamily:"Sen",fontStyle:"normal",fontSize:12,fontWeight:400,lineHeight:19.2,letterSpacing:.06},animation:!1,backgroundColor:"transparent",grid:{top:"65px",left:"50px",right:"55px",bottom:"40px"},dataset:[{source:P.data.map(o=>[o.x,o.y])},{source:d.data.map(o=>[o.x,o.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:"Age",nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(o){return o===0||o===100?"":o}},splitLine:{show:!0}},yAxis:{min:0,max:.6,name:"Index score",nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(o){return o===0||o===.6?"":o}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},itemStyle:{color:"#09341F",opacity:.1,borderWidth:1}},{name:"Measured result",type:"scatter",data:[{x:p,y:l}],itemStyle:{color:x()}},{name:"Population average",type:"line",smooth:!0,datasetIndex:1,symbol:"line",lineStyle:{name:"line",type:"line",color:"#09341F",opacity:.5,symbol:"none",width:5},showSymbol:!1}],graphic:[],legend:{show:!0,right:"50%",top:"3%",left:"70%",itemGap:.2,textStyle:{color:"#09341F",opacity:.8},selected:{"Measured result":!0,"Population average":!0},inactiveColor:"#fff"}};t.setOption(f),f.graphic.push({type:"line",shape:{x1:t.convertToPixel("xAxis",p),y1:t.convertToPixel("yAxis",0),x2:t.convertToPixel("xAxis",p),y2:t.convertToPixel("yAxis",l)},style:{stroke:x(),lineDash:[8,8],lineWidth:3},z:8}),f.graphic.push({type:"line",shape:{x1:t.convertToPixel("xAxis",0),y1:t.convertToPixel("yAxis",l),x2:t.convertToPixel("xAxis",p),y2:t.convertToPixel("yAxis",l)},style:{stroke:x(),lineDash:[8,8],lineWidth:3},z:8}),f.graphic.push({name:"Measured result",type:"circle",shape:{cx:t.convertToPixel("xAxis",p),cy:t.convertToPixel("yAxis",l),r:6},style:{fill:x(),stroke:"#FFFFFF",lineWidth:1},z:15});const F=t.convertToPixel("xAxis",p),T=t.convertToPixel("yAxis",l),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=document.createElement("div");n.setAttribute("width","71"),n.setAttribute("height","32"),n.setAttribute("viewBox","0 0 71 32"),n.setAttribute("fill","none"),n.setAttribute("xmlns","http://www.w3.org/2000/svg");const w=document.createElementNS("http://www.w3.org/2000/svg","path");w.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),w.setAttribute("fill",x());const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),S.setAttribute("fill",x()),n.appendChild(w),n.appendChild(S),n.style.position="absolute",n.style.left=`${s.left+F+10}px`,n.style.top=`${s.top+T-15}px`,n.style.zIndex="8",r.innerText=`${Number.parseFloat(l).toFixed(3)}`,r.style.position="absolute",r.style.left=`${s.left+F+28}px`,r.style.top=`${s.top+T-8}px`,r.style.font="bold 16px sans-serif",r.style.color="white",r.style.zIndex="999",r.style.fontFamily='"Sen", sans-serif',document.body.appendChild(r),document.body.appendChild(n),t.setOption(f)}O(async()=>{u=await m.getReport(),v=u.sex,P=await m.getScatterData(i,v),d=await m.getLineData(i,v),p=Number(u.chronologicalage),console.log("lineData:",d),g&&(h=Number(u[g.csvPerc]),l=Number(u[g.csvScore])),L()});function k(s){H[s?"unshift":"push"](()=>{y=s,c(0,y)})}return a.$$set=s=>{"type"in s&&c(1,i=s.type),"service"in s&&c(2,m=s.service)},[y,i,m,k]}class z extends N{constructor(e){super(),B(this,e,_,J,D,{type:1,service:2},q)}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),$()}get service(){return this.$$.ctx[2]}set service(e){this.$$set({service:e}),$()}}customElements.define("ga-scatter-plot-clp",G(z,{type:{},service:{}},[],[],!1));export{z as default};
@@ -1 +1 @@
1
- import{c as G,S as N,i as B,f as $,s as E,a as M,e as R,n as b,g as W,u as S,k as D,o as I,z as O}from"./index2.js";import{i as H,f as V,h as Z}from"./helpers.js";function q(l){M(l,"svelte-4pqnog",'@font-face{font-family:"Sen";src:url("https://dev.back-office.ga-internals-91.com/assets/fonts/Sen-Regular.ttf") format("truetype");font-weight:normal;font-display:swap}@font-face{font-family:"Sen";src:url("https://dev.back-office.ga-internals-91.com/assets/fonts/Sen-Bold.ttf") format("truetype");font-weight:bold;font-display:swap}')}function j(l){let e;return{c(){e=R("div"),b(e,"width","100%"),b(e,"height","100%"),b(e,"position","relative")},m(c,s){W(c,e,s),l[3](e)},p:S,i:S,o:S,d(c){c&&D(e),l[3](null)}}}function _(l,e,c){let{type:s}=e,{service:u=window.GaReportService}=e,L=[{name:"mature",csvPerc:"G0percentile",csvScore:"G0yourscore"},{name:"youth",csvPerc:"G2percentile",csvScore:"G2yourscore"},{name:"shield",csvPerc:"Spercentile",csvScore:"Syourscore"},{name:"lifestyle",csvPerc:"Bpercentile",csvScore:"Byourscore"},{name:"median",csvPerc:"G1percentile",csvScore:"G1yourscore"}],m,A,P,f=0,a=0,t={},d="",p=0,y;const v=L.find(o=>o.name===s);function x(){if(s=="median")return H(f);if(s=="shield"||s=="youth")return V(f);if(s=="mature"||s=="lifestyle")return Z(f)}function k(){y&&(t=echarts.init(y,null,{devicePixelRatio:4}));const o=y.getBoundingClientRect();var h={textStyle:{fontFamily:"Sen",fontStyle:"normal",fontSize:12,fontWeight:400,lineHeight:19.2,letterSpacing:.06},animation:!1,backgroundColor:"transparent",grid:{top:"65px",left:"50px",right:"55px",bottom:"40px"},dataset:[{source:A.data.map(i=>[i.x,i.y])},{source:P.data.map(i=>[i.x,i.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:"Age",nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(i){return i===0||i===100?"":i}},splitLine:{show:!0}},yAxis:{min:0,max:.6,name:"Index score",nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(i){return i===0||i===.6?"":i}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},itemStyle:{color:"#09341F",opacity:.1,borderWidth:1}},{name:"Measured result",type:"scatter",data:[{x:p,y:a}],itemStyle:{color:x()}},{name:"Population average",type:"line",smooth:!0,datasetIndex:1,symbol:"line",lineStyle:{name:"line",type:"line",color:"#09341F",opacity:.5,symbol:"none",width:5},showSymbol:!1}],graphic:[],legend:{show:!0,right:"50%",top:"3%",left:"70%",itemGap:.2,textStyle:{color:"#09341F",opacity:.8},selected:{"Measured result":!0,"Population average":!0},inactiveColor:"#fff"}};t.setOption(h),h.graphic.push({type:"line",shape:{x1:t.convertToPixel("xAxis",p),y1:t.convertToPixel("yAxis",0),x2:t.convertToPixel("xAxis",p),y2:t.convertToPixel("yAxis",a)},style:{stroke:x(),lineDash:[8,8],lineWidth:3},z:8}),h.graphic.push({type:"line",shape:{x1:t.convertToPixel("xAxis",0),y1:t.convertToPixel("yAxis",a),x2:t.convertToPixel("xAxis",p),y2:t.convertToPixel("yAxis",a)},style:{stroke:x(),lineDash:[8,8],lineWidth:3},z:8}),h.graphic.push({name:"Measured result",type:"circle",shape:{cx:t.convertToPixel("xAxis",p),cy:t.convertToPixel("yAxis",a),r:6},style:{fill:x(),stroke:"#FFFFFF",lineWidth:1},z:15});const F=t.convertToPixel("xAxis",p),T=t.convertToPixel("yAxis",a),r=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=document.createElement("div");r.setAttribute("width","71"),r.setAttribute("height","32"),r.setAttribute("viewBox","0 0 71 32"),r.setAttribute("fill","none"),r.setAttribute("xmlns","http://www.w3.org/2000/svg");const g=document.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),g.setAttribute("fill",x());const w=document.createElementNS("http://www.w3.org/2000/svg","path");w.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),w.setAttribute("fill",x()),r.appendChild(g),r.appendChild(w),r.style.position="absolute",r.style.left=`${o.left+F+10}px`,r.style.top=`${o.top+T-15}px`,r.style.zIndex="8",n.innerText=`${Number.parseFloat(a).toFixed(3)}`,n.style.position="absolute",n.style.left=`${o.left+F+28}px`,n.style.top=`${o.top+T-8}px`,n.style.font="bold 16px sans-serif",n.style.color="white",n.style.zIndex="999",n.style.fontFamily="Sen",document.body.appendChild(n),document.body.appendChild(r),t.setOption(h)}I(async()=>{m=await u.getReport(),d=m.sex,A=await u.getScatterData(s,d),P=await u.getLineData(s,d),p=Number(m.chronologicalage),v&&(f=Number(m[v.csvPerc]),a=Number(m[v.csvScore])),k()});function z(o){O[o?"unshift":"push"](()=>{y=o,c(0,y)})}return l.$$set=o=>{"type"in o&&c(1,s=o.type),"service"in o&&c(2,u=o.service)},[y,s,u,z]}class C extends N{constructor(e){super(),B(this,e,_,j,E,{type:1,service:2},q)}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),$()}get service(){return this.$$.ctx[2]}set service(e){this.$$set({service:e}),$()}}customElements.define("ga-scatter-plot",G(C,{type:{},service:{}},[],[],!1));export{C as default};
1
+ import{c as G,S as N,i as B,f as $,s as E,a as M,e as R,p as W,n as S,g as D,u as b,k as I,o as O,z as H}from"./index2.js";import{i as V,f as Z,h as j}from"./helpers.js";function q(l){M(l,"svelte-c4lszg",'@font-face{font-family:"Sen";src:url("https://dev.back-office.ga-internals-91.com/assets/fonts/Sen-Regular.ttf") format("truetype");font-weight:normal;font-display:swap}@font-face{font-family:"Sen";src:url("https://dev.back-office.ga-internals-91.com/assets/fonts/Sen-Bold.ttf") format("truetype");font-weight:bold;font-display:swap}.targeting-class.svelte-c4lszg{font-family:"Sen", sans-serif}')}function J(l){let e;return{c(){e=R("div"),W(e,"class","targeting-class svelte-c4lszg"),S(e,"width","100%"),S(e,"height","100%"),S(e,"position","relative")},m(c,o){D(c,e,o),l[3](e)},p:b,i:b,o:b,d(c){c&&I(e),l[3](null)}}}function _(l,e,c){let{type:o}=e,{service:m=window.GaReportService}=e,C=[{name:"mature",csvPerc:"G0percentile",csvScore:"G0yourscore"},{name:"youth",csvPerc:"G2percentile",csvScore:"G2yourscore"},{name:"shield",csvPerc:"Spercentile",csvScore:"Syourscore"},{name:"lifestyle",csvPerc:"Bpercentile",csvScore:"Byourscore"},{name:"median",csvPerc:"G1percentile",csvScore:"G1yourscore"}],u,A,P,h=0,a=0,t={},d="",p=0,y;const v=C.find(s=>s.name===o);function x(){if(o=="median")return V(h);if(o=="shield"||o=="youth")return Z(h);if(o=="mature"||o=="lifestyle")return j(h)}function L(){y&&(t=echarts.init(y,null,{devicePixelRatio:4}));const s=y.getBoundingClientRect();var f={textStyle:{fontFamily:"Sen",fontStyle:"normal",fontSize:12,fontWeight:400,lineHeight:19.2,letterSpacing:.06},animation:!1,backgroundColor:"transparent",grid:{top:"65px",left:"50px",right:"55px",bottom:"40px"},dataset:[{source:A.data.map(i=>[i.x,i.y])},{source:P.data.map(i=>[i.x,i.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:"Age",nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(i){return i===0||i===100?"":i}},splitLine:{show:!0}},yAxis:{min:0,max:.6,name:"Index score",nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(i){return i===0||i===.6?"":i}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},itemStyle:{color:"#09341F",opacity:.1,borderWidth:1}},{name:"Measured result",type:"scatter",data:[{x:p,y:a}],itemStyle:{color:x()}},{name:"Population average",type:"line",smooth:!0,datasetIndex:1,symbol:"line",lineStyle:{name:"line",type:"line",color:"#09341F",opacity:.5,symbol:"none",width:5},showSymbol:!1}],graphic:[],legend:{show:!0,right:"50%",top:"3%",left:"70%",itemGap:.2,textStyle:{color:"#09341F",opacity:.8},selected:{"Measured result":!0,"Population average":!0},inactiveColor:"#fff"}};t.setOption(f),f.graphic.push({type:"line",shape:{x1:t.convertToPixel("xAxis",p),y1:t.convertToPixel("yAxis",0),x2:t.convertToPixel("xAxis",p),y2:t.convertToPixel("yAxis",a)},style:{stroke:x(),lineDash:[8,8],lineWidth:3},z:8}),f.graphic.push({type:"line",shape:{x1:t.convertToPixel("xAxis",0),y1:t.convertToPixel("yAxis",a),x2:t.convertToPixel("xAxis",p),y2:t.convertToPixel("yAxis",a)},style:{stroke:x(),lineDash:[8,8],lineWidth:3},z:8}),f.graphic.push({name:"Measured result",type:"circle",shape:{cx:t.convertToPixel("xAxis",p),cy:t.convertToPixel("yAxis",a),r:6},style:{fill:x(),stroke:"#FFFFFF",lineWidth:1},z:15});const F=t.convertToPixel("xAxis",p),T=t.convertToPixel("yAxis",a),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=document.createElement("div");n.setAttribute("width","71"),n.setAttribute("height","32"),n.setAttribute("viewBox","0 0 71 32"),n.setAttribute("fill","none"),n.setAttribute("xmlns","http://www.w3.org/2000/svg");const g=document.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),g.setAttribute("fill",x());const w=document.createElementNS("http://www.w3.org/2000/svg","path");w.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),w.setAttribute("fill",x()),n.appendChild(g),n.appendChild(w),n.style.position="absolute",n.style.left=`${s.left+F+10}px`,n.style.top=`${s.top+T-15}px`,n.style.zIndex="8",r.innerText=`${Number.parseFloat(a).toFixed(3)}`,r.style.position="absolute",r.style.left=`${s.left+F+28}px`,r.style.top=`${s.top+T-8}px`,r.style.font="bold 16px sans-serif",r.style.color="white",r.style.zIndex="999",r.style.fontFamily='"Sen", sans-serif',document.body.appendChild(r),document.body.appendChild(n),t.setOption(f)}O(async()=>{u=await m.getReport(),d=u.sex,A=await m.getScatterData(o,d),P=await m.getLineData(o,d),p=Number(u.chronologicalage),v&&(h=Number(u[v.csvPerc]),a=Number(u[v.csvScore])),L()});function k(s){H[s?"unshift":"push"](()=>{y=s,c(0,y)})}return l.$$set=s=>{"type"in s&&c(1,o=s.type),"service"in s&&c(2,m=s.service)},[y,o,m,k]}class z extends N{constructor(e){super(),B(this,e,_,J,E,{type:1,service:2},q)}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),$()}get service(){return this.$$.ctx[2]}set service(e){this.$$set({service:e}),$()}}customElements.define("ga-scatter-plot",G(z,{type:{},service:{}},[],[],!1));export{z as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@glycanage/web-components",
3
3
  "description": "A collection of web-components",
4
- "version": "1.113.0",
4
+ "version": "1.114.0",
5
5
  "type": "module",
6
6
  "main": "dist/lib/@glycanage/web-components.js",
7
7
  "scripts": {