iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://ecdb.com/_nuxt/GHFfDvA1.js
import{j as c,aK as o}from"./llFuKhWI.js";const y={id:"",count:4,startYear:2020,factor:1,style:"currency",currency:"USD",descriptions:[],randomizeDescriptions:!1};function i(n,u={}){return{...y,...u,...n}}function m(n){return{style:n.style,...n.style==="currency"?{currency:n.currency}:{}}}const S=()=>{const n=r=>{const e=i(r,{id:`createDummySeries-${JSON.stringify(r)}`}),a=m(e),t=[...Array(e.count).keys()].map(s=>({date:`${e.startYear+s}-01-01`,description:e.descriptions[s]??e.descriptions[0],data:{value:Math.random(),options:a}}));return c(e.id,()=>o(t)).value};return{createDummySeries:n,createDummyStackedColumnSeries:r=>{const e=i(r,{id:`createDummyStackedColumnSeries-${JSON.stringify(r)}`,count:8});return e.descriptions.flatMap(t=>n(e).map(s=>({...s,description:e.randomizeDescriptions?e.descriptions[Math.floor(Math.random()*e.descriptions.length)]:t})))},createDummyBubbleSeries:r=>{const e=i(r,{id:`createDummyBubbleSeries-${JSON.stringify(r)}`,count:8}),a=[...Array(e.count).keys()].map(t=>({category:`Category ${t%(e.count/2)}`,description:"Description",size:Math.random()*1e9,x:Math.random(),y:Math.random()}));return c(e.id,()=>o({items:a,sizeDescription:"Revenue",sizeNumberFormat:{currency:"USD",style:"currency"},source:"ECDB analysis",xAvg:a.reduce((t,s)=>t+s.x,0)/e.count,xAvgDescription:"Global average",xDescription:"Online Share",xNumberFormat:{style:"percent"},yAvg:a.reduce((t,s)=>t+s.y,0)/e.count,yAvgDescription:"Global average",yDescription:"Revenue Growth",yNumberFormat:{style:"percent"}})).value},createDummyWaterfallSeries:r=>{const e=i(r,{id:`createDummyWaterfallSeries-${JSON.stringify(r)}`,count:3}),a=m(e),t=[...Array(e.count).keys()].map(s=>({description:`Description ${s}`,data:{value:Math.random()*(Math.random()<.5?-1:1),options:a}}));return c(e.id,()=>o(t)).value}}};export{S as u};