Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-system
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-system
Commits
ef685421
Commit
ef685421
authored
Apr 29, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复储值视图数据少于4条时无法显示问题
parent
08a0d137
Hide 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 @
ef685421
...
@@ -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