UNPKG

quoslibero

Version:

FusionCharts JavaScript charting framework

1 lines 1.02 kB
import{pluckNumber,COMMASTRING}from'../../../../fc-core/src/lib';import{priorityList}from'../../../../fc-core/src/schedular';let UNDEFINED;function _getData(a,b){var c,d,e=this,f=e.getChildren(),g=f.dataset,h=function(){return d=g[0].components.data,d&&d[--a]?(c=d[a].config,pluckNumber(c.setValue,c.itemValue)):null};if(g)if('function'==typeof b)e.addJob('eiMethods',function(){b(h())},priorityList.postRender);else return h()}function _setData(a,b){var c,d='value=';if(a!==UNDEFINED&&b!==UNDEFINED){for(c=1;c<+a;c++)d+=COMMASTRING;b.toString&&(d+=b.toString()),d&&this.feedData(d)}}function _getDataForId(a,b){var c=this,d=c.getChildren('dataset')[0],e=d.config.idMap;return'function'==typeof b?void c.addJob('eiMethods',function(){b(e&&e[a]&&e[a].config.itemValue||null)},priorityList.postRender):e&&e[a]&&e[a].config.itemValue||null}function _setDataForId(a,b){var c=this,d=c.getChildren('dataset')[0],e=d.config.idMap;return e&&e[a]&&c._setData(e[a].index+1,b)}export{_getData,_setData,_getDataForId,_setDataForId};