提交 27083967 编写于 作者: 1 100pah

fix: tweak emphasis text position.

上级 b338c223
......@@ -705,13 +705,15 @@ export function setLabelStyle<LDI>(
targetEl.setTextConfig(createTextConfig(
normalStyle,
normalModel,
opt
opt,
false
));
const targetElEmphasisState = targetEl.ensureState('emphasis');
targetElEmphasisState.textConfig = createTextConfig(
emphasisState.style,
emphasisModel,
opt
opt,
true
);
}
......@@ -765,8 +767,8 @@ export function createTextStyle(
export function createTextConfig(
textStyle: TextStyleProps,
textStyleModel: Model,
opt?: TextCommonParams,
isEmphasis?: boolean
opt: TextCommonParams,
isEmphasis: boolean
) {
const textConfig: ElementTextConfig = {};
let labelPosition;
......
......@@ -368,7 +368,16 @@ under the License.
type: 'scatter',
symbolSize: 30,
data: [
[12, 331], [55, 131], [55, 531]
{
value: [12, 331],
label: {
show: true,
formatter: 'position top\neven hoverred',
fontSize: 20,
position: 'top'
}
},
[55, 131], [55, 531]
]
}, {
type: 'scatter',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册