@devgateway/dvz-ui-react 1.8.0 → 1.8.1

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
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),j=require("react"),lt=require("react-intl"),ct=require("@nivo/line"),it=require("./Tooltip.js"),pe=require("d3-shape"),ot=require("@nivo/theming"),dt=require("../../layout/FlexWrapDetector.js"),V=require("../../utils/deviceType.js"),ht="#66676d",G="#f0f0f1",ye=["mobile","tablet","midTablet"].includes(V.default()),ge=V.default()==="mobile",be=["tablet","midTablet"].includes(V.default()),ut=(d,p)=>{const v=document.createElement("canvas").getContext("2d");return v.font=p,v.measureText(d).width},mt=({editing:d,previewMode:p,app:Y,legends:v,tooltip:k,tooltipEnabled:je,options:h,intl:D,groupMode:J,reverse:xt,marginLeft:ve,lineLabelPosition:Ee,marginTop:K,marginRight:Ne,marginBottom:Z,format:E,colors:pt,offsetY:Oe,height:Me,showLegends:P,legendPosition:u,tickRotation:y,offsetText:_,tickColor:w,legendLabel:Q,xLabelColor:N,colorGenerator:X,legendCheckBack:z,legendLabelBack:Te,legendLabelColor:C,highlightXAxisLine:ke,showTickLine:A,showRightAxis:De,valueScale:yt,enableArea:Ie,areaShadingCriteria:ee,areaLowerBound:te,areaUpperBound:ae,showPoints:$e,maxValue:Fe,fixedMinValue:B,fixedMaxValue:q,offsetBottom:Le,yAxisTickValues:Se,enableGridY:We,enableGridX:_e,overrideTickColor:H,offsetRight:we,selectedMeasures:ze,tooltipEnableMarkdown:Ae,minMaxClamp:Be,reverseLegend:qe,customAxisFormat:I,mobileCustomization:He,lineCurve:Re,customLabels:R,lineXAxisTickMode:se,lineXAxisTickCount:Ue,lineXAxisTickEvery:Ge})=>{var me,fe,xe;const c=JSON.parse(decodeURIComponent(He)),ne=ye&&((c==null?void 0:c.showCustomization)??!1),$=ne&&p!=="Desktop",F=!d&&ne,[re,Ve]=j.useState(50),[le,Ye]=j.useState(K),[gt,ce]=j.useState(0),[ie,Je]=j.useState(Z),[O,Ke]=j.useState([]),L=h.data.map(e=>({id:e.id,label:R&&R[e.id]?R[e.id]:e.label||e.id,color:X.getColor(e.id,e)})),oe=()=>(qe&&L.reverse(),n.jsx(n.Fragment,{children:P&&L.map((e,a)=>n.jsxs("div",{className:"legend item",onClick:()=>Qe(e.id),children:[n.jsx("input",{className:"ignore",type:"checkbox",checked:O.length===0||!O.includes(e.id),readOnly:!0,style:{backgroundColor:z===!0?e.color:"none",color:C}}),n.jsx("span",{className:z===!0?"checkmark-with-bg":"checkmark",style:{backgroundColor:z===!0?e.color:"transparent"}}),n.jsx("label",{style:{backgroundColor:Te===!0?e.color:"transparent",color:C},children:e.label})]},a))}));j.useEffect(()=>{(()=>{const l=5*Math.max(L.length-5,0);Ve(l)})()},[L]);const Ze={bottom:`-${re}px`},Pe={bottom:`-${re}px`,gap:"0px",top:"0px"},S=e=>O.length?e.filter(a=>O.indexOf(a.id)===-1):e,Qe=e=>{const a=O.slice();if(a.indexOf(e)>-1){const l=a.indexOf(e);a.splice(l,1)}else a.push(e);Ke(a)},Xe=e=>{const a=Object.assign({},e),l=ot.useTheme();($||F)&&he.includes(String(a.value))&&(a.value="");let t=[],s="";if($||F){const i=String(a.value).split(" ");let o=25;d&&p==="Mobile"||ge&&!d?o=(c==null?void 0:c.mobileMaxTickLength)??25:d&&p==="Tablet"||be&&!d?o=(c==null?void 0:c.tabletMaxTickLength)??25:window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches&&!d&&(o=15),i.forEach(g=>{s.length+String(g).length<=o?s+=(s?" ":"")+g:(t.push(s),s=g)}),s&&t.push(s)}else t=[a.value];let r=12;return d&&p==="Mobile"||ge&&!d?r=(c==null?void 0:c.mobileYAxisLineHeight)??12:(d&&p==="Tablet"||be&&!d)&&(r=(c==null?void 0:c.tabletYAxisLineHeight)??12),ut(a.value,"12px Roboto")+15,y>0&&y<180?n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:t.map((i,o)=>n.jsx("text",{transform:`rotate(${y})`,textAnchor:"start",y:typeof e.value=="number"?0:o*r,dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N==="null"?"black":N,fontSize:"12px",fontFamily:"sans-serif"},children:i},i))})]}):y>180&&y<360?n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:n.jsx("text",{transform:`rotate(${y})`,textAnchor:"end",dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N,fontSize:"12px"},children:a.value})})]}):n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:t.map((i,o)=>n.jsx("text",{transform:`rotate(${y})`,textAnchor:"middle",y:typeof e.value=="number"?0:o*r,dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N==="null"?"black":N,fontSize:"12px",fontFamily:"sans-serif"},children:i},i))})]})},Ce=({series:e,xScale:a,yScale:l,innerHeight:t})=>{const s=e&&e.length>0?e[0].color:"#3daff7",r=[];e[0]&&e[0].data.forEach(x=>{Y=="csv"?h.keys.forEach(b=>{r.push({measure:b,min:x.data.variables[b]})}):ze.forEach(b=>{r.push({measure:b,min:x.data.variables[b]})})});const i=r.sort((x,b)=>x.min-b.min),o=ee=="CUSTOM_BETWEEN_TWO_LINES"&&te?te:i[0].measure,g=ee=="CUSTOM_BETWEEN_TWO_LINES"&&ae?ae:i[i.length-1].measure,rt=pe.area().x(x=>a(x.data.x)).y0(x=>l(x.data.variables[o])).y1(x=>l(x.data.variables[g]));return n.jsx(n.Fragment,{children:e&&e[0]&&n.jsx("path",{d:rt(e[0].data),fill:s,fillOpacity:.4})})},et=({series:e,xScale:a,yScale:l,innerHeight:t,innerWidth:s})=>{const r=[0,s],i=pe.line().x((o,g)=>g===0?-10:o).y(o=>l(0));return n.jsx(j.Fragment,{children:n.jsx("path",{d:i(r),fill:"none",stroke:ht,style:{pointerEvents:"none",strokeDasharray:"4 4"}})})},M=["grid","axes","lines","legends"];Ie&&M.push(Ce),$e&&(M.push("points"),M.push("mesh")),ke&&M.push(et);let T=[];S(h.data).forEach(e=>{e.data&&(T=[...T,...e.data.map(a=>a.y)])});const tt=()=>{if(J==="stacked"){const e=[];S(h.data).forEach(t=>{e.push(...t.data)});const l=[];e.forEach(t=>{l.indexOf(t.x)==-1&&l.push(t.x)}),f=Math.max(...l.map(t=>e.filter(s=>s.x==t).map(s=>s.y).reduce((s,r)=>Math.max(s+r,s+0)))),m=Math.min(...l.map(t=>e.filter(s=>s.x==t).map(s=>s.y).reduce((s,r)=>Math.min(s-r,r-s))))}else T.length>0&&(f=Math.max(...T),m=Math.min(...T));return f=f<0?f*.9:f*1.1,m=m>0?m*.9:m*1.1,{min:m,max:f}};let m="auto",f="auto";const W=tt();Fe=="fixed"?(m=B!=null&&B!=""?B:W.min,f=q!=null&&q!=""?q:W.max):(m=W.min,f=W.max);const de=()=>n.jsx(n.Fragment,{children:P&&Q&&n.jsx("div",{className:"legend item",children:n.jsx("label",{className:"legend-title",children:Q})})}),at={top:le,right:Ne,bottom:ie,left:ve};let U=parseInt(Se);const st=h.data&&((fe=(me=h.data)==null?void 0:me.filter(e=>{var a;return((a=e==null?void 0:e.data)==null?void 0:a.length)>0}))==null?void 0:fe.length),he=[];if($||F){U=Number.parseInt(c.yAxisTickValues);const e=new Map(Object.entries(((xe=c==null?void 0:c.labels)==null?void 0:xe.xAxis)??{}));for(const[a,l]of e)l||he.push(a)}const ue=S(h.data),nt=["grid","axes","legends"];if(h!=null&&h.data&&st>0){let e=S(h.data);const a=[];e.forEach(t=>{t&&Array.isArray(t.data)&&t.data.forEach(s=>{const r=s&&s.x;r!==void 0&&a.indexOf(r)===-1&&a.push(r)})});let l;if(se==="count"){const t=Math.max(1,parseInt(Ue));if(a.length>0&&t>0)if(a.length<=t)l=a.slice();else{const s=(a.length-1)/(t-1),r=new Array(t);for(let i=0;i<t;i++)r[i]=Math.floor(i*s);r[t-1]=a.length-1,l=r.map(i=>a[i])}}else if(se==="every"){const t=Math.max(1,parseInt(Ge));if(a.length>0){const s=[];for(let r=0;r<a.length;r++)r%t===0&&s.push(a[r]);s[s.length-1]!==a[a.length-1]&&s.push(a[a.length-1]),l=s}}return n.jsxs("div",{style:{height:Me},children:[n.jsx(ct.ResponsiveLine,{curve:Re,data:ue,margin:at,xScale:{type:"point"},yScale:{type:"linear",min:m,max:f,stacked:J=="stacked",reverse:!1,clamp:Be},layers:ue.length===0?nt:M,axisTop:null,axisRight:De?{tickSize:5,tickValues:U,tickPadding:5,tickRotation:0,legend:v.right,legendPosition:"middle",legendOffset:parseInt(we),format:t=>{const s=I||E;return D.formatNumber(s.style==="percent"?t/100:t,{...s})}}:null,enableGridY:We,enableGridX:_e,enablePointLabel:Ee==="top",pointLabel:t=>D.formatNumber(E.style==="percent"?t.yFormatted/100:t.yFormatted,E),lineWidth:3,colors:t=>X.getColor(t.id,t),axisBottom:($||F)&&(c==null?void 0:c.xAxisDisabled)===!0?null:{...l?{tickValues:l}:{},renderTick:Xe,legend:v.bottom,legendPosition:"middle",legendOffset:Number.parseInt(Le)},axisLeft:{tickSize:5,tickValues:U,tickPadding:5,tickRotation:0,legend:v.left,legendPosition:"middle",legendOffset:Number.parseInt(Oe),format:t=>{const s=I||E;return D.formatNumber(s.style==="percent"?t/100:t,{...s})}},tooltip:t=>je&&k&&k.trim().length>0?n.jsx(it.default,{intl:D,format:E,d:t,tooltip:k,tooltipEnableMarkdown:Ae}):null,pointSize:10,pointBorderWidth:2,pointBorderColor:{from:"serieColor"},useMesh:e.length>0&&e[0].data.length>0},new Date),(u==="top"||u==="bottom")&&n.jsx("div",{className:`legends container has-standard-12-font-size ${u}`,style:u==="top"?{marginTop:ye&&`${le}px`}:u==="bottom"?{marginBottom:`${ie}px`}:{},children:n.jsxs("div",{className:"legend-sections",children:[n.jsx("div",{className:"title-section",children:de()}),n.jsx(dt.default,{onWrapChange:t=>{if(u==="top"){const s=K+t/2*40;Ye(s),ce(t)}else Je(Z+t/2*25),ce(t)},className:"legends container has-standard-12-font-size items-section",children:oe()})]})}),(u==="right"||u==="left")&&n.jsxs("div",{className:`legends container has-standard-12-font-size ${u}`,style:u==="right"?Ze:Pe,children:[de(),oe()]})]})}return n.jsx("div",{})},ft=lt.injectIntl(mt);exports.default=ft;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),j=require("react"),lt=require("react-intl"),ct=require("@nivo/line"),it=require("./Tooltip.js"),pe=require("d3-shape"),ot=require("@nivo/theming"),dt=require("../../layout/FlexWrapDetector.js"),V=require("../../utils/deviceType.js"),ht="#66676d",G="#f0f0f1",ye=["mobile","tablet","midTablet"].includes(V.default()),ge=V.default()==="mobile",be=["tablet","midTablet"].includes(V.default()),ut=(d,p)=>{const v=document.createElement("canvas").getContext("2d");return v.font=p,v.measureText(d).width},mt=({editing:d,previewMode:p,app:Y,legends:v,tooltip:k,tooltipEnabled:je,options:h,intl:D,groupMode:J,reverse:xt,marginLeft:ve,lineLabelPosition:Ee,marginTop:K,marginRight:Ne,marginBottom:Z,format:E,colors:pt,offsetY:Oe,height:Me,showLegends:P,legendPosition:u,tickRotation:y,offsetText:_,tickColor:w,legendLabel:Q,xLabelColor:N,colorGenerator:X,legendCheckBack:z,legendLabelBack:Te,legendLabelColor:C,highlightXAxisLine:ke,showTickLine:A,showRightAxis:De,valueScale:yt,enableArea:Ie,areaShadingCriteria:ee,areaLowerBound:te,areaUpperBound:ae,showPoints:$e,maxValue:Fe,fixedMinValue:B,fixedMaxValue:q,offsetBottom:Le,yAxisTickValues:Se,enableGridY:We,enableGridX:_e,overrideTickColor:H,offsetRight:we,selectedMeasures:ze,tooltipEnableMarkdown:Ae,minMaxClamp:Be,reverseLegend:qe,customAxisFormat:I,mobileCustomization:He,lineCurve:Re,customLabels:R,lineXAxisTickMode:se,lineXAxisTickCount:Ue,lineXAxisTickEvery:Ge})=>{var me,fe,xe;const c=JSON.parse(decodeURIComponent(He)),ne=ye&&((c==null?void 0:c.showCustomization)??!1),$=ne&&p!=="Desktop",F=!d&&ne,[re,Ve]=j.useState(50),[le,Ye]=j.useState(K),[gt,ce]=j.useState(0),[ie,Je]=j.useState(Z),[O,Ke]=j.useState([]),L=h.data.map(e=>({id:e.id,label:R&&R[e.id]?R[e.id]:e.label||e.id,color:X.getColor(e.id,e)})),oe=()=>(qe&&L.reverse(),n.jsx(n.Fragment,{children:P&&L.map((e,a)=>n.jsxs("div",{className:"legend item",onClick:()=>Qe(e.id),children:[n.jsx("input",{className:"ignore",type:"checkbox",checked:O.length===0||!O.includes(e.id),readOnly:!0,style:{backgroundColor:z===!0?e.color:"none",color:C}}),n.jsx("span",{className:z===!0?"checkmark-with-bg":"checkmark",style:{backgroundColor:z===!0?e.color:"transparent"}}),n.jsx("label",{style:{backgroundColor:Te===!0?e.color:"transparent",color:C},children:e.label})]},a))}));j.useEffect(()=>{(()=>{const l=5*Math.max(L.length-5,0);Ve(l)})()},[L]);const Ze={bottom:`-${re}px`},Pe={bottom:`-${re}px`,gap:"0px",top:"0px"},S=e=>O.length?e.filter(a=>O.indexOf(a.id)===-1):e,Qe=e=>{const a=O.slice();if(a.indexOf(e)>-1){const l=a.indexOf(e);a.splice(l,1)}else a.push(e);Ke(a)},Xe=e=>{const a=Object.assign({},e),l=ot.useTheme();($||F)&&he.includes(String(a.value))&&(a.value="");let t=[],s="";if($||F){const i=String(a.value).split(" ");let o=25;d&&p==="Mobile"||ge&&!d?o=(c==null?void 0:c.mobileMaxTickLength)??25:d&&p==="Tablet"||be&&!d?o=(c==null?void 0:c.tabletMaxTickLength)??25:window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches&&!d&&(o=15),i.forEach(g=>{s.length+String(g).length<=o?s+=(s?" ":"")+g:(t.push(s),s=g)}),s&&t.push(s)}else t=[a.value];let r=12;return d&&p==="Mobile"||ge&&!d?r=(c==null?void 0:c.mobileYAxisLineHeight)??12:(d&&p==="Tablet"||be&&!d)&&(r=(c==null?void 0:c.tabletYAxisLineHeight)??12),ut(a.value,"12px Roboto")+15,y>0&&y<180?n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:t.map((i,o)=>n.jsx("text",{transform:`rotate(${y})`,textAnchor:"start",y:typeof e.value=="number"?0:o*r,dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N==="null"?"black":N,fontSize:"12px",fontFamily:"sans-serif"},children:i},i))})]}):y>180&&y<360?n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:n.jsx("text",{transform:`rotate(${y})`,textAnchor:"end",dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N,fontSize:"12px"},children:a.value})})]}):n.jsxs("g",{transform:`translate(${e.x},${e.y+30})`,children:[A&&n.jsx("line",{stroke:H?w:G,strokeWidth:1.5,y1:-32,y2:-12}),n.jsx("g",{transform:`translate(0, ${e.y+_})`,children:t.map((i,o)=>n.jsx("text",{transform:`rotate(${y})`,textAnchor:"middle",y:typeof e.value=="number"?0:o*r,dominantBaseline:"middle",style:{...l.axis.ticks.text,fill:N==="null"?"black":N,fontSize:"12px",fontFamily:"sans-serif"},children:i},i))})]})},Ce=({series:e,xScale:a,yScale:l,innerHeight:t})=>{const s=e&&e.length>0?e[0].color:"#3daff7",r=[];e[0]&&e[0].data.forEach(x=>{Y=="csv"?h.keys.forEach(b=>{r.push({measure:b,min:x.data.variables[b]})}):ze.forEach(b=>{r.push({measure:b,min:x.data.variables[b]})})});const i=r.sort((x,b)=>x.min-b.min),o=ee=="CUSTOM_BETWEEN_TWO_LINES"&&te?te:i[0].measure,g=ee=="CUSTOM_BETWEEN_TWO_LINES"&&ae?ae:i[i.length-1].measure,rt=pe.area().x(x=>a(x.data.x)).y0(x=>l(x.data.variables[o])).y1(x=>l(x.data.variables[g]));return n.jsx(n.Fragment,{children:e&&e[0]&&n.jsx("path",{d:rt(e[0].data),fill:s,fillOpacity:.4})})},et=({series:e,xScale:a,yScale:l,innerHeight:t,innerWidth:s})=>{const r=[0,s],i=pe.line().x((o,g)=>g===0?-10:o).y(o=>l(0));return n.jsx(j.Fragment,{children:n.jsx("path",{d:i(r),fill:"none",stroke:ht,style:{pointerEvents:"none",strokeDasharray:"4 4"}})})},M=["grid","axes","lines","legends"];Ie&&M.push(Ce),$e&&(M.push("points"),M.push("mesh")),ke&&M.push(et);let T=[];S(h.data).forEach(e=>{e.data&&(T=[...T,...e.data.map(a=>a.y)])});const tt=()=>{if(J==="stacked"){const e=[];S(h.data).forEach(t=>{e.push(...t.data)});const l=[];e.forEach(t=>{l.indexOf(t.x)==-1&&l.push(t.x)}),f=Math.max(...l.map(t=>e.filter(s=>s.x==t).map(s=>s.y).reduce((s,r)=>Math.max(s+r,s+0)))),m=Math.min(...l.map(t=>e.filter(s=>s.x==t).map(s=>s.y).reduce((s,r)=>Math.min(s-r,r-s))))}else T.length>0&&(f=Math.max(...T),m=Math.min(...T));return f=f<0?f*.9:f*1.1,m=m>0?m*.9:m*1.1,{min:m,max:f}};let m="auto",f="auto";const W=tt();Fe=="fixed"?(m=B!=null&&B!=""?B:W.min,f=q!=null&&q!=""?q:W.max):(m=W.min,f=W.max);const de=()=>n.jsx(n.Fragment,{children:P&&Q&&n.jsx("div",{className:"legend item",children:n.jsx("label",{className:"legend-title",children:Q})})}),at={top:le,right:Ne,bottom:ie,left:ve};let U=parseInt(Se);const st=h.data&&((fe=(me=h.data)==null?void 0:me.filter(e=>{var a;return((a=e==null?void 0:e.data)==null?void 0:a.length)>0}))==null?void 0:fe.length),he=[];if($||F){U=Number.parseInt(c.yAxisTickValues);const e=new Map(Object.entries(((xe=c==null?void 0:c.labels)==null?void 0:xe.xAxis)??{}));for(const[a,l]of e)l||he.push(a)}const ue=S(h.data),nt=["grid","axes","legends"];if(h!=null&&h.data&&st>0){let e=S(h.data);const a=[];e.forEach(t=>{t&&Array.isArray(t.data)&&t.data.forEach(s=>{const r=s&&s.x;r!==void 0&&a.indexOf(r)===-1&&a.push(r)})});let l;if(se==="count"){const t=Math.max(1,parseInt(Ue));if(a.length>0&&t>0)if(a.length<=t)l=a.slice();else{const s=(a.length-1)/(t-1),r=new Array(t);for(let i=0;i<t;i++)r[i]=Math.floor(i*s);r[t-1]=a.length-1,l=r.map(i=>a[i])}}else if(se==="every"){const t=Math.max(1,parseInt(Ge));if(a.length>0){const s=[];for(let r=0;r<a.length;r++)r%t===0&&s.push(a[r]);s[s.length-1]!==a[a.length-1]&&s.push(a[a.length-1]),l=s}}return n.jsxs("div",{style:{height:Me},children:[n.jsx(ct.ResponsiveLine,{curve:Re,data:ue,margin:at,xScale:{type:"point"},yScale:{type:"linear",min:m,max:f,stacked:J=="stacked",reverse:!1,clamp:Be},layers:ue.length===0?nt:M,axisTop:null,axisRight:De?{tickSize:5,tickValues:U,tickPadding:5,tickRotation:0,legend:v.right,legendPosition:"middle",legendOffset:parseInt(we),format:t=>{const s=I||E;return D.formatNumber(s.style==="percent"?t/100:t,{...s})}}:null,enableGridY:We,enableGridX:_e,enablePointLabel:Ee==="top",pointLabel:t=>D.formatNumber(E.style==="percent"?t.data.yFormatted/100:t.data.yFormatted,E),lineWidth:3,colors:t=>X.getColor(t.id,t),axisBottom:($||F)&&(c==null?void 0:c.xAxisDisabled)===!0?null:{...l?{tickValues:l}:{},renderTick:Xe,legend:v.bottom,legendPosition:"middle",legendOffset:Number.parseInt(Le)},axisLeft:{tickSize:5,tickValues:U,tickPadding:5,tickRotation:0,legend:v.left,legendPosition:"middle",legendOffset:Number.parseInt(Oe),format:t=>{const s=I||E;return D.formatNumber(s.style==="percent"?t/100:t,{...s})}},tooltip:t=>je&&k&&k.trim().length>0?n.jsx(it.default,{intl:D,format:E,d:t,tooltip:k,tooltipEnableMarkdown:Ae}):null,pointSize:10,pointBorderWidth:2,pointBorderColor:{from:"serieColor"},useMesh:e.length>0&&e[0].data.length>0},new Date),(u==="top"||u==="bottom")&&n.jsx("div",{className:`legends container has-standard-12-font-size ${u}`,style:u==="top"?{marginTop:ye&&`${le}px`}:u==="bottom"?{marginBottom:`${ie}px`}:{},children:n.jsxs("div",{className:"legend-sections",children:[n.jsx("div",{className:"title-section",children:de()}),n.jsx(dt.default,{onWrapChange:t=>{if(u==="top"){const s=K+t/2*40;Ye(s),ce(t)}else Je(Z+t/2*25),ce(t)},className:"legends container has-standard-12-font-size items-section",children:oe()})]})}),(u==="right"||u==="left")&&n.jsxs("div",{className:`legends container has-standard-12-font-size ${u}`,style:u==="right"?Ze:Pe,children:[de(),oe()]})]})}return n.jsx("div",{})},ft=lt.injectIntl(mt);exports.default=ft;
@@ -366,7 +366,7 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
366
366
  enableGridX: Ae,
367
367
  enablePointLabel: Oe === "top",
368
368
  pointLabel: (t) => I.formatNumber(
369
- N.style === "percent" ? t.yFormatted / 100 : t.yFormatted,
369
+ N.style === "percent" ? t.data.yFormatted / 100 : t.data.yFormatted,
370
370
  N
371
371
  ),
372
372
  lineWidth: 3,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devgateway/dvz-ui-react",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",