diff --git a/documentation/docmaker.json b/documentation/docmaker.json index 91b4373c82..8dd108d18c 100644 --- a/documentation/docmaker.json +++ b/documentation/docmaker.json @@ -66,8 +66,7 @@ { "name": "Edge arrow types", "id": "edge-arrows" }, { "name": "Labels", "id": "labels" }, { "name": "Compound nodes", "id": "compound-nodes" }, - { "name": "Linkout example", "id": "linkout-example" }, - { "name": "Pie style", "id": "pie-style" } + { "name": "Linkout example", "id": "linkout-example" } ], "disabledDemos": [ { "name": "Multiple instances", "id": "multiple-instances" }, diff --git a/documentation/md/style.md b/documentation/md/style.md index 82fb317f81..d7dd36e37b 100644 --- a/documentation/md/style.md +++ b/documentation/md/style.md @@ -327,18 +327,6 @@ 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 diff --git a/src/style/apply.js b/src/style/apply.js index 3a8b6f752c..11279d323c 100644 --- a/src/style/apply.js +++ b/src/style/apply.js @@ -433,6 +433,10 @@ 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'