Skip to content
On this page

折线图


显示代码
html
<hu-line-chart
  :series="series"
  :x-axis="xAxis"
  style="height:200px;background-color:rgba(27, 32, 54, 0.8);
"
></hu-line-chart>

<script setup>
  import { ref } from 'vue'
  const xAxis = ref(['5.13', '5.14', '5.15', '5.16', '5.17', '5.18', '5.19'])
  const series = ref([
    {
      name: '名称1',
      data: [120, 132, 101, 134, 90, 230, 210],
    },
    // {
    //   name: '名称2',
    //   data: [120, 132, 101, 134, 90, 230, 210],
    // },
  ])
</script>

Attributes

参数说明类型默认值
data数据集合[Object, Array]{}
series数据集合Array[]
legendOption图例配置Object{right: 'auto', top: 'auto',orient: 'horizontal'}
xAxis横坐标数据Array[]
colors自定义颜色Array[]
xAxisOtherx 轴的其它配置Object{}
yAxisOthery 轴的其它配置Object{}
otherOption其它配置项Object{}

Released under the MIT License.