Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zentao-view
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
zentao
zentao-view
Commits
7376f0d4
Commit
7376f0d4
authored
Mar 12, 2021
by
shangtx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(年工时基准表): 条型图添加label
parent
dda05e7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
AnnualConsume.vue
src/views/task/annualConsume/AnnualConsume.vue
+15
-10
No files found.
src/views/task/annualConsume/AnnualConsume.vue
View file @
7376f0d4
...
@@ -25,11 +25,15 @@
...
@@ -25,11 +25,15 @@
<v-chart
:forceFit=
"true"
:height=
"height"
:data=
"data"
>
<v-chart
:forceFit=
"true"
:height=
"height"
:data=
"data"
>
<v-coord
type=
"rect"
direction=
"LB"
/>
<v-coord
type=
"rect"
direction=
"LB"
/>
<!--
<v-tooltip
/>
-->
<!--
<v-tooltip
/>
-->
<v-legend
<v-legend
:itemFormatter=
"itemFormatter"
/>
:itemFormatter=
"itemFormatter"
<v-axis
dataKey=
"name"
/>
<v-stack-bar
position=
"name*value"
:color=
"['type']"
:label=
"['value', (value) =>
{
return value == 0 ? ' ': value;
} ]"
/>
/>
<v-axis
dataKey=
"name"
:label=
"label"
/>
<v-stack-bar
position=
"name*工时"
color=
"类型"
/>
<v-guide
<v-guide
type=
"line"
type=
"line"
:top=
"true"
:top=
"true"
...
@@ -40,7 +44,7 @@
...
@@ -40,7 +44,7 @@
fontSize: 12,
fontSize: 12,
fontWeight: 500,
fontWeight: 500,
lineWidth: 2,
lineWidth: 2,
lineDash: [5,
1]
lineDash: [5,
1],
}"
}"
:text="{
:text="{
position: 'start',
position: 'start',
...
@@ -73,9 +77,9 @@ export default {
...
@@ -73,9 +77,9 @@ export default {
height
:
800
,
height
:
800
,
label
,
label
,
legendMap
:
{
legendMap
:
{
beforeJoin
:
'入职前标准工时'
,
beforeJoin
:
"入职前标准工时"
,
value
:
'已消耗工时'
value
:
"已消耗工时"
,
}
}
,
};
};
},
},
methods
:
{
methods
:
{
...
@@ -86,11 +90,12 @@ export default {
...
@@ -86,11 +90,12 @@ export default {
dv
.
transform
({
dv
.
transform
({
type
:
"fold"
,
type
:
"fold"
,
fields
:
[
"beforeJoin"
,
"value"
],
fields
:
[
"beforeJoin"
,
"value"
],
key
:
"
类型
"
,
key
:
"
type
"
,
value
:
"
工时
"
,
value
:
"
value
"
,
retains
:
[
"name"
],
retains
:
[
"name"
],
});
});
this
.
data
=
dv
.
rows
;
this
.
data
=
dv
.
rows
;
console
.
info
(
this
.
data
);
});
});
},
},
itemFormatter
(
text
)
{
itemFormatter
(
text
)
{
...
...
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