UNPKG

quoslibero

Version:

FusionCharts JavaScript charting framework

1 lines 5.12 kB
let UNDEF,attrTypeNum=1,attrTypeBool=2;var attribDefs,blankObj={},mathMax=Math.max;function parseConfiguration(a,b,c,d,e,f){var g,h,i,j,k=1;for(g in attribDefs=attribDefs||blankObj,d=d||blankObj,f=f||blankObj,e=e||{},a)d[g]||(h=a[g],(h||!1===h||0===h)&&(i=(j=f[g]||attribDefs[g])&&j.type,i===attrTypeNum?(h=+h,isNaN(h)||(b[g]=h)):i===attrTypeBool?(h=+h,isNaN(h)||(b[g]=!!h)):b[g]=h));if(c)for(g in b)b[g]===UNDEF&&(j=f[g]||attribDefs[g])&&j.pAttr&&(b[g]=c[j.pAttr]);for(;k;)for(g in k=0,b)b[g]===UNDEF&&(j=f[g]||attribDefs[g])&&(j.attr?(h=b[j.attr])!==UNDEF&&(b[g]=h,k+=1):j.parser&&(h=j.parser(b,c,e))!==UNDEF&&(b[g]=h,k+=1))}function setAttribDefs(a,b){var c,d;for(d in attribDefs=attribDefs||{},'string'==typeof a?(c={},c[a]=b):c=a,c)attribDefs[d]||(attribDefs[d]=c[d])}function hasAttribDefs(a){return!!attribDefs[a]}attribDefs={setBorderWidth:{type:1,pAttr:'plotborderthickness'},plotborderthickness:{type:1,pAttr:'plotborderthickness'},showBorderEffect:{parser:function(){let a=arguments[1];return 1==+a.showplotborder&&a.plotborderthickness===.1?1:0}},alphaanimation:{type:1},showplotborder:{type:1,pAttr:'showplotborder'},zeroplanethickness:{type:1},showzeroplaneontop:{type:1},stickytracking:{type:1},usemessagelog:{type:1},showtooltip:{type:1,pAttr:'showtooltip'},seriesnameintooltip:{type:1},plothovereffect:{type:1,attr:'anchorhovereffect'},anchorhovereffect:{type:1,attr:'showhovereffect'},showhovereffect:{type:1},linethickness:{type:1,pAttr:'linethickness'},dashed:{type:1,pAttr:'linedashed'},linedashed:{type:1,attr:'plotborderdashed'},plotborderdashed:{type:1,pAttr:'plotborderdashed'},linedashlen:{type:1,pAttr:'linedashlen'},linedashgap:{type:1,pAttr:'linedashgap'},anchoralpha:{pAttr:'anchoralpha'},anchorsides:{type:1,pAttr:'anchorsides'},anchorradius:{type:1,pAttr:'anchorradius'},anchorbgalpha:{pAttr:'anchorbgalpha'},anchorbgcolor:{pAttr:'anchorbgcolor'},anchorbordercolor:{pAttr:'anchorbordercolor'},anchorstartangle:{type:1,pAttr:'anchorstartangle'},anchorimageurl:{pAttr:'anchorimageurl'},anchorimagescale:{type:1,pAttr:'anchorimagescale'},anchorimagealpha:{pAttr:'anchorimagealpha'},anchorimagepadding:{type:1,pAttr:'anchorimagepadding'},anchorborderthickness:{type:1,pAttr:'anchorborderthickness'},anchorshadow:{type:1,pAttr:'anchorshadow'},valuepadding:{type:1,pAttr:'valuepadding'},valueposition:{pAttr:'valueposition'},plotfillangle:{type:1,pAttr:'plotfillangle'},useplotgradientcolor:{type:1},rotatevalues:{type:1,pAttr:'rotatevalues'},includeinlegend:{type:1},connectnulldata:{type:1},plotfillalpha:{pAttr:'plotfillalpha'},alpha:{pAttr:'linealpha'},linealpha:{pAttr:'plotfillalpha'},showvalues:{type:1,pAttr:'showvalues'},showpercentvalues:{type:1,parser:function(a){return a.isstacked&&a.stack100percent?1:0}},showpercentintooltip:{type:1,parser:function(a){return a.isstacked&&a.stack100percent?1:0}},stack100percent:{type:1,attr:'usepercentdistribution'},drawfullareaborder:{type:1},use3dlineshift:{type:1},parentyaxis:{type:1},radarborderthickness:{type:1},radarborderradius:{type:1},gaugeoriginx:{type:1},hasgaugeoriginx:{attr:'gaugeoriginx'},gaugeoriginy:{type:1},hasgaugeoriginy:{attr:'gaugeoriginy'},gaugeradius:{type:1},hasgaugeradius:{attr:'gaugeradius'},showgaugeborder:{type:1},setAdaptiveMin:{type:1},adjustDiv:{type:1},axisNameWidth:{type:1},rotateAxisName:{type:1},useEllipsesWhenOverflow:{type:1},showZeroPlane:{type:1},zeroPlaneAlpha:{type:1},showZeroPlaneValue:{type:1},zeroPlaneOnTop:{type:1},trendlineThickness:{type:1},showTrendlinesOnTop:{type:1},trendlinesAreDashed:{type:1},trendlinesDashLen:{type:1},trendlinesDashGap:{type:1},showTrendlines:{type:1},showTrendlineLabels:{type:1},showLabels:{type:1},rotateLabels:{type:1},slantLabel:{type:1},showAxisValues:{type:1},showTooltip:{type:1},maxLabelHeight:{type:1},useroundedges:{type:1,pAttr:'useroundedges'},placevaluesinside:{type:1},plotpaddingpercent:{type:1},use3dlighting:{type:1,pAttr:'use3dlighting'},usedataplotcolorforlabels:{type:1},plotspacepercent:{type:1,parser:function(a){return mathMax(a.plotspacepercent%100,0)}},ratio:{pAttr:'plotfillratio'},base:{type:1},showMinorDivLineValues:{type:1},numMinorDivLines:{type:1},majorTMNumber:{type:1},majorTMHeight:{type:1},showTickMarks:{type:1},majorTMThickness:{type:1},adjustTM:{type:2},minorTMNumber:{type:1},minorTMThickness:{type:1},tickMarkDistance:{type:1},placeTicksInside:{type:1},placeValuesInside:{type:1},axisValuePadding:{type:1},gridLineWidth:{type:1},showRadarBorder:{type:1},radarBorderThickness:{type:1},maxcolwidth:{type:1,parser:function(a){return Math.abs(a.maxcolwidth)}},maxbarheight:{type:1,parser:function(a){return Math.abs(a.maxbarheight)}},plotborderalpha:{parser:function(a,b){return b.plotborderalpha||a.plotfillalpha}},autoscale:{type:1},plotborderdashlen:{type:1,pAttr:'plotborderdashlen'},plotborderdashgap:{type:1,pAttr:'plotborderdashgap'},plotfillratio:{pAttr:'plotfillratio'},drawverticaljoins:{type:1,pAttr:'drawverticaljoins'},useforwardsteps:{type:1,pAttr:'useforwardsteps'},minimizetendency:{type:1},usepercentdistribution:{type:1},stepatmiddle:{type:1}};export{attribDefs,parseConfiguration,setAttribDefs,hasAttribDefs};