Skip to content

Commit

Permalink
options
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Dec 1, 2020
1 parent 15729ac commit b84e5f1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/marks/dot.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export class Dot extends Mark {
}
}

export function dot(data, channels, style) {
return new Dot(data, channels, style);
export function dot(data, options) {
return new Dot(data, options);
}

export function dotX(data, {x = identity, ...options} = {}) {
Expand Down
4 changes: 2 additions & 2 deletions src/marks/facet.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export class FacetY extends Mark {
}
}

export function facetY(data, channels, marks) {
return new FacetY(data, channels, marks);
export function facetY(data, options, marks) {
return new FacetY(data, options, marks);
}

function facetYChannel({scale, ...channel}) {
Expand Down
4 changes: 2 additions & 2 deletions src/marks/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export class Line extends Mark {
}
}

export function line(data, channels, style) {
return new Line(data, channels, style);
export function line(data, options) {
return new Line(data, options);
}

// TODO Error if y is specified?
Expand Down
4 changes: 2 additions & 2 deletions src/marks/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ export class Link extends Mark {
}
}

export function link(data, channels, style) {
return new Link(data, channels, style);
export function link(data, options) {
return new Link(data, options);
}
12 changes: 6 additions & 6 deletions src/marks/rect.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ export class Rect extends Mark {
}
}

export function rectX(data, {x, y1, y2} = {}, style) {
return new Rect(data, {x1: zero, x2: x, y1, y2}, style);
export function rectX(data, {x, y1, y2, ...options} = {}) {
return new Rect(data, {...options, x1: zero, x2: x, y1, y2});
}

export function rectY(data, {x1, x2, y} = {}, style) {
return new Rect(data, {x1, x2, y1: zero, y2: y}, style);
export function rectY(data, {x1, x2, y, ...options} = {}) {
return new Rect(data, {...options, x1, x2, y1: zero, y2: y});
}

export function rect(data, channels, style) {
return new Rect(data, channels, style);
export function rect(data, options) {
return new Rect(data, options);
}
8 changes: 4 additions & 4 deletions src/marks/rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ export class RuleY extends Mark {
}
}

export function ruleX(data, channels, style) {
return new RuleX(data, channels, style);
export function ruleX(data, options) {
return new RuleX(data, options);
}

export function ruleY(data, channels, style) {
return new RuleY(data, channels, style);
export function ruleY(data, options) {
return new RuleY(data, options);
}
4 changes: 2 additions & 2 deletions src/marks/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export class Text extends Mark {
}
}

export function text(data, channels, style) {
return new Text(data, channels, style);
export function text(data, options) {
return new Text(data, options);
}

export function textX(data, {x = identity, ...options} = {}) {
Expand Down

0 comments on commit b84e5f1

Please sign in to comment.