Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d2b61fdc
authored
2023-02-08 09:29:48 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:大屏样式
1 parent
37dda275
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
23 deletions
src/components/Echart/Brokenline/Chart.vue
src/components/Echart/Columnar/Chart.vue
src/components/Echart/Brokenline/Chart.vue
View file @
d2b61fd
<
template
>
<!-- 折线图 -->
<Echart
:options=
"options"
id=
"bottomLeftChart"
height=
"100%"
width=
"100%"
></Echart>
<Echart
:options=
"options"
id=
"bottomLeftChart"
height=
"100%"
width=
"100%"
></Echart>
</
template
>
<
script
>
import
Echart
from
"@/common/echart"
;
export
default
{
data
()
{
data
()
{
return
{
xAxisData
:
{},
yAxisData1
:
{},
...
...
@@ -30,7 +25,7 @@ export default {
},
},
methods
:
{
hexToRgba
(
hex
,
opacity
)
{
hexToRgba
(
hex
,
opacity
)
{
let
rgbaColor
=
""
;
let
reg
=
/^#
[\d
a-f
]{6}
$/i
;
if
(
reg
.
test
(
hex
))
{
...
...
@@ -43,7 +38,7 @@ export default {
},
watch
:
{
cdata
:
{
handler
(
newData
)
{
handler
(
newData
)
{
this
.
xAxisData
=
newData
.
echartData
.
map
((
v
)
=>
v
.
name
);
this
.
yAxisData1
=
newData
.
echartData
.
map
((
v
)
=>
v
.
value1
);
this
.
yAxisData2
=
newData
.
echartData
.
map
((
v
)
=>
v
.
value2
);
...
...
@@ -65,13 +60,11 @@ export default {
let
html
=
""
;
params
.
forEach
((
v
)
=>
{
html
+=
`<div style="color: #000;font-size: 14px;line-height: 24px background-color: #000000">
<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:
${
newData
.
color
[
v
.
componentIndex
]
};
"></span>
<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:
${
newData
.
color
[
v
.
componentIndex
]
};
"></span>
${v.seriesName}.${v.name}
<span style="
color
:
$
{
newData
.
color
[
v
.
componentIndex
]
};
font
-
weight
:
700
;
font
-
size
:
18
px
">${v.value}</span>
<span style="
color
:
$
{
newData
.
color
[
v
.
componentIndex
]
};
font
-
weight
:
700
;
font
-
size
:
18
px
">${v.value}</span>
个`;
});
return html;
...
...
@@ -140,8 +133,8 @@ export default {
{
name: newData.legendItem[0],
type: "
line
",
smooth:
tru
e, //是否平滑
showSymbol:
fals
e,
smooth:
fals
e, //是否平滑
showSymbol:
tru
e,
symbol: "
circle
",
symbolSize: 6,
zlevel: 3,
...
...
@@ -158,8 +151,8 @@ export default {
{
name: newData.legendItem[1],
type: "
line
",
smooth:
tru
e,
showSymbol:
fals
e,
smooth:
fals
e,
showSymbol:
tru
e,
symbol: "
circle
",
symbolSize: 8,
zlevel: 3,
...
...
@@ -176,8 +169,8 @@ export default {
{
name: newData.legendItem[2],
type: "
line
",
smooth:
tru
e,
showSymbol:
fals
e,
smooth:
fals
e,
showSymbol:
tru
e,
symbol: "
circle
"
,
symbolSize
:
8
,
zlevel
:
3
,
...
...
src/components/Echart/Columnar/Chart.vue
View file @
d2b61fd
...
...
@@ -76,7 +76,6 @@ export default {
itemStyle
:
{
normal
:
{
// 这里设置圆角
barBorderRadius
:
[
0
,
10
,
10
,
0
],
color
:
"#16F4D2"
,
}
},
...
...
@@ -89,7 +88,6 @@ export default {
itemStyle
:
{
normal
:
{
// 这里设置圆角
barBorderRadius
:
[
0
,
10
,
10
,
0
],
color
:
"#C99E68"
},
},
...
...
Please
register
or
sign in
to post a comment