score:0
Accepted answer
to solve it, i scale the y axis to min value 0:
<script>
var barcontratsibs = {
labels: ['marché a', 'marché b', 'marché c'],
datasets: [{
label: 'les études d’exécution',
backgroundcolor: '#660066',
data: [7, 10, 8]
}, {
label: 'les études de fabrication, l’approvisionnement et la fabrication',
backgroundcolor: '#660066',
data: [5, 10, 8]
}, {
label: 'la livraison et le montage sur site',
backgroundcolor: '#660066',
data: [6, 10, 8]
}]
};
var _options = {
scales: {
yaxes: [{
ticks: {
suggestedmin: 0
}
}]
}
};
var ctxcontratsibs = document.getelementbyid("canvascontratsibs");
var mybarchart = new chart(ctxcontratsibs, {
type: 'bar',
data: barcontratsibs,
options: _options
});
Source: stackoverflow.com
Related Query
- Why is Chart js first bar too small or not showing at all?
- Chart.js: bar chart first bar and last bar not displaying in full
- chart js chart bar chart not showing data from 0
- ChartJS not showing data for time series bar chart
- Chart.js colors in bar chart not showing
- Bar chart from Chart.js not showing the second dataset
- Pie Chart using chart.js not showing up but bar charts are?
- chart.js first bar is not showing
- Chartjs Bar Chart showing old data when hovering
- Chart.js ng2-charts colors in pie chart not showing
- Chart.JS Mixed Chart - Bars Not Showing
- Line chart is showing under bar in combochart in chartjs
- ChartJS bar not showing up for simple data points
- Showing Percentage and Total In stacked Bar Chart of chart.js
- Series Details Not Showing in Angular Chart with Charts.js
- Last value not showing in bar graph of charts.js-library
- Chart.js pie chart not showing in Google Chrome canvas
- Chartjs bar dataset label not showing
- Chart JS custom tooltip not showing
- to increase space between x axis and first horizontal bar in chart js
- Chart JS not showing On hover with small data
- Chart.js tooltip not showing on line chart
- ChartJS: Horizontal Bar with multiple datasets not showing Bars
- chart annotations not showing in Angular 2
- Chart.js Date and Time Bar Chart Not Rendering - Line Works Though
- Bar Chart of ChartJS does not Render
- Vertical Bar Chart not displaying Correctly
- Chart JS not showing all data
- Chartkick-vue bar chart - "horizontalBar" is not a registered controller
- Legend not displaying on Line or Bar chart - React-Chartjs-2
More Query from same tag
- Remove top horizontal line in a horizontal bar chart (Chart.js 2)
- Chart.js positive/negative values fill with out twist
- Disable Charts.js animations in Polymer?
- How can I add shadow color below the line in chart.js charts?
- Rendering a chart.js component twice in a page
- How to show stacked and unstacked bar graphs together in Chart.js
- Charts.js doughnut
- Chartjs - Set start and end value into a Bar Chart
- Horizontal BarChart with labels and additional text
- ChartJS with React: Only one value showing on time chart
- In chartjs format of ticks
- Limit data points with chart js
- react-chartjs-2 Line Chart not updating with State
- ChartJs bar chart bar value displaying lower then Y axis value in pdf?
- Charts.JS - Too Many Charts? - Loading Issue
- Chart.js: hide dataset line but keep ticks on y-axis?
- ChartJS v2: Scale value at click coordinates (time scale)
- ChartJS: Full Date for xAxis Labels?
- chartJS - points overplotting, jittering, noise?
- mysql sum query for chartjs
- Chart.js Passing an array starting with 1 instead of 0 problem
- ChartJS add tooltip to a grouped bar chart
- End x-axis on last data point (scatter plot) for x,y numeric values
- How to filter Chart JavaScript Dashboard by Year through dropdown after the MySQL count query?
- How call a function when my array is filled
- Can I plot random points on a chart.js or Google Charts chart?
- chart js with angular2 loading dynamic data only after zoomin
- Chart.js passing value data dynamic
- Is there a way to align title and legend on the same line?
- PrimeFaces: ChartJs stacked bar chart label removal