How to dynamically add a baseline to v-charts in vue?

v-charts in vue can add a baseline, but it is only written to death. How to dynamically add a baseline according to the data in the background?

<template>
    <ve-line :data="chartDataBPs" :settings="chartSettingsBPs" :data-empty="dataEmpty" :colors="colors" :mark-line="markLine"></ve-line>
</template>

<script>
    data(){
        this.markLine = {
            data:[
                {
                    yAxis: 130,
                },
                {
                    yAxis: 110,
                },
            ]
        }
        return{
            test:120
        }
    }
</script>

whether the data in test in data can be bound to yAxis.

Apr.22,2021

solve the problem by calculating attributes

Menu