Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

WIP - Add documentation for Background component #676

Merged
merged 16 commits into from
May 15, 2020
Merged

Conversation

maddles
Copy link
Contributor

@maddles maddles commented May 11, 2020

This PR:

  • Updates the Victory version in package.json to 34.3.0
  • Adds documentation for the new backgroundComponent prop for VictoryChart
  • Updates the documentation for the style prop to include background for VictoryChart
  • Adds documentation for the new Background primitive component
  • Adds to the Introduction a new section called New Features with documentation about the new features for VictoryChart

- `scale` *object* the x and y scale of the parent chart with `domain` and `range` applied
- `shapeRendering` *string* the shape rendering attribute to apply to the rendered path
- `style` *object* the styles to apply to the rendered element
- `width` *number* the width of parent chart (used to calculate default bar width `style.width` is not supplied)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This width prop is not correct

- `shapeRendering` *string* the shape rendering attribute to apply to the rendered path
- `style` *object* the styles to apply to the rendered element
- `width` *number* the width of parent chart (used to calculate default bar width `style.width` is not supplied)
- `x` *number* the x coordinate of the top of the background
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

top left for non polar charts, center for polar charts


## Backgrounds for VictoryChart

VictoryChart now includes an optional [`backgroundComponent`](/docs/victory-chart#backgroundcomponent) prop. It will also render the new [`Background`](/docs/victory-primitives#backgroundcomponent) simple component as the default backgroundComponent when the "background" property is included in the VictoryChart style prop.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to see the copy on this page be a little more conversational. I can help out here if you'd like.

@boygirl boygirl marked this pull request as ready for review May 15, 2020 22:17
@boygirl boygirl merged commit 43646df into master May 15, 2020
@boygirl boygirl deleted the task/background-docs branch May 15, 2020 22:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants