Skip to content

Commit

Permalink
add domain to Cartesian chart docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zibs committed Jan 18, 2024
1 parent 9df9dc6 commit 00c9d5b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/docs/cartesian/cartesian-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ A `number` or an object of shape `{ left?: number; right?: number; top?: number;

For example, passing `padding={{ left: 20, bottom: 20 }}` will add 20 Density Independent Pixels (DIPs) of space to the bottom and left of the chart, but have the chart "bleed" to the right and top. Passing `padding={20}` will add 20 DIPs of space to all sides.

### `domain`

An object of shape `{ x?: [number] | [number, number]; y?: [number] | [number, number] }` that can be specified to control the upper and lower bounds of each axis. It defaults to the min and max of each range respectively.

For example, passing `domain={{y: [-10, 100]}}` will result in a y-axis with a lower bound of `-10` and an upper bound of `100`. For `domain={{x: [1, 4]}}`, will result in an x-axis contained within those bounds.

### `domainPadding`

A `number` or an object of shape `{ left?: number; right?: number; top?: number; bottom?: number; }` that specifies that padding between the outer bounds of the _charting area_ (e.g. where the axes lie) and where chart elements will be plotted.
Expand Down

0 comments on commit 00c9d5b

Please sign in to comment.