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

fix: tweak emphasis text position.

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