Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
0375212e
Commit
0375212e
authored
Apr 18, 2024
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复yAxis类型不同导致的bug
parent
ffdbb736
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
31 deletions
+39
-31
useBIMode.js
packages/extend-components/EC_HistoryView/src/useBIMode.js
+39
-31
No files found.
packages/extend-components/EC_HistoryView/src/useBIMode.js
View file @
0375212e
import
_
from
'lodash'
;
import
{
BISplitLineColor
,
BIAxisLableColor
,
BIAxisLabelColor
,
BIAxisLineColor
}
from
"./theme"
;
import
{
BISplitLineColor
,
BIAxisLableColor
,
BIAxisLabelColor
,
BIAxisLineColor
}
from
"./theme"
;
/**
* 1. 背景
...
...
@@ -9,6 +9,36 @@ import { BISplitLineColor, BIAxisLableColor, BIAxisLabelColor, BIAxisLineColor }
* 5. markPoint的颜色设置
* 6. tooltip 背景
* */
const
handleYAxis
=
(
item
,
_opt
)
=>
{
item
.
minorSplitLine
=
{
...
item
.
minorSplitLine
,
show
:
false
,
lineStyle
:
{
type
:
'solid'
,
color
:
BISplitLineColor
}
};
item
.
splitLine
=
{
...
item
.
splitLine
,
show
:
true
,
lineStyle
:
{
type
:
'solid'
,
color
:
BISplitLineColor
}
};
item
.
axisLabel
=
{
...
item
.
axisLabel
,
color
:
BIAxisLabelColor
};
item
.
axisLine
=
{
...(
_opt
?.
xAxis
?.
axisLine
??
{}),
show
:
true
,
lineStyle
:
{
type
:
'solid'
,
color
:
BIAxisLineColor
}
};
}
const
patchBIOption
=
(
option
,
theme
)
=>
{
let
_opt
=
_
.
cloneDeep
(
option
);
// 1. 修改legend颜色
...
...
@@ -47,36 +77,14 @@ const patchBIOption = (option, theme) => {
...
_opt
.
xAxis
.
axisLabel
,
color
:
BIAxisLabelColor
};
_opt
.
yAxis
.
forEach
(
item
=>
{
item
.
minorSplitLine
=
{
...
item
.
minorSplitLine
,
show
:
false
,
lineStyle
:
{
type
:
'solid'
,
color
:
BISplitLineColor
}
};
item
.
splitLine
=
{
...
item
.
splitLine
,
show
:
true
,
lineStyle
:
{
type
:
'solid'
,
color
:
BISplitLineColor
}
};
item
.
axisLabel
=
{
...
item
.
axisLabel
,
color
:
BIAxisLabelColor
};
item
.
axisLine
=
{
...
_opt
.
xAxis
.
axisLine
,
show
:
true
,
lineStyle
:
{
type
:
'solid'
,
color
:
BIAxisLineColor
}
};
})
if
(
_opt
&&
_
.
isArray
[
_opt
.
yAxis
])
{
_opt
.
yAxis
.
forEach
(
item
=>
{
handleYAxis
(
item
,
_opt
);
})
}
else
if
(
_opt
&&
!
_
.
isArray
(
_opt
.
yAxis
))
{
handleYAxis
(
_opt
.
yAxis
,
_opt
);
}
return
_opt
;
};
export
default
patchBIOption
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment