Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

remove style whitelist filter #364

Merged
merged 1 commit into from
Apr 19, 2018
Merged

remove style whitelist filter #364

merged 1 commit into from
Apr 19, 2018

Conversation

boygirl
Copy link
Contributor

@boygirl boygirl commented Apr 19, 2018

This PR removes the problematic sanitizeStyles and replaces it with nothing. Instead we will be deprecating Victory's ability to automatically pick up style attributes from the data object. This will be a breaking change, but the upgrade path is pretty simple.

If your data object looks like

data={[
  { x: 1, y: 1, fill: "red", opacity: 0.2 }, 
  ...
]}

Add the following functional styles:

style={{ data:  { fill: (d) => d.fill, opacity: (d) => d.opacity } }}

and everything will work as before

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.

1 participant