Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsk-data-view-pd
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 3e0e90bb
authored
Aug 10, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
柱状图显示调通
1 parent
5753b7e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
src/views/crowdfunding/CrowdfundLeft.vue
src/views/crowdfunding/components/ActivityTrends.vue
src/views/crowdfunding/components/BarChart.vue
src/views/crowdfunding/CrowdfundLeft.vue
View file @
3e0e90b
...
...
@@ -124,10 +124,12 @@ export default {
this
.
orderNum
=
_data
.
orderNum
this
.
activityNum
=
_data
.
activityNum
this
.
dataList
.
amountDataList
=
_data
.
trend
console
.
log
(
this
.
dataList
.
amountDataList
);
this
.
$refs
.
amountChartRef
.
drawBar
()
this
.
$refs
.
sessionChartRef
.
drawBar
()
this
.
$refs
.
outputChartRef
.
drawBar
()
console
.
log
(
this
.
dataList
.
amountDataList
)
this
.
$nextTick
(()
=>
{
this
.
$refs
.
amountChartRef
.
drawBar
()
this
.
$refs
.
sessionChartRef
.
drawBar
()
this
.
$refs
.
outputChartRef
.
drawBar
()
})
}
}
}
...
...
src/views/crowdfunding/components/ActivityTrends.vue
View file @
3e0e90b
...
...
@@ -9,7 +9,17 @@
<
template
>
<div
class=
"activity-box"
>
<box-title
title=
"近一年活动场次趋势图"
></box-title>
<BarChart
ref=
"activityTrendChartRef"
class=
"bar-chart"
isMultiple
:barWidth=
"'24'"
domId=
"activityTrendChart"
height=
"26.22vh"
:dataList
.
sync=
"dataList"
:colorList=
"colorList"
:tooltipFormatterObj=
"tooltips.amountTooltip"
></BarChart>
<BarChart
ref=
"activityTrendChartRef"
class=
"bar-chart"
isMultiple
:barWidth=
"'24'"
domId=
"activityTrendChart"
height=
"26.22vh"
:dataList
.
sync=
"dataList"
:colorList=
"colorList"
:tooltipFormatterObj=
"tooltips.amountTooltip"
></BarChart>
</div>
</
template
>
...
...
@@ -36,11 +46,12 @@ export default {
}
},
created
()
{
this
.
getActivityTrend
()
//
this.getActivityTrend()
},
mounted
()
{
// this.$refs.activityTrendChartRef.drawBar()
this
.
getActivityTrend
()
},
methods
:
{
...
...
@@ -49,7 +60,9 @@ export default {
console
.
log
(
_result
)
const
_data
=
_result
.
data
.
dataList
this
.
dataList
=
_data
this
.
$refs
.
activityTrendChartRef
.
drawBar
()
this
.
$nextTick
(()
=>
{
this
.
$refs
.
activityTrendChartRef
.
drawBar
()
})
}
}
}
...
...
src/views/crowdfunding/components/BarChart.vue
View file @
3e0e90b
...
...
@@ -73,7 +73,7 @@ export default {
},
drawBar
()
{
console
.
log
(
this
.
dataList
,
this
.
tooltipFormatterObj
)
this
.
barOptions
.
xAxis
.
data
=
this
.
dataList
.
map
(
item
=>
item
.
m
onth
)
this
.
barOptions
.
xAxis
.
data
=
this
.
dataList
.
map
(
item
=>
item
.
statM
onth
)
this
.
barOptions
.
series
[
0
].
data
=
this
.
dataList
.
map
(
item
=>
item
[
this
.
tooltipFormatterObj
.
attrName
])
this
[
this
.
domId
].
setOption
(
this
.
barOptions
)
},
...
...
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