Skip to content

Commit

Permalink
feat(nivo): upgrade nivo
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte committed Sep 11, 2017
1 parent bc906b5 commit c45dc53
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -33,7 +33,7 @@
"express-winston": "^2.4.0",
"joi": "^10.6.0",
"lodash": "^4.17.4",
"nivo": "0.22.1",
"nivo": "0.28.1",
"nivo-generators": "^0.8.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
Expand Down
19 changes: 15 additions & 4 deletions src/mapping/bar.js
Expand Up @@ -23,17 +23,28 @@ module.exports = {

groupMode: Joi.any().valid(['grouped', 'stacked']),
layout: Joi.any().valid(['horizontal', 'vertical']),
reverse: Joi.boolean(),

xPadding: Joi.number(),
minValue: Joi.alternatives().try(Joi.any().valid('auto'), Joi.number()).required(),
maxValue: Joi.alternatives().try(Joi.any().valid('auto'), Joi.number()).required(),
padding: Joi.number(),
innerPadding: Joi.number(),

borderRadius: Joi.number().min(0),
borderWidth: Joi.number().min(0),
borderColor: Joi.string(),

// grid
enableGridX: Joi.boolean(),
enableGridY: Joi.boolean(),

// labels
enableLabels: Joi.boolean(),
labelsTextColor: Joi.string(),
labelsLinkColor: Joi.string(),
enableLabel: Joi.boolean(),
label: Joi.string(),
labelSkipWidth: Joi.number(),
labelSkipHeight: Joi.number(),
labelLinkColor: Joi.string(),
labelTextColor: Joi.string(),

// theming
colors: Joi.string(),
Expand Down
15 changes: 14 additions & 1 deletion src/mapping/chord.js
Expand Up @@ -16,14 +16,27 @@ module.exports = {
component: Chord,
schema: Joi.object().keys(
Object.assign({}, common.dimensions, {
data: Joi.array().required(),
matrix: Joi.array().required(),
keys: Joi.array().required(),

padAngle: Joi.number(),
innerRadiusRatio: Joi.number().min(0).max(1),
innerRadiusOffset: Joi.number().min(0).max(1),

ribbonOpacity: Joi.number().min(0).max(1),
ribbonBorderWidth: Joi.number().min(0),
ribbonBorderColor: Joi.string(),

arcOpacity: Joi.number().min(0).max(1),
arcBorderWidth: Joi.number().min(0),
arcBorderColor: Joi.string(),

// labels
enableLabel: Joi.boolean(),
label: Joi.string(),
labelOffset: Joi.number(),
labelRotation: Joi.number(),
labelTextColor: Joi.string(),

// theming
colors: Joi.string(),
Expand Down
2 changes: 2 additions & 0 deletions src/mapping/line.js
Expand Up @@ -53,6 +53,8 @@ module.exports = {
enableGridX: Joi.boolean(),
enableGridY: Joi.boolean(),

lineWidth: Joi.number().min(0),

// dots
enableDots: Joi.boolean(),
dotSize: Joi.number().min(0),
Expand Down
1 change: 1 addition & 0 deletions src/mapping/treemap.js
Expand Up @@ -30,6 +30,7 @@ module.exports = {
innerPadding: Joi.number(),
outerPadding: Joi.number(),
colors: Joi.string(),
colorBy: Joi.string(),
borderWidth: Joi.number(),
borderColor: Joi.string(),
})
Expand Down
19 changes: 7 additions & 12 deletions yarn.lock
Expand Up @@ -1242,10 +1242,6 @@ listr@^0.12.0:
stream-to-observable "^0.1.0"
strip-ansi "^3.0.1"

lodash-es@^4.17.4:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7"

lodash._baseassign@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
Expand Down Expand Up @@ -1466,9 +1462,9 @@ nivo-generators@^0.8.0:
lodash.range "^3.2.0"
lodash.shuffle "^4.2.0"

nivo@0.22.1:
version "0.22.1"
resolved "https://registry.yarnpkg.com/nivo/-/nivo-0.22.1.tgz#93f7cd9de9a9aa54e1d9eb44dae9e3ae7581c8df"
nivo@0.28.1:
version "0.28.1"
resolved "https://registry.yarnpkg.com/nivo/-/nivo-0.28.1.tgz#3bc7256788d412b8d88154b45afa3b48ed32ea2e"
dependencies:
d3-chord "^1.0.4"
d3-color "^1.0.3"
Expand All @@ -1483,10 +1479,9 @@ nivo@0.22.1:
d3-time-format "^2.0.5"
d3-voronoi "^1.1.2"
lodash "^4.17.4"
lodash-es "^4.17.4"
prop-types "^15.5.10"
react-measure "^2.0.2"
react-motion "^0.5.0"
react-motion "^0.5.1"
recompose "^0.25.0"

node-fetch@^1.0.1:
Expand Down Expand Up @@ -1823,9 +1818,9 @@ react-measure@^2.0.2:
prop-types "^15.5.10"
resize-observer-polyfill "^1.4.2"

react-motion@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/react-motion/-/react-motion-0.5.0.tgz#1708fc2aee552900d21c1e6bed28346863e017b6"
react-motion@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/react-motion/-/react-motion-0.5.1.tgz#b90631408175ab1668e173caccd66d41a44f4592"
dependencies:
performance-now "^0.2.0"
prop-types "^15.5.8"
Expand Down

0 comments on commit c45dc53

Please sign in to comment.