简体   繁体   中英

vue-chartjs with chartkick vertical bar chart

I am using vue-chartjs https://vue-chartjs.org/

And vue-chartkick https://www.npmjs.com/package/vue-chartkick

With data from a Covid api that vuex stores the.cases object https://disease.sh/v3/covid-19/historical/all?lastdays=365

<bar-chart:data="this.WorldTimelineData"></bar-chart>

Will display a bar-chart but it is horizontal instead of vertical, how do I make it vertical?

Photo of horizontal chart, but should be a vertical chart

<line-chart:data="this.WorldTimelineData"></line-chart>

A line-chart with the same data will display a line-chart correctly with the dates on the bottom and the amount on the side.

line chart with same data, displays correctly

How would I make the vue-chartkick vue-chartjs bar-chart to be vertical instead of horizontal?

It sounds like you want to use a column chart.

<column-chart :data="this.WorldTimelineData"></column-chart>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM