score:0
just add height
tag in canvas
element. this solved for me.
<canvas id="chart" height="50">
score:1
you have the barthickness
option as mentionned in the docs here -> http://www.chartjs.org/docs/#bar-chart-chart-options
score:1
while this is not an official fix, it worked for me. i took advice from this link, https://github.com/chartjs/chart.js/issues/2787
i store all my values within multiple arrays, so count number of objects and multiply by a specific number and set height of your chart wrapper ( div around the chart ).
<div class="chart-wrapper horizontalbar" style="position: relative; height: 50vh;">
<canvas id="chart-location"></canvas>
</div>
then after the chart is drawn, set the height (location_labels is an array housing all my labels)
$( ".horizontalbar" ).height(location_labels.length * 30);
score:2
simply increase the canvas height. for example;
<canvas id="horizontalbar" height="1000px"></canvas>
Source: stackoverflow.com
Related Query
- Chart JS horizontal bar chart width of bars and the chart
- chart js 2 how to set bar width
- Horizontal stacked bar chart with chart.js
- Horizontal bar chart in chart.js
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- ChartJs bar chart - keep bars left instead of equally spread across the width
- Chart.js horizontal bar width
- Creating a horizontal bar chart extension on Chart.js
- Chart js - Get bar width after render
- How to draw Horizontal line on Bar Chart Chartjs
- Stacked horizontal bar chart along total count with chart.js
- Chart.js: Minimum value for x-axis at horizontal stacked bar chart
- two xAxes horizontal bar chart Charts.js
- Chart Js V2 draw Horizontal Bar(Average) Over Vertical Bar
- ChartJS bar chart fixed width for dynamic data sets
- How to change Chart.js horizontal bar chart Width?
- In Stacked horizontal bar chart how to remove the vertical line in Chart.js?
- to increase space between x axis and first horizontal bar in chart js
- Draw a horizontal bar chart from right to left
- Remove padding from chartJs horizontal bar chart
- Horizontal bar with two yaxes chart js
- Minimum value for x Axis doesn't work for horizontal bar chart | ChartJS
- ChartJS horizontal chart display legend on each bar
- Chart.js horizontal line chart or modified horizontal bar chart
- ChartJS: how to make a bar chart with a horizontal guideline:
- Chartjs 3.x - How to duplicate X axis on both sides of horizontal bar chart with only 1 dataset?
- Stacked Mixed Horizontal Bar Chart in Charts.Js Axes Positioning
- Chart.js - Horizontal line on Bar chart interferes with tooltip
- Chart.js - draw horizontal line in Bar Chart (type bar)
- Horizontal gradient for every single bar in group chart js
More Query from same tag
- Chartjs 3.5.0 - Radar Chart - Converting the labels to images
- keep 2 chart.js contained in a div
- How to create a gantt chart using Chart.js and populate dates?
- bootstrap ui+angular chart: is it possible to disable graph's auto refreshing?
- How can I show percentages when hovering over my chart?
- How to add image to chart.js tooltip?
- Angular-charts/Chart.js is not working
- Bootstrap tab is working but the tab content is not showing
- How to fill background colors on line-charts?
- How to create Chart with 2 variables (x,,y)
- Chart.js rotating x-axis text labels
- Add MQTT topics and data to chartjs
- Group data from CSV (D3.js & Chart.js)
- Chart.js animation triggered only on hover?
- How to assign specific colors to data items in a doughnut chart in Angular Chart?
- Create multiple pie chart simultaneously using chart.js
- Issues with Moment and ChartJS Time Format Parsing
- Chart is not populating when getting the data from AJAX call
- Chart.JS value on top disappear when tooltip show up
- ChartJS - Why is the transition on the first dataset bad?
- Chart JS tooltip and label width is zeroed
- How to chart detected activities on the hour using Chart.js
- Chartjs: customise legend based on background color
- Filter dates from the first day of the month to the current date
- Eror: chart.min.js:13 Uncaught (in promise) Error: Canvas is already in use. Chart with ID '0' must be destroyed before the canvas can be reused
- JSON Data in javascript
- Stacked horizontal chart. How to trigger individual hover in the stacked element?
- Chart js assign default value for y axis
- Multiple add in multiple sql request?
- Click on chart to expand more information - Chart.js