<template>
  <div class="style-ylabel">
    <div class="setting-title" @click="show = !show">
      <div>图例设置</div>
      <e class="el-icon-arrow-right" v-show="!show"></e>
      <e class="el-icon-arrow-down" v-show="show"></e>
    </div>
    <el-form size="mini" label-width="30%" v-show="show">
      <el-form-item label="是否显示">
        <el-switch v-model="option.legendShow"></el-switch>
      </el-form-item>
      <el-form-item label="字体大小">
        <el-input-number
          v-model="option.legendTextStyle.fontSize"
        ></el-input-number>
      </el-form-item>
      <el-form-item label="字体颜色">
        <avue-input-color v-model="option.legendFontColor"></avue-input-color>
      </el-form-item>
      <el-form-item label="类型">
        <el-radio v-model="option.legendType" label="scroll">滚动</el-radio>
        <el-radio v-model="option.legendType" label="plain">普通</el-radio>
      </el-form-item>
      <el-form-item label="位置">
        <el-select v-model="option.legendAlign">
          <el-option label="中" value="center"></el-option>
          <el-option label="左" value="left"></el-option>
          <el-option label="右" value="right"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="左边距" v-show="option.legendAlign == 'left'">
        <el-input-number v-model="option.legendLeft"></el-input-number>
      </el-form-item>
      <el-form-item label="右边距" v-show="option.legendAlign == 'right'">
        <el-input-number v-model="option.legendRight"></el-input-number>
      </el-form-item>
      <el-form-item label="上边距">
        <el-input-number v-model="option.legendTop"></el-input-number>
      </el-form-item>
      <el-form-item label="布局朝向">
        <el-radio v-model="option.orient" label="horizontal">横</el-radio>
        <el-radio v-model="option.orient" label="vertical">竖</el-radio>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  props: ["option"],
  data() {
    return {
      show: false,
    };
  },
  methods: {},
};
</script>
<style lang="scss">
</style>
