Skip to content

Commit

Permalink
fix: remove data prop from Bar docs to prevent confusion, fix some ty…
Browse files Browse the repository at this point in the history
…pos (#304)

Co-authored-by: Coltin Kifer <[email protected]>
  • Loading branch information
ckifer and Coltin Kifer authored Nov 25, 2024
1 parent c019132 commit e8477f3
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 85 deletions.
8 changes: 4 additions & 4 deletions src/docs/api/Area.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally. If object set, dots will be drawn which have the props mergered by the internal calculated props and the option. If ReactElement set, the option can be the custom dot element. If set a function, the function will be called to render customized dot.',
'If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally. If object set, dots will be drawn which have the props merged by the internal calculated props and the option. If ReactElement set, the option can be the custom dot element. If set a function, the function will be called to render customized dot.',
'zh-CN':
'曲线上的点,接收多种配置。当值为 false ,不渲染点。当值为 true ,点会继承 Area 的属性配置,例如配置了 Area 的 stroke 为 "red", 点会继承这个属性。当值为一个对象的时候,会把这个对象解析为点的属性,来覆盖默认属性。当值是一个 React Element ,会克隆这个 React Element 来渲染“点”。当值是函数时,会调用这个函数去渲染自定义的“点”。',
},
Expand Down Expand Up @@ -107,7 +107,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. If object set, labels will be drawn which have the props mergered by the internal calculated props and the option. If ReactElement set, the option can be the custom label element. If set a function, the function will be called to render customized label.',
'If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. If object set, labels will be drawn which have the props merged by the internal calculated props and the option. If ReactElement set, the option can be the custom label element. If set a function, the function will be called to render customized label.',
'zh-CN':
'图形上的文本标签。当值为 false ,不展示文本标签。当值为 true,会根据 Area 的属性配置来展示文本标签。当值为对象的时候,会把这个对象解析为文本标签的属性,来覆盖默认属性。当值是一个 React Element ,会克隆这个 React Element 来渲染“文本标签”。当值是一个 函数 时,会调用这个函数去渲染自定义的“文本标签”。',
},
Expand Down Expand Up @@ -371,8 +371,8 @@ export default {
type: 'Function',
isOptional: true,
desc: {
'en-US': 'The customized event handler of moustenter on the area in this group',
'zh-CN': '区域图 moustenter 事件的回调函数。',
'en-US': 'The customized event handler of mouseenter on the area in this group',
'zh-CN': '区域图 mouseenter 事件的回调函数。',
},
},
{
Expand Down
18 changes: 4 additions & 14 deletions src/docs/api/Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. If object set, labels will be drawn which have the props mergered by the internal calculated props and the option. If ReactElement set, the option can be the custom label element. If set a function, the function will be called to render customized label.',
'If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. If object set, labels will be drawn which have the props merged by the internal calculated props and the option. If ReactElement set, the option can be the custom label element. If set a function, the function will be called to render customized label.',
'zh-CN':
'图形上的文本标签。当值为 false ,不展示文本标签。当值为 true,会根据 Bar 的属性配置来展示文本标签。当值为一个对象的时候,会把这个对象解析为 文本标签 的属性,来覆盖默认属性。当值是一个 React Element ,会克隆这个 React Element 来渲染“文本标签”。当值是一个 函数 时,会调用这个函数去渲染自定义的“文本标签”。',
},
Expand All @@ -69,24 +69,14 @@ export default {
'<Bar dataKey="value" label={<CustomizedLabel />} />',
],
},
{
name: 'data',
type: 'Array',
defaultVal: 'undefined',
isOptional: false,
desc: {
'en-US': 'The position information of all the rectangles, usually calculated internally.',
'zh-CN': '描述所有柱条的坐标、尺寸数据。',
},
},
{
name: 'barSize',
type: 'Number | Percentage',
defaultVal: 'undefined',
isOptional: true,
desc: {
'en-US':
'The width or height of each bar. If the barSize is not specified, the size of bar will be caculated by the barCategoryGap, barGap and the quantity of bar groups.',
'The width or height of each bar. If the barSize is not specified, the size of bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.',
'zh-CN':
'柱条的宽度。如果指定这个值,会根据 barCategoryGap 和 barGap 来计算柱条的宽度,每组柱条的宽度是一样的。',
},
Expand Down Expand Up @@ -127,7 +117,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, background of bars will not be drawn. If true set, background of bars will be drawn which have the props calculated internally. If object set, background of bars will be drawn which have the props mergered by the internal calculated props and the option. If ReactElement set, the option can be the custom background element. If set a function, the function will be called to render customized background.',
'If false set, background of bars will not be drawn. If true set, background of bars will be drawn which have the props calculated internally. If object set, background of bars will be drawn which have the props merged by the internal calculated props and the option. If ReactElement set, the option can be the custom background element. If set a function, the function will be called to render customized background.',
'zh-CN':
'是否显示背景柱条。当值为 false ,不展示背景柱条。当值为 true,会根据 RadialBar 的属性配置来展示背景柱条。当值为一个对象的时候,会把这个对象解析为 背景柱条 的属性,来覆盖默认属性。当值是一个 React Element ,会克隆这个 React Element 来渲染“背景柱条”。当值是一个 函数 时,会调用这个函数去渲染自定义的“背景柱条”。',
},
Expand Down Expand Up @@ -367,7 +357,7 @@ export default {
isOptional: true,
desc: {
'en-US': 'The customized event handler of mouseenter on the bars in this group',
'zh-CN': '柱条 moustenter 事件的回调函数。',
'zh-CN': '柱条 mouseenter 事件的回调函数。',
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/docs/api/Curve.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ export default {
type: 'Function',
isOptional: true,
desc: {
'en-US': 'The customized event handler of moustenter on the curve',
'zh-CN': '曲线 moustenter 事件的回调函数。',
'en-US': 'The customized event handler of mouseenter on the curve',
'zh-CN': '曲线 mouseenter 事件的回调函数。',
},
},
{
Expand Down
10 changes: 5 additions & 5 deletions src/docs/api/Funnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
{
name: 'legendType',
type:
"'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
"'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
defaultVal: "'line'",
isOptional: true,
desc: {
Expand All @@ -49,7 +49,7 @@ export default {
defaultVal: 'undefined',
isOptional: true,
desc: {
'en-US': "The customized shape to be rendered if shape is active via Tooltip, or active index prop is set.",
'en-US': 'The customized shape to be rendered if shape is active via Tooltip, or active index prop is set.',
'zh-CN': '如果形状通过工具提示处于活动状态,或设置了活动索引道具,则将渲染自定义形状。',
},
},
Expand All @@ -59,7 +59,7 @@ export default {
defaultVal: 'undefined',
isOptional: true,
desc: {
'en-US': "The customized shape to be rendered.",
'en-US': 'The customized shape to be rendered.',
'zh-CN': '要渲染的自定义形状。',
},
},
Expand Down Expand Up @@ -208,8 +208,8 @@ export default {
type: 'Function',
isOptional: true,
desc: {
'en-US': 'The customized event handler of moustenter on the area in this group',
'zh-CN': '曲线 moustenter 事件的回调函数。',
'en-US': 'The customized event handler of mouseenter on the area in this group',
'zh-CN': '曲线 mouseenter 事件的回调函数。',
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/docs/api/Legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ const renderLegend = (props) => {
type: 'Function',
isOptional: true,
desc: {
'en-US': 'The customized event handler of moustenter on the items in this group',
'zh-CN': '图例每个项目 moustenter 事件的回调函数。',
'en-US': 'The customized event handler of mouseenter on the items in this group',
'zh-CN': '图例每个项目 mouseenter 事件的回调函数。',
},
examples: [
{
Expand Down
11 changes: 6 additions & 5 deletions src/docs/api/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export default {
},
{
name: 'legendType',
type: "'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
type:
"'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
defaultVal: "'line'",
isOptional: true,
desc: {
Expand All @@ -71,7 +72,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally. If object set, dots will be drawn which have the props mergered by the internal calculated props and the option. If ReactElement set, the option can be the custom dot element.If set a function, the function will be called to render customized dot.',
'If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally. If object set, dots will be drawn which have the props merged by the internal calculated props and the option. If ReactElement set, the option can be the custom dot element.If set a function, the function will be called to render customized dot.',
'zh-CN':
'曲线上的点,接收多种配置。当值为 false ,不渲染点。当值为 true ,点会继承 Line 的属性配置,例如配置了 Area 的 stroke 为 "red", 点会继承这个属性。当值为一个对象的时候,会把这个对象解析为点的属性,来覆盖默认属性。当值是一个 React Element ,会克隆这个 React Element 来渲染“点”。当值是一个 函数 时,会调用这个函数去渲染自定义的“点”。',
},
Expand Down Expand Up @@ -119,7 +120,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. If object set, labels will be drawn which have the props mergered by the internal calculated props and the option. If ReactElement set, the option can be the custom label element. If set a function, the function will be called to render customized label.',
'If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. If object set, labels will be drawn which have the props merged by the internal calculated props and the option. If ReactElement set, the option can be the custom label element. If set a function, the function will be called to render customized label.',
'zh-CN':
'图形上的文本标签。当值为 false ,不展示文本标签。当值为 true,会根据 Line 的属性配置来展示文本标签。当值为一个对象的时候,会把这个对象解析为 文本标签 的属性,来覆盖默认属性。当值是一个 React Element ,会克隆这个 React Element 来渲染“文本标签”。当值是一个 函数 时,会调用这个函数去渲染自定义的“文本标签”。',
},
Expand Down Expand Up @@ -363,8 +364,8 @@ export default {
type: 'Function',
isOptional: true,
desc: {
'en-US': 'The customized event handler of moustenter on the area in this group',
'zh-CN': '曲线 moustenter 事件的回调函数。',
'en-US': 'The customized event handler of mouseenter on the area in this group',
'zh-CN': '曲线 mouseenter 事件的回调函数。',
},
},
{
Expand Down
10 changes: 5 additions & 5 deletions src/docs/api/Pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default {
{
name: 'legendType',
type:
"'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
"'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
defaultVal: "'rect'",
isOptional: false,
desc: {
Expand All @@ -142,7 +142,7 @@ export default {
isOptional: true,
desc: {
'en-US':
'If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. If object set, labels will be drawn which have the props mergered by the internal calculated props and the option. If ReactElement set, the option can be the custom label element. If set a function, the function will be called to render customized label.',
'If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. If object set, labels will be drawn which have the props merged by the internal calculated props and the option. If ReactElement set, the option can be the custom label element. If set a function, the function will be called to render customized label.',
'zh-CN':
'图形上的文本标签。当值为 false ,不展示文本标签。当值为 true,会根据 Bar 的属性配置来展示文本标签。当值为一个对象的时候,会把这个对象解析为 文本标签 的属性,来覆盖默认属性。当值是一个 React Element ,会克隆这个 React Element 来渲染“文本标签”。当值是一个 函数 时,会调用这个函数去渲染自定义的“文本标签”。',
},
Expand All @@ -160,7 +160,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, label lines will not be drawn. If true set, label lines will be drawn which have the props calculated internally. If object set, label lines will be drawn which have the props mergered by the internal calculated props and the option. If ReactElement set, the option can be the custom label line element. If set a function, the function will be called to render customized label line.',
'If false set, label lines will not be drawn. If true set, label lines will be drawn which have the props calculated internally. If object set, label lines will be drawn which have the props merged by the internal calculated props and the option. If ReactElement set, the option can be the custom label line element. If set a function, the function will be called to render customized label line.',
'zh-CN':
'文本标签与楔子的连线。当值为 false ,不展示连线。当值为 true,会根据 Bar 的属性配置来展示连线。当值为一个对象的时候,会把这个对象解析为 连线 的属性,来覆盖默认属性。当值是一个 React Element ,会克隆这个 React Element 来渲染“连线”。当值是一个 函数 时,会调用这个函数去渲染自定义的“连线”。',
},
Expand Down Expand Up @@ -265,8 +265,8 @@ export default {
},
{
name: 'rootTabIndex',
type: "Number",
defaultVal: "0",
type: 'Number',
defaultVal: '0',
isOptional: true,
desc: {
'en-US': 'The tabindex of wrapper surrounding the cells.',
Expand Down
10 changes: 5 additions & 5 deletions src/docs/api/PolarAngleAxis.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option.',
'If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props merged by the internal calculated props and the option.',
'zh-CN': '轴线配置。当值为 false 时,不绘制轴线。当值为对象类型时,会把这个对象解析成 轴线 的属性配置。',
},
},
Expand All @@ -71,7 +71,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, tick lines will not be drawn. If true set, tick lines will be drawn which have the props calculated internally. If object set, tick lines will be drawn which have the props mergered by the internal calculated props and the option.',
'If false set, tick lines will not be drawn. If true set, tick lines will be drawn which have the props calculated internally. If object set, tick lines will be drawn which have the props merged by the internal calculated props and the option.',
'zh-CN': '刻度线配置。当值为 false 时,不绘制刻度线。当值为对象类型时,会把这个对象解析成 刻度线 的属性配置。',
},
},
Expand All @@ -82,7 +82,7 @@ export default {
isOptional: false,
desc: {
'en-US':
'If false set, ticks will not be drawn. If true set, ticks will be drawn which have the props calculated internally. If object set, ticks will be drawn which have the props mergered by the internal calculated props and the option. If ReactElement set, the option can be the custom tick element. If set a function, the function will be called to render customized ticks.',
'If false set, ticks will not be drawn. If true set, ticks will be drawn which have the props calculated internally. If object set, ticks will be drawn which have the props merged by the internal calculated props and the option. If ReactElement set, the option can be the custom tick element. If set a function, the function will be called to render customized ticks.',
'zh-CN':
'刻度配置。当值为 false 时,不绘制刻度。当值为对象类型时,会把这个对象解析成 刻度 的属性配置。当值为 React element,会克隆这个元素来渲染刻度。',
},
Expand Down Expand Up @@ -196,8 +196,8 @@ export default {
type: 'Function',
isOptional: true,
desc: {
'en-US': 'The customized event handler of moustenter on the ticks of this axis',
'zh-CN': '刻度 moustenter 事件的回调函数。',
'en-US': 'The customized event handler of mouseenter on the ticks of this axis',
'zh-CN': '刻度 mouseenter 事件的回调函数。',
},
},
{
Expand Down
Loading

0 comments on commit e8477f3

Please sign in to comment.