UNPKG

basb-cli

Version:
2 lines (1 loc) 993 B
import{e as t,bQ as e,_ as a,cX as o,bW as i,bY as r,cY as n}from"./index.js";import{a as s}from"./axisDefault.js";var p={value:1,category:1,time:1,log:1};function u(u,f,l,y){t(p,(function(t,p){var g=e(e({},s[p],!0),y,!0),d=function(t){function s(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=f+"Axis."+p,e}return a(s,t),s.prototype.mergeDefaultAndTheme=function(t,a){var n=o(this),s=n?i(t):{},u=a.getTheme();e(t,u.get(p+"Axis")),e(t,this.getDefaultOption()),t.type=c(t),n&&r(t,s,n)},s.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=n.createByAxisModel(this))},s.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},s.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},s.type=f+"Axis."+p,s.defaultOption=g,s}(l);u.registerComponentModel(d)})),u.registerSubTypeDefaulter(f+"Axis",c)}function c(t){return t.type||(t.data?"category":"value")}export{u as a};