This is an automated email from the ASF dual-hosted git repository. ovilia pushed a commit to branch v6 in repository https://gitbox.apache.org/repos/asf/echarts-doc.git
commit d18744c86e7131ee9afbf1521aebe4539279845f Merge: 56aecf14 6413d9b2 Author: Wenli Zhang <[email protected]> AuthorDate: Sat Jun 21 08:05:29 2025 +0800 Merge pull request #449 from apache/next-funnel chore: merge next-funnel into v6 en/option/series/funnel.md | 74 ++++++++++++++++++++++++++++++++++++++++++-- zh/option/series/funnel.md | 76 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 146 insertions(+), 4 deletions(-) diff --cc en/option/series/funnel.md index 2b8faa37,90fd3cb9..aa50931e --- a/en/option/series/funnel.md +++ b/en/option/series/funnel.md @@@ -87,10 -112,54 +112,55 @@@ Horizontal align. Defaults to align cen {{ use: partial-funnel-label( prefix = "##", position = true, - formatter = true + formatter = true, + minMargin = true ) }} + ## rateLabel(Object) + + {{ use: partial-label-desc( + name = "funnel rate" + ) }} + + ### precision + + The precision of the conversion rate. The default value is 2. + + ### formatter(function) + + _Callback function_ + + Callback function is in form of: + + ```js + (params: Object|Array) => string + ``` + + where params is the single dataset needed by formatter, which is formed as: + + ```ts + preName: string, + // the name of previous data for conversion rate + nextName: string, + // the name of next data for conversion rate + preDataIndex: number, + // the index of previous data for conversion rate + nextDataIndex: number, + // the index of next data for conversion rate + rate: string, + // percentage of converison rate between each data + ``` + + {{ use: partial-funnel-label( + prefix = "##", + position = false, + formatter = false + ) }} + + ## overallRateLabel(Object) + + The config of overallRateLabel is same as rateLabel, the function of this property is to set the overall conversion rate display. + ## labelLine(Object) The visual guide line style of label. When [label position](~series-funnel.label.position) is set as `'left'`or`'right'`, the visual guide line will show. diff --cc zh/option/series/funnel.md index 4ad5265c,816a65c2..dc5c531f --- a/zh/option/series/funnel.md +++ b/zh/option/series/funnel.md @@@ -109,10 -133,57 +133,58 @@@ option = {{ use: partial-funnel-label( prefix = "##", position = true, - formatter = true + formatter = true, + minMargin = true ) }} + ## rateLabel(Object) + + {{ use: partial-label-desc( + name = "funnel rate" + ) }} + + ### precision + + 漏斗数据转化率的精度.默认值是2. + + ### formatter(string|function) + + _回调函数_ + + 回调函数格式: + + ```js + (params: Object|Array) => string + ``` + + 参数 params 是 formatter 需要的单个数据集。格式如下: + + ```ts + { + rate: string, + // 当前转化率 + preName: string, + // 当前转化率前一个数据的名称 + nextName: string, + // 当前转化率后一个数据的名称 + preDataIndex: number, + // 当前转化率前一个数据的索引 + nextDataIndex: number, + // 当前转化率后一个数据的索引 + } + ``` + + {{ use: partial-funnel-label( + prefix = "##", + position = false, + formatter = false + ) }} + + + ## overallRateLabel(Object) + + 这个属性的配置和rateLabel的配置一致, 这个属性的功能是设置整体转化率。 + ## labelLine(Object) 标签的视觉引导线样式,在 [label 位置](~series-funnel.label.position) 设置为`'left'`或者`'right'`的时候会显示视觉引导线。 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
