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
0429c98c
Commit
0429c98c
authored
Dec 20, 2024
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复接口未返回数据时组件报错的问题
parent
db3c0629
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
SingleChart.js
packages/extend-components/EC_HistoryView/src/SingleChart.js
+7
-1
No files found.
packages/extend-components/EC_HistoryView/src/SingleChart.js
View file @
0429c98c
...
@@ -250,12 +250,18 @@ const SingleChart = memo((props) => {
...
@@ -250,12 +250,18 @@ const SingleChart = memo((props) => {
_option
.
yAxis
.
min
=
0
;
_option
.
yAxis
.
min
=
0
;
}
}
}
else
{
}
else
{
try
{
_option
.
series
.
forEach
(
item
=>
{
_option
.
series
.
forEach
(
item
=>
{
if
(
item
.
data
.
length
===
0
)
{
// 泳道图没有yAxisIndex
if
(
item
.
data
.
length
===
0
&&
(
item
.
yAxisIndex
||
item
.
yAxisIndex
===
0
))
{
_option
.
yAxis
[
item
.
yAxisIndex
].
max
=
1
;
_option
.
yAxis
[
item
.
yAxisIndex
].
max
=
1
;
_option
.
yAxis
[
item
.
yAxisIndex
].
min
=
0
;
_option
.
yAxis
[
item
.
yAxisIndex
].
min
=
0
;
item
.
data
=
[[
moment
(
dataSource
?.[
0
]?.
dateFrom
).
valueOf
(),
null
],
[
moment
(
dataSource
?.[
0
]?.
dateTo
).
valueOf
(),
null
]]
}
}
})
})
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
}
// 加入bi模式
// 加入bi模式
if
(
theme
===
'BI'
)
_option
=
patchBIOption
(
_option
,
BI
);
if
(
theme
===
'BI'
)
_option
=
patchBIOption
(
_option
,
BI
);
...
...
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