Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse deprecation of pie chart props #3197

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions documentation/md/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,18 @@ The following is an example of valid background image styling using JSON. The ex
```


## Pie chart background

These properties allow you to create pie chart backgrounds on nodes ([demo](demos/pie-style)). Note that 16 slices maximum are supported per node, so in the properties `1 <= i <= 16`. Of course, you must specify a numerical value for each property in place of `i`. Each nonzero sized slice is placed in order of `i`, starting from the 12 o'clock position and working clockwise.

You may find it useful to reserve a number to a particular colour for all nodes in your stylesheet. Then you can specify values for `pie-i-background-size` accordingly for each node via a [mapper](#style/mappers). This would allow you to create consistently coloured pie charts in each node of the graph based on element data.

* **`pie-size`** : The diameter of the pie, measured as a percent of node size (e.g. `100%`) or an absolute length (e.g. `25px`).
* **`pie-i-background-color`** : The colour of the node's ith pie chart slice.
* **`pie-i-background-size`** : The size of the node's ith pie chart slice, measured in percent (e.g. `25%` or `25`).
* **`pie-i-background-opacity`** : The opacity of the node's ith pie chart slice.




## Edge line
Expand Down
4 changes: 0 additions & 4 deletions src/style/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,6 @@ styfn.applyParsedProperty = function( ele, parsedProp ){
self.checkTriggers( ele, prop.name, fromVal, toVal );
};

if( prop && prop.name.substr(0, 3) === 'pie' ){
util.warn('The pie style properties are deprecated. Create charts using background images instead.');
}

// edge sanity checks to prevent the client from making serious mistakes
if(
parsedProp.name === 'curve-style'
Expand Down
Loading