| 148930 | return result; |
| 148931 | } |
| 148932 | function axisDomain(spec, config, userEncode, dataRef) { |
| 148933 | const _ = lookup(spec, config), orient = spec.orient; |
| 148934 | let enter, update; |
| 148935 | const encode = { |
| 148936 | enter: enter = { |
| 148937 | opacity: zero |
| 148938 | }, |
| 148939 | update: update = { |
| 148940 | opacity: one |
| 148941 | }, |
| 148942 | exit: { |
| 148943 | opacity: zero |
| 148944 | } |
| 148945 | }; |
| 148946 | addEncoders(encode, { |
| 148947 | stroke: _("domainColor"), |
| 148948 | strokeCap: _("domainCap"), |
| 148949 | strokeDash: _("domainDash"), |
| 148950 | strokeDashOffset: _("domainDashOffset"), |
| 148951 | strokeWidth: _("domainWidth"), |
| 148952 | strokeOpacity: _("domainOpacity") |
| 148953 | }); |
| 148954 | const pos0 = position(spec, 0); |
| 148955 | const pos1 = position(spec, 1); |
| 148956 | enter.x = update.x = ifX(orient, pos0, zero); |
| 148957 | enter.x2 = update.x2 = ifX(orient, pos1); |
| 148958 | enter.y = update.y = ifY(orient, pos0, zero); |
| 148959 | enter.y2 = update.y2 = ifY(orient, pos1); |
| 148960 | return guideMark({ |
| 148961 | type: RuleMark, |
| 148962 | role: AxisDomainRole, |
| 148963 | from: dataRef, |
| 148964 | encode |
| 148965 | }, userEncode); |
| 148966 | } |
| 148967 | function position(spec, pos) { |
| 148968 | return { |
| 148969 | scale: spec.scale, |