Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-assistant-assemble
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 99b23238
authored
Apr 25, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
52cbc115
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
packagesList/outDetail/components/line/line.js
packagesList/outDetail/components/line/line.js
View file @
99b2323
...
...
@@ -40,19 +40,19 @@ Component({
* 组件的方法列表
*/
methods
:
{
onInitChart
(
xData
,
yData
)
{
this
.
ecComponent
&&
this
.
ecComponent
.
init
((
canvas
,
width
,
height
,
dpr
)
=>
{
onInitChart
(
xData
,
yData
)
{
this
.
ecComponent
&&
this
.
ecComponent
.
init
((
canvas
,
width
,
height
,
dpr
)
=>
{
const
chart
=
echarts
.
init
(
canvas
,
null
,
{
width
:
width
,
height
:
height
,
devicePixelRatio
:
dpr
// new
});
this
.
setOption
(
chart
,
xData
,
yData
);
this
.
setOption
(
chart
,
xData
,
yData
);
return
chart
;
})
},
setOption
(
chart
,
xData
,
yData
)
{
console
.
log
(
xData
)
setOption
(
chart
,
xData
,
yData
)
{
let
maxSpan
=
xData
.
length
<
10
?
50
:
20
var
option
=
{
grid
:
{
left
:
8
,
...
...
@@ -125,7 +125,7 @@ Component({
},
dataZoom
:
{
type
:
"inside"
,
maxSpan
:
xData
.
length
<
5
?
50
:
10
maxSpan
:
maxSpan
},
series
:
[{
data
:
yData
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment