@@ -2,7 +2,7 @@ import {area as shapeArea} from "d3";
22import { create } from "../context.js" ;
33import { maybeCurve } from "../curve.js" ;
44import { Mark } from "../mark.js" ;
5- import { first , identity , indexOf , maybeZ , second } from "../options.js" ;
5+ import { first , indexOf , maybeZ , second } from "../options.js" ;
66import {
77 applyDirectStyles ,
88 applyIndirectStyles ,
@@ -77,15 +77,11 @@ export function area(data, options) {
7777}
7878
7979export function areaX ( data , options ) {
80- const { y = indexOf , ...rest } = maybeDenseIntervalY (
81- options ?. interval != null ? { ...options , x : options . x ?? identity } : options
82- ) ;
80+ const { y = indexOf , ...rest } = maybeDenseIntervalY ( options ) ;
8381 return new Area ( data , maybeStackX ( maybeIdentityX ( { ...rest , y1 : y , y2 : undefined } , y === indexOf ? "x2" : "x" ) ) ) ;
8482}
8583
8684export function areaY ( data , options ) {
87- const { x = indexOf , ...rest } = maybeDenseIntervalX (
88- options ?. interval != null ? { ...options , y : options . y ?? identity } : options
89- ) ;
85+ const { x = indexOf , ...rest } = maybeDenseIntervalX ( options ) ;
9086 return new Area ( data , maybeStackY ( maybeIdentityY ( { ...rest , x1 : x , x2 : undefined } , x === indexOf ? "y2" : "y" ) ) ) ;
9187}
0 commit comments