Skip to content

Commit

Permalink
feat(website): add link to d3-format documentation for line & scatter…
Browse files Browse the repository at this point in the history
…plot value formatters
  • Loading branch information
plouc committed Mar 21, 2020
1 parent cf0fd6b commit 98a4f43
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions website/src/data/components/line/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ const props = [
If you use a time scale, you must provide a time format
as values are converted to Date objects.
Under the hood, nivo uses [d3-format](https://github.com/d3/d3-format),
please have a look at it for available formats, you can also pass a function
which will receive the raw value and should return the formatted one.
`,
required: false,
type: 'Function | string',
Expand Down Expand Up @@ -138,6 +142,10 @@ const props = [
If you use a time scale, you must provide a time format
as values are converted to Date objects.
Under the hood, nivo uses [d3-format](https://github.com/d3/d3-format),
please have a look at it for available formats, you can also pass a function
which will receive the raw value and should return the formatted one.
`,
required: false,
type: 'Function | string',
Expand Down
20 changes: 20 additions & 0 deletions website/src/data/components/scatterplot/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ const props = [
group: 'Base',
type: 'string | Function',
help: 'Optional formatter for x values.',
description: `
The formatted value can then be used for labels & tooltips.
If you use a time scale, you must provide a time format
as values are converted to Date objects.
Under the hood, nivo uses [d3-format](https://github.com/d3/d3-format),
please have a look at it for available formats, you can also pass a function
which will receive the raw value and should return the formatted one.
`,
},
{
key: 'yScale',
Expand Down Expand Up @@ -149,6 +159,16 @@ const props = [
group: 'Base',
type: 'string | Function',
help: 'Optional formatter for y values.',
description: `
The formatted value can then be used for labels & tooltips.
If you use a time scale, you must provide a time format
as values are converted to Date objects.
Under the hood, nivo uses [d3-format](https://github.com/d3/d3-format),
please have a look at it for available formats, you can also pass a function
which will receive the raw value and should return the formatted one.
`,
},
{
key: 'nodeSize',
Expand Down

0 comments on commit 98a4f43

Please sign in to comment.