Reputation: 1257
I am new into using ng2-charts and i wanted to know is it possible to have a horizontal bar graph? I only see a vertical bar graph but i am not sure if that could be altered to include horizontal bar graph. How far can i customize a bar graph in ng2-charts?
Upvotes: 8
Views: 8514
Reputation: 741
Bar charts can be used by adjusting the "chartType" option within your baseChart canvas.
<canvas baseChart
[datasets]="data"
[labels]="label"
chartType="horizontalBar">
Upvotes: 7
Reputation: 1257
For anyone who was wondering about the same thing - i looked into the documentation for chart.js
and was able to find just changing the bar chart type to horizontalBar works nicely. public barChartType: string = 'horizontalBar';
Upvotes: 12