Skip to content

Commit

Permalink
feat(api): add mark.coordinate
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmini committed Feb 12, 2023
1 parent 55d50da commit 453776c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion __tests__/unit/api/mark.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ function setOptions(node) {
.legend('y', { title: 'hello' })
.slider('x', {})
.scrollbar('x', {})
.label({ text: 'hello' });
.label({ text: 'hello' })
.coordinate({ type: 'polar' })
.interaction({ type: 'tooltip' });
}

function setCompositeOptions(node) {
Expand Down Expand Up @@ -97,6 +99,8 @@ function getOptions() {
marginTop: 30,
marginRight: 40,
labels: [{ text: 'hello' }],
coordinate: { type: 'polar' },
interaction: { type: 'tooltip' },
};
}

Expand Down
2 changes: 2 additions & 0 deletions src/api/mark/mark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ export const props: NodePropertyDescriptor[] = [
{ name: 'transform', type: 'array' },
{ name: 'style', type: 'object' },
{ name: 'animate', type: 'object' },
{ name: 'coordinate', type: 'object' },
{ name: 'interaction', type: 'object' },
{ name: 'label', type: 'array', key: 'labels' },
{ name: 'axis', type: 'object' },
{ name: 'legend', type: 'object' },
Expand Down
2 changes: 2 additions & 0 deletions src/api/mark/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export type API<Props extends Geometry, Mark> = {
label: ArrayAttribute<Props['labels'], Mark>;
style: ObjectAttribute<Props['style'], Mark>;
axis: ObjectAttribute<Props['axis'], Mark>;
coordinate: ValueAttribute<Props['coordinate'], Mark>;
interaction: ObjectAttribute<Props['interaction'], Mark>;
slider: ObjectAttribute<Props['slider'], Mark>;
scrollbar: ObjectAttribute<Props['scrollbar'], Mark>;
legend: ObjectAttribute<Props['legend'], Mark>;
Expand Down

0 comments on commit 453776c

Please sign in to comment.