<template>
  <static-content-wrapper
    :designer="designer"
    :field="field"
    :design-state="designState"
    :parent-widget="parentWidget"
    :parent-list="parentList"
    :index-of-parent-list="indexOfParentList"
    :sub-form-row-index="subFormRowIndex"
    :sub-form-col-index="subFormColIndex"
    :sub-form-row-id="subFormRowId"
    :heightStyle="pHeightStyle"
  >
    <v-chart v-if="showChart" class="echart" ref="chart" :option="field.options.echarBarOption" @click="handleButtonWidgetClick" :style="{ height: heightStyle }"/>
  </static-content-wrapper>
</template>

<script>
import StaticContentWrapper from './static-content-wrapper';
import ECharts from 'vue-echarts';
import mixin from "./mixins/echart-bar-mixin";

export default {
  name: 'echart-bar-widget',
  mixins: [mixin],
  components: {
    StaticContentWrapper,
    'v-chart': ECharts
  }
};
</script>

<style lang="scss" scoped>
@import '@/styles/global.scss'; //* static-content-wrapper已引入，还需要重复引入吗？ *//
</style>
