Skip to content
On this page

柱状图


显示代码
html
<hu-shape-chart
  :series="series2"
  :x-axis="xAxis"
  style="height:200px;background:#1B2036;
  opacity: 0.8;"
></hu-shape-chart>

<script setup>
  import { ref } from 'vue'
  const xAxis = ref(['景区A', '景区B', '景区C', '景区D', '景区E'])
  const series2 = ref([
    {
      data: [220, 232, 201, 234, 190],
      barWidth: 10,
    },
  ])
</script>

Attributes

参数说明类型默认值
data数据集合[Object, Array]{}
tooltip鼠标移动到图例的提升信息Object{ formatter: "{b}: {c}" }
series数据集合Array[]
legendOption图例配置Object{right: 'auto', top: 'auto',orient: 'horizontal'}
xAxis横坐标数据Array[]
colors自定义颜色Array[]
xAxisOtherx 轴的其它配置Object{}

Released under the MIT License.