提交 398f6190 编写于 作者: 1 100pah

feat: enable label to be silent.

上级 dbb3315a
......@@ -715,6 +715,11 @@ export function setLabelStyle<LDI>(
);
}
// PENDING: if there is many requirements that emphasis position
// need to be different from normal position, we might consider
// auto slient is those cases.
richText.silent = !!normalModel.getShallow('silent');
normalStyle.text = normalStyleText;
emphasisState.style.text = emphasisStyleText;
......
......@@ -759,6 +759,7 @@ export interface LabelOption extends TextCommonOption {
offset?: number[]
overflow?: TextStyleProps['overflow']
silent?: boolean
// TODO: TYPE not all label support formatter
// formatter?: string | ((params: CallbackDataParams) => string)
......
......@@ -392,7 +392,8 @@ under the License.
symbolSize: 40,
label: {
show: true,
formatter: 'label inside\n{c}'
formatter: 'label inside\n{c}',
silent: true
},
emphasis: {
label: {
......@@ -667,8 +668,10 @@ under the License.
series: [{
type: 'scatter',
symbolSize: 30,
// silent: true,
label: {
show: true
show: true,
silent: true,
},
itemStyle: {
color: 'green',
......@@ -679,7 +682,7 @@ under the License.
position: 'top'
}
},
data: [[12, 331221], [20, 331221], [55, 331221]]
data: [[12, 3312212121], [20, 3311212221], [55, 3311212221]]
}]
};
......@@ -715,7 +718,8 @@ under the License.
type: 'scatter',
symbolSize: 30,
label: {
show: true
show: true,
silent: true
},
itemStyle: {
color: 'green',
......@@ -788,7 +792,8 @@ under the License.
id: 's',
symbolSize: 30,
label: {
show: true
show: true,
silent: true
},
itemStyle: {
color: 'green',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册