diff --git a/en/option/partial/mark-line.md b/en/option/partial/mark-line.md index 4ded11255..1a8947dcb 100644 --- a/en/option/partial/mark-line.md +++ b/en/option/partial/mark-line.md @@ -138,6 +138,18 @@ Positions of labels can be: + `'start'` starting point of the line. + `'middle'` middle point of the line. + `'end'` ending point of the line. + +Since version 4.7.0, more label positions are supported: `'start'`, `'middle'`, `'end'`, `'insideStartTop'`, `'insideStartBottom'`, `'insideMiddleTop'`, `'insideMiddleBottom'`, `'insideEndTop'`, `'insideEndBottom'`. + +`'insideMiddleBottom'` is the same as `'middle'`. Position is as the following chart. + +The distance between labels and mark lines can be set with [label.distance](~series-${seriesType}.markLine.label.distance). + +~[800x500](${galleryViewPath}bar-markline&reset=1&edit=1) + +#${prefix} distance(number|Array) +The distance between labels and mark lines. If it's an array, then the first element is the horizontal distance, and the second element is the vertical distance. If it's a number, then the horizontal and vertical disntances are the same. + #${prefix} formatter(string|Function) {{ use: partial-1d-data-label-formatter }} @@ -201,7 +213,14 @@ Label of this data item, which will be merged with `label` of starting point and {{ use: mark-line-label( prefix='#'+${prefix} ) }} -##${prefix} emphasis(Object) + +#${prefix} emphasis(Object) +##${prefix} lineStyle(Object) +{{ use: partial-line-style( + prefix="##"+${prefix}, + hasCurveness=true +) }} +##${prefix} label(Object) {{ use: mark-line-label( prefix='##'+${prefix} ) }} diff --git a/zh/option/partial/mark-line.md b/zh/option/partial/mark-line.md index f72e02e3c..cbabdb649 100644 --- a/zh/option/partial/mark-line.md +++ b/zh/option/partial/mark-line.md @@ -137,11 +137,24 @@ data: [ {{ target: mark-line-label }} #${prefix} show(boolean) = ${defaultShowLabel|default(true)} 是否显示标签。 + #${prefix} position(string) = 'end' 标签位置,可选: + `'start'` 线的起始点。 + `'middle'` 线的中点。 -+ `'end'` 线的结束点。 ++ `'end'` 线的结束点。 + +4.7.0 版本起,支持更多标签位置:`'start'`, `'middle'`, `'end'`, `'insideStartTop'`, `'insideStartBottom'`, `'insideMiddleTop'`, `'insideMiddleBottom'`, `'insideEndTop'`, `'insideEndBottom'`。 + +其中,`'insideMiddleBottom'` 等同于 `'middle'`。具体位置参见下图。 + +文字与线的间距可以通过 [label.distance](~series-${seriesType}.markLine.label.distance) 调整。 + +~[800x500](${galleryViewPath}bar-markline&reset=1&edit=1) + +#${prefix} distance(number|Array) +标签与线之间的间距。如果是数组,第一项为横向间距,第二项为纵向间距。如果是数字,则表示横向纵向使用相同的间距。 + #${prefix} formatter(string|Function) {{ use: partial-1d-data-label-formatter }}