Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(AreaChart): update markLine specification #123

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/LineChart/handleSeries.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function isTopOrBottom(markLine, seriesUnit, flag) {
markLineData = { yAxis: position };
}

markLineData.label = { show: false, position: 'insideEndTop' };
markLineData.label = { show: false, position: 'insideEndTop', lineHeight: Theme.config.markLineLabelLineHeight };
markLineData.lineStyle = {};
// 没有配置颜色,认为是阈值线,加载阈值线的label配置
if (!markLineColor) {
Expand Down
4 changes: 3 additions & 1 deletion src/feature/token/factory/getModelToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function getModelToken(aliasToken) {
colorFill,
axisLineWidthSecondary,
labelFontSize,
labelLineHeight,
colorTextTertiary,
borderRadius,
paddingSM,
Expand Down Expand Up @@ -323,7 +324,8 @@ function getModelToken(aliasToken) {
markLineLabelPadding: [paddingSM, paddingSM * 2, paddingSM, paddingSM * 2],
// 标记线文本borderWidth
markLineLabelBorderWidth: borderWidthLG,

// 标记线文本行高
markLineLabelLineHeight: labelLineHeight,

/** ----- dataZoom------ */
// dataZoom边框色
Expand Down
2 changes: 2 additions & 0 deletions src/feature/token/theme/cloud/getAliasToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ function getAliasToken(globalToken, light = true) {
labelFontSize: fontSizeBase,
// labelLine的长度
labelLineLength: size6x,
// labelLine的行高
labelLineHeight: size5x,
// 边框 细
borderWidth: borderBase,
// 边框
Expand Down
2 changes: 2 additions & 0 deletions src/feature/token/theme/hdesign/getAliasToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ function getAliasToken(globalToken, light = true) {
labelFontSize: fontSizeBase,
// labelLine的长度
labelLineLength: size6x,
// labelLine的行高
labelLineHeight: size5x,
// 边框 细
borderWidth: borderBase,
// 边框
Expand Down
2 changes: 2 additions & 0 deletions src/feature/token/theme/ict/getAliasToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ function getAliasToken(globalToken, light = true) {
labelFontSize: fontSizeBase,
// labelLine的长度
labelLineLength: size6x,
// labelLine的行高
labelLineHeight: size5x,
// 边框 细
borderWidth: borderBase,
// 边框
Expand Down
6 changes: 1 addition & 5 deletions src/option/config/mark/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ function getThresholdMarkLineLabel() {
return {
label: {
color: colorError,
backgroundColor: bg,
fontSize: Theme.config.markLineLabelFontSize,
borderColor: colorError,
borderWidth: Theme.config.markLineLabelBorderWidth,
borderRadius: Theme.config.markLineLabelBorderRadius,
padding: Theme.config.markLineLabelPadding,
lineHeight: Theme.config.markLineLabelLineHeight,
position: 'insideEnd'
},
lineStyle: {
Expand Down