Skip to content

Commit

Permalink
feat(pie): document the interface of props passed to custom layers
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Nov 4, 2020
1 parent b5ed2d4 commit 055e477
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion website/src/data/components/pie/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ const props = [
You can also use this to insert extra layers
to the chart, the extra layer must be a function.
The layer function which will receive the chart's
The layer component which will receive the chart's
context & computed data and must return a valid SVG element
for the \`Pie\` component.
Expand All @@ -465,6 +465,19 @@ const props = [
\`context.restore()\` if you make some global
modifications to the 2d context inside this function
to avoid side effects.
The context passed to layers has the following structure:
\`\`\`
{
dataWithArc: DatumWithArc[],
arcGenerator: Function
centerX: number
centerY: number
radius: number
innerRadius: number
}
\`\`\`
`,
required: false,
type: 'Array<string | Function>',
Expand Down

0 comments on commit 055e477

Please sign in to comment.