victory-pie 37.1.2 → 37.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,11 +41,12 @@ const getSlices = (props, data) => {
41
41
  };
42
42
  const getCalculatedValues = props => {
43
43
  const {
44
- colorScale
44
+ colorScale,
45
+ theme
45
46
  } = props;
46
47
  const styleObject = Helpers.getDefaultStyles(props, "pie");
47
48
  const style = Helpers.getStyles(props.style, styleObject);
48
- const colors = Array.isArray(colorScale) ? colorScale : Style.getColorScale(colorScale);
49
+ const colors = Array.isArray(colorScale) ? colorScale : Style.getColorScale(colorScale, theme);
49
50
  const padding = Helpers.getPadding(props);
50
51
  const defaultRadius = getRadius(props, padding);
51
52
  const origin = getOrigin(props, padding);
@@ -51,11 +51,12 @@ const getSlices = (props, data) => {
51
51
  };
52
52
  const getCalculatedValues = props => {
53
53
  const {
54
- colorScale
54
+ colorScale,
55
+ theme
55
56
  } = props;
56
57
  const styleObject = _victoryCore.Helpers.getDefaultStyles(props, "pie");
57
58
  const style = _victoryCore.Helpers.getStyles(props.style, styleObject);
58
- const colors = Array.isArray(colorScale) ? colorScale : _victoryCore.Style.getColorScale(colorScale);
59
+ const colors = Array.isArray(colorScale) ? colorScale : _victoryCore.Style.getColorScale(colorScale, theme);
59
60
  const padding = _victoryCore.Helpers.getPadding(props);
60
61
  const defaultRadius = getRadius(props, padding);
61
62
  const origin = getOrigin(props, padding);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-pie",
3
- "version": "37.1.2",
3
+ "version": "37.3.0",
4
4
  "description": "Pie Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -21,8 +21,8 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "lodash": "^4.17.19",
24
- "victory-core": "37.1.2",
25
- "victory-vendor": "37.1.2"
24
+ "victory-core": "37.3.0",
25
+ "victory-vendor": "37.3.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=16.6.0"
@@ -60,12 +60,12 @@ const getSlices = (props, data) => {
60
60
  };
61
61
 
62
62
  const getCalculatedValues = (props) => {
63
- const { colorScale } = props;
63
+ const { colorScale, theme } = props;
64
64
  const styleObject = Helpers.getDefaultStyles(props, "pie");
65
65
  const style = Helpers.getStyles(props.style, styleObject);
66
66
  const colors = Array.isArray(colorScale)
67
67
  ? colorScale
68
- : Style.getColorScale(colorScale);
68
+ : Style.getColorScale(colorScale, theme);
69
69
  const padding = Helpers.getPadding(props);
70
70
  const defaultRadius = getRadius(props, padding);
71
71
  const origin = getOrigin(props, padding);