Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-manage-shell
Project
Overview
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
姜雷
dcxy-manage-shell
Commits
46c0cc38
Commit
46c0cc38
authored
Apr 29, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
修复储值视图数据少于4条时无法显示问题 See merge request
!42
parents
81a51cb0
ef685421
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
chart.vue
src/containers/Dashboard/CustomerRecharge/chart.vue
+11
-8
No files found.
src/containers/Dashboard/CustomerRecharge/chart.vue
View file @
46c0cc38
...
@@ -244,11 +244,12 @@ export default {
...
@@ -244,11 +244,12 @@ export default {
updateSlider
()
{
updateSlider
()
{
this
.
sliderDom
.
innerHTML
=
''
;
this
.
sliderDom
.
innerHTML
=
''
;
const
arrLength
=
this
.
data
.
length
;
const
arrLength
=
this
.
dataList
.
length
;
console
.
log
(
'2222'
,
this
.
data
.
length
-
1
);
let
start
=
this
.
dataList
.
length
-
4
>=
0
?
this
.
dataList
.
length
-
4
:
0
;
let
end
=
this
.
dataList
.
length
-
1
>=
1
?
this
.
dataList
.
length
-
1
:
1
;
// console.log('2222', this.dataList.length - 1, start, end);
if
(
arrLength
)
{
if
(
arrLength
)
{
// let spanNum = 4 / arrLength;
this
.
slider
=
new
Slider
({
this
.
slider
=
new
Slider
({
container
:
this
.
sliderDom
,
container
:
this
.
sliderDom
,
width
:
26
,
width
:
26
,
...
@@ -266,8 +267,8 @@ export default {
...
@@ -266,8 +267,8 @@ export default {
},
},
},
},
},
},
start
:
this
.
data
.
length
-
4
,
start
:
start
,
end
:
this
.
data
.
length
-
1
,
end
:
end
,
minSpan
:
4
,
minSpan
:
4
,
maxSpan
:
4
,
maxSpan
:
4
,
data
:
this
.
dataList
,
data
:
this
.
dataList
,
...
@@ -291,16 +292,18 @@ export default {
...
@@ -291,16 +292,18 @@ export default {
if
(
this
.
chart
)
{
if
(
this
.
chart
)
{
const
arrLength
=
this
.
data
.
length
;
const
arrLength
=
this
.
data
.
length
;
let
spanNum
=
4
/
arrLength
;
let
spanNum
=
4
/
arrLength
;
let
start
=
this
.
dataList
.
length
-
4
>=
0
?
this
.
dataList
.
length
-
4
:
0
;
let
end
=
this
.
dataList
.
length
-
1
>=
1
?
this
.
dataList
.
length
-
1
:
1
;
this
.
ds
.
setState
(
'start'
,
this
.
data
.
length
-
4
);
this
.
ds
.
setState
(
'start'
,
start
);
this
.
ds
.
setState
(
'end'
,
this
.
data
.
length
-
1
);
this
.
ds
.
setState
(
'end'
,
end
);
this
.
dv
.
source
(
this
.
dataList
);
this
.
dv
.
source
(
this
.
dataList
);
// let height = this.data.length * 50;
// let height = this.data.length * 50;
// this.chart.changeHeight(height);
// this.chart.changeHeight(height);
this
.
updateSlider
();
this
.
updateSlider
();
this
.
updateData
();
this
.
updateData
();
console
.
log
(
this
.
chart
.
getYScales
());
console
.
log
(
this
.
chart
.
getYScales
());
}
else
{
}
else
{
this
.
initData
();
this
.
initData
();
this
.
initSlider
();
this
.
initSlider
();
...
...
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