victory-legend 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.
- package/CHANGELOG.md +8 -0
- package/dist/victory-legend.js +209 -82
- package/dist/victory-legend.min.js +1 -1
- package/es/helper-methods.js +3 -2
- package/lib/helper-methods.js +3 -2
- package/package.json +2 -2
- package/src/helper-methods.ts +2 -2
package/lib/helper-methods.js
CHANGED
|
@@ -11,9 +11,10 @@ var _victoryCore = require("victory-core");
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
const getColorScale = props => {
|
|
13
13
|
const {
|
|
14
|
-
colorScale
|
|
14
|
+
colorScale,
|
|
15
|
+
theme
|
|
15
16
|
} = props;
|
|
16
|
-
return typeof colorScale === "string" ? _victoryCore.Style.getColorScale(colorScale) : colorScale || [];
|
|
17
|
+
return typeof colorScale === "string" ? _victoryCore.Style.getColorScale(colorScale, theme) : colorScale || [];
|
|
17
18
|
};
|
|
18
19
|
const getLabelStyles = props => {
|
|
19
20
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-legend",
|
|
3
|
-
"version": "37.
|
|
3
|
+
"version": "37.3.0",
|
|
4
4
|
"description": "Legend Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
|
-
"victory-core": "37.
|
|
24
|
+
"victory-core": "37.3.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": ">=16.6.0"
|
package/src/helper-methods.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { Helpers, Style, TextSize } from "victory-core";
|
|
|
3
3
|
import { VictoryLegendProps } from "./victory-legend";
|
|
4
4
|
|
|
5
5
|
const getColorScale = (props) => {
|
|
6
|
-
const { colorScale } = props;
|
|
6
|
+
const { colorScale, theme } = props;
|
|
7
7
|
return typeof colorScale === "string"
|
|
8
|
-
? Style.getColorScale(colorScale)
|
|
8
|
+
? Style.getColorScale(colorScale, theme)
|
|
9
9
|
: colorScale || [];
|
|
10
10
|
};
|
|
11
11
|
|