diff --git a/package-lock.json b/package-lock.json
index 28c5a195..02881c65 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -29,7 +29,7 @@
"react-router-redux": "~4.0.7",
"react-router-scroll": "~0.4.1",
"react-runner": "^1.0.3",
- "recharts": "^2.10.4",
+ "recharts": "^2.11.0",
"redux": "4.0.0",
"redux-thunk": "^2.3.0",
"rimraf": "^2.5.4",
@@ -9307,9 +9307,9 @@
}
},
"node_modules/recharts": {
- "version": "2.10.4",
- "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.10.4.tgz",
- "integrity": "sha512-/Q7/wdf8bW91lN3NEeCjL9RWfaiXQViJFgdnas4Eix/I8B9HAI3tHHK/CW/zDfgRMh4fzW1zlfjoz1IAapLO1Q==",
+ "version": "2.11.0",
+ "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.11.0.tgz",
+ "integrity": "sha512-5s+u1m5Hwxb2nh0LABkE3TS/lFqFHyWl7FnPbQhHobbQQia4ih1t3o3+ikPYr31Ns+kYe4FASIthKeKi/YYvMg==",
"dependencies": {
"clsx": "^2.0.0",
"eventemitter3": "^4.0.1",
@@ -18921,9 +18921,9 @@
}
},
"recharts": {
- "version": "2.10.4",
- "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.10.4.tgz",
- "integrity": "sha512-/Q7/wdf8bW91lN3NEeCjL9RWfaiXQViJFgdnas4Eix/I8B9HAI3tHHK/CW/zDfgRMh4fzW1zlfjoz1IAapLO1Q==",
+ "version": "2.11.0",
+ "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.11.0.tgz",
+ "integrity": "sha512-5s+u1m5Hwxb2nh0LABkE3TS/lFqFHyWl7FnPbQhHobbQQia4ih1t3o3+ikPYr31Ns+kYe4FASIthKeKi/YYvMg==",
"requires": {
"clsx": "^2.0.0",
"eventemitter3": "^4.0.1",
diff --git a/package.json b/package.json
index de737be6..acda81c7 100644
--- a/package.json
+++ b/package.json
@@ -85,7 +85,7 @@
"react-router-redux": "~4.0.7",
"react-router-scroll": "~0.4.1",
"react-runner": "^1.0.3",
- "recharts": "^2.10.4",
+ "recharts": "^2.11.0",
"redux": "4.0.0",
"redux-thunk": "^2.3.0",
"rimraf": "^2.5.4",
diff --git a/src/docs/api/Bar.js b/src/docs/api/Bar.js
index 7d6d79d7..5dc35d61 100644
--- a/src/docs/api/Bar.js
+++ b/src/docs/api/Bar.js
@@ -103,13 +103,13 @@ export default {
},
{
name: 'minPointSize',
- type: 'Number',
+ type: 'Number | Function',
defaultVal: 0,
isOptional: false,
desc: {
'en-US': `The minimal height of a bar in a horizontal BarChart, or the minimal width of a bar in a vertical BarChart.
By default, 0 values are not shown. To visualize a 0 (or close to zero) point, set the minimal point size to a pixel
- value like 3. In stacked bar charts, minPointSize might not be respected for tightly packed values. So we strongly recommend not using this props in stacked BarChart.`,
+ value like 3. In stacked bar charts, minPointSize might not be respected for tightly packed values. So we strongly recommend not using this props in stacked BarChart. You may provide a function to conditionally change this prop based on Bar value.`,
'zh-CN':
'当柱图的 layout 是 "horizontal" 时,表示柱子的最小高度。当柱图的 layout 是 "vertical" 时,表示柱子的最小高度。默认情况下,如果数值为 0,那么相应的柱条的高度(宽度)也会为0,为了让这种高度(宽度)为0或者高度(宽度)非常小的柱条能够展示更加明显,我们会设置一个最小高度(宽度),比如说 3。在堆积柱图中,不推荐设置这个值。',
},
@@ -165,13 +165,14 @@ export default {
desc: {
'en-US':
'The active bar is shown when a user enters a bar chart and this chart has tooltip. If set to false, no active bar will be drawn. If set to true, active bar will be drawn with the props calculated internally. If passed an object, active bar will be drawn, and the internally calculated props will be merged with the key value pairs of the passed object. If passed a ReactElement, the option can be the custom active bar element. If passed a function, the function will be called to render a customized active bar.',
- 'zh-CN': '当用户输入柱形图且该图表有工具提示时,将显示活动柱形图。如果设置为 false,则不会绘制活动条形图。如果设置为 true,将使用内部计算的道具绘制活动条形图。如果传递的是一个对象,则将绘制活动条形图,并将内部计算的道具与传递对象的键值对合并。如果传递的是 ReactElement,该选项可以是自定义的活动条元素。如果传递的是函数,则将调用该函数来渲染自定义的活动条。'
+ 'zh-CN':
+ '当用户输入柱形图且该图表有工具提示时,将显示活动柱形图。如果设置为 false,则不会绘制活动条形图。如果设置为 true,将使用内部计算的道具绘制活动条形图。如果传递的是一个对象,则将绘制活动条形图,并将内部计算的道具与传递对象的键值对合并。如果传递的是 ReactElement,该选项可以是自定义的活动条元素。如果传递的是函数,则将调用该函数来渲染自定义的活动条。',
},
format: [
'',
'',
'} />',
- ''
+ '',
],
examples: [
{
diff --git a/webpack.config.dev.js b/webpack.config.dev.js
index 701bbe2e..5f16e472 100644
--- a/webpack.config.dev.js
+++ b/webpack.config.dev.js
@@ -82,6 +82,9 @@ module.exports = {
},
plugins: [
new webpack.DefinePlugin({
+ 'process.env': {
+ RECHARTS_LATEST_VERSION: JSON.stringify(process.env.RECHARTS_LATEST_VERSION),
+ },
__DEV__: true,
__DEVTOOLS__: true,
}),