score:35
Accepted answer
you can see only one chart because the lowest value of your data (75 here) is the scale's left limit.
as shown in the following screenshot of your code's result, if you hover on the scale, you can still see the associated data, which means it is here.
you have two ways to fix this :
set the
min
property of the xscale ticks to the value you want (enough to see it of course) :var mesechart = new chart(mesecontext, { type: 'horizontalbar', data: mesedata, options: { scales: { xaxes: [{ ticks: { min: 60 // edit the value according to what you need } }], yaxes: [{ stacked: true }] } } });
you can see the result with a
min
set to 60 on this jsfiddle :set the
beginatzero
property totrue
, which is the same as settingmin
to 0 :xaxes: [{ ticks: { beginatzero: true } }],
you can see the result with the
beginatzero
property set totrue
on this jsfiddle.
Source: stackoverflow.com
Related Query
- 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?
- Creating a horizontal bar chart extension on Chart.js
- 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
- 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
- How do I create a stacked horizontal bar chart with Chart.js in React?
- ChartJS 2.9.4 can't overlay line data on Horizontal Bar chart
- Chart, X and Y-Axis labels are blurred in horizontal bar chart using chart.js
- Chart Js invisible horizontal bar
- Remove top horizontal line in a horizontal bar chart (Chart.js 2)
- Chartjs duration horizontal bar chart
More Query from same tag
- How to get an attribute of element by jquery
- Chart.js 2.x animation onComplete not responding
- ng2-charts & chart.js - Change background color
- Chart.js - How do I dynamically change bar's stack
- React-chartjs-2: How to display timeline of released dates over 5 past years in Bar Chart?
- Is it possible to draw min / max lines on Chart JS
- Chart.JS Time Axis Not Parsing
- How to stack time charts vertically
- Laravel passing orders to Chart.js
- Implement a cash flow timeline
- How to create a charts in Razor Pages pulling data from the database?
- How to access or get value of specific graph on chart plot by click event?
- How to remove rectangle box next to the legend text in Chart.js
- JavaScript implementation doesnt work (Chart.js)
- Update data from server for ChartJS graph
- Chart.js, how to reduce space between labels and bars (horizontal bar chart)
- ChartJS show gaps in time data
- ChartJS and DiscordJS implementation question
- How to limit number of displayed points in chart.js?
- Angular 2 - Invoking function from a JS file (chart.js) - function not found
- Chart.js: Fill background between two lines
- Can't get event from chartjs-annotation-plugin on mouseenter
- Chart.js: Make part of labels bold
- ChartJs (ver: 2.8.0): Custom tooltip does not hide if clicked (or mouse pointer is moved) outside the chart canvas area
- how to add legend in pie chart
- How to get Chart js labels in scientific notation
- Export HTML content with Chart.jscanvases to PDF
- Laravel - Bootstrap Javascript's conflict with Chart.js
- Add multiple lines as Y axis title in chartJs
- Need to customize graph behaviour