This commit is contained in:
parent
5f425eccb3
commit
b9bda9413c
|
@ -34,7 +34,8 @@ const data = reactive({
|
|||
list1: [],
|
||||
list2: [],
|
||||
year: [],
|
||||
option: {}
|
||||
option: {},
|
||||
bg:[],
|
||||
})
|
||||
|
||||
const getOption = () => {
|
||||
|
@ -99,7 +100,7 @@ const getOption = () => {
|
|||
{
|
||||
name: "背景",
|
||||
type: "bar",
|
||||
data: [0, 0, 0, 0, 0],
|
||||
data: data.bg,
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: "rgba(180, 180, 180, 0.2)",
|
||||
|
@ -152,6 +153,9 @@ onBeforeMount(() => {
|
|||
data.list1 = props.list1
|
||||
data.list2 = props.list2
|
||||
data.year = props.year
|
||||
data.year.forEach(()=>{
|
||||
data.bg.push(0)
|
||||
})
|
||||
getOption()
|
||||
setChart()
|
||||
}, 600)
|
||||
|
|
|
@ -34,7 +34,8 @@ const data = reactive({
|
|||
list1: [],
|
||||
list2: [],
|
||||
year: [],
|
||||
option: {}
|
||||
option: {},
|
||||
bg:[],
|
||||
})
|
||||
|
||||
const getOption = () => {
|
||||
|
@ -99,7 +100,7 @@ const getOption = () => {
|
|||
{
|
||||
name: "背景",
|
||||
type: "bar",
|
||||
data: [0, 0, 0, 0, 0],
|
||||
data: data.bg,
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: "rgba(180, 180, 180, 0.2)",
|
||||
|
@ -153,6 +154,9 @@ onBeforeMount(() => {
|
|||
data.list1 = props.list1
|
||||
data.list2 = props.list2
|
||||
data.year = props.year
|
||||
data.year.forEach(()=>{
|
||||
data.bg.push(0)
|
||||
})
|
||||
getOption()
|
||||
setChart()
|
||||
}, 600)
|
||||
|
|
|
@ -34,7 +34,8 @@ const data = reactive({
|
|||
list1: [],
|
||||
list2: [],
|
||||
year: [],
|
||||
option: {}
|
||||
option: {},
|
||||
bg:[],
|
||||
})
|
||||
|
||||
const getOption = () =>{
|
||||
|
@ -91,7 +92,7 @@ const getOption = () =>{
|
|||
{
|
||||
name: "背景",
|
||||
type: "bar",
|
||||
data: [0, 0, 0, 0, 0],
|
||||
data: data.bg,
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: "rgba(180, 180, 180, 0.2)",
|
||||
|
@ -140,6 +141,9 @@ onBeforeMount(() => {
|
|||
data.list1 = props.list1
|
||||
data.list2 = props.list2
|
||||
data.year = props.year
|
||||
data.year.forEach(()=>{
|
||||
data.bg.push(0)
|
||||
})
|
||||
getOption()
|
||||
setChart()
|
||||
}, 600)
|
||||
|
|
|
@ -168,7 +168,7 @@ const getOption = () =>{
|
|||
itemStyle: {
|
||||
color: "rgba(221, 242, 255, 0.1)",
|
||||
},
|
||||
data: ["2019", "2020", "2021", "2022", "2023"].map(() => 100),
|
||||
data: data.year.map(() => 100),
|
||||
barWidth: 50,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -163,7 +163,7 @@ const getOption = () => {
|
|||
itemStyle: {
|
||||
color: "rgba(221, 242, 255, 0.1)",
|
||||
},
|
||||
data: ["2019", "2020", "2021", "2022", "2023"].map(() => 100),
|
||||
data: data.year.map(() => 100),
|
||||
barWidth: 50,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -33,7 +33,8 @@ const data = reactive({
|
|||
list1: [],
|
||||
list2: [],
|
||||
year: [],
|
||||
option: {}
|
||||
option: {},
|
||||
bg:[],
|
||||
})
|
||||
const getOption = () => {
|
||||
data.option = {
|
||||
|
@ -89,7 +90,7 @@ const getOption = () => {
|
|||
{
|
||||
name: "背景",
|
||||
type: "bar",
|
||||
data: [0, 0, 0, 0, 0],
|
||||
data: data.bg,
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: "rgba(180, 180, 180, 0.2)",
|
||||
|
@ -139,6 +140,9 @@ onBeforeMount(() => {
|
|||
data.list1 = props.list1
|
||||
data.list2 = props.list2
|
||||
data.year = props.year
|
||||
data.year.forEach(()=>{
|
||||
data.bg.push(0)
|
||||
})
|
||||
getOption()
|
||||
setChart()
|
||||
}, 600)
|
||||
|
|
Loading…
Reference in New Issue