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

remove ability to set styles from data #176

Merged
merged 1 commit into from
Apr 19, 2018
Merged

Conversation

boygirl
Copy link
Contributor

@boygirl boygirl commented Apr 19, 2018

This PR deprecates the ability to define style attrs directly on the data object. This will be a breaking change, but the upgrade path is minimal:
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

@boygirl boygirl merged commit 35ff303 into master Apr 19, 2018
@boygirl boygirl deleted the perf/disable-data-styles branch April 19, 2018 21:00
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