<form>
<div class="multiselect">
<div class="selectBox" @click="showCheckboxes">
<select class="form-control">
<option>Выберите тип метаболтита</option>
</select>
<div class="overSelect"></div>
</div>
<div id="checkboxes">
<el-checkbox-group v-model="choosenMetabolit">
<el-checkbox v-for="metabolit in metabolits" :label="metabolit">{{metabolit.name}}</el-checkbox>
</el-checkbox-group>
</div>
</div>
</form>
choosenMetabolit: [{
name: 'L-аланин',
result_1: 72,
result_2: -32,
result_3: -33,
},{
name: 'L-аргинин',
result_1: 96,
result_2: 68,
result_3: 72,
},{
name: 'L-аспарагиновая кислота',
result_1: 17.89,
result_2: 93.6,
result_3: 81.3,
},{
name: 'L-глутаминовая кислота',
result_1: 87.4,
result_2: 54.8,
result_3: 49.2,
},{
name: 'L-глицин',
result_1: -17,
result_2: -44,
result_3: -38,
}]
<select v-on:change="pushDataToChart" class="form-control" v-model="choosenMetabolit" placeholder="тип события" >
<option
v-for="metabolit in metabolits"
:key="metabolit"
:value="metabolit">
{{metabolit.name}}
</option>
</select>
methods: {
pushDataToChart(){
this.anMetProfData.labels.push(this.choosenMetabolit.name)
this.anMetProfData.datasets[0].data.push(this.choosenMetabolit.result_1)
this.anMetProfData.datasets[1].data.push(this.choosenMetabolit.result_2)
this.anMetProfData.datasets[2].data.push(this.choosenMetabolit.result_3)
}
}