score:0
You can just use the borderRadius
property with a stacked x axes like so:
const options = {
type: 'bar',
data: {
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
datasets: [{
label: '# of Votes',
data: [3, 5, 3, 5, 2, 3],
backgroundColor: 'orange',
borderSkipped: false,
borderRadius: 20,
},
{
label: '# of Points',
data: [7, 11, 5, 8, 3, 7],
backgroundColor: 'pink',
borderSkipped: false,
borderRadius: 20,
}
]
},
options: {
scales: {
x: {
stacked: true
}
}
}
}
const ctx = document.getElementById('chartJSContainer').getContext('2d');
new Chart(ctx, options);
<body>
<canvas id="chartJSContainer" width="600" height="400"></canvas>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.7.1/chart.js"></script>
</body>
Source: stackoverflow.com
Related Query
- How do you create rounded corners on the top and bottom of a bar chart and the between 2 part still draw like image?
- how to write labels along with data on top and bottom of each stack in bar chart
- How to put rounded corners on a Chart.js Bar chart
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- ChartJS Line chart cut off at the top and bottom
- Add a custom label to the top or bottom of a stacked bar chart
- How to show data values in top of bar chart and line chart in chart.js 3
- How to create a chart that uses strings for both the X and Y axes?
- how can i use chart.js to create a chart that has one time series line and one linear line on it at the same time?
- How to add labels on top of the chart bar with Chart.js 2
- How can I reduce the spacing between my legend and chart proper in my Chart.JS bar chart, and increase it in the graph area?
- How to show symbols after the label and before the numeric value using chart.js Bar chart in Angular
- ChartJS - would like to create a mixed chart with horizontal Bar and a dot to represent the answer from the current user
- How do remove the bottom scale on a Chart.js bar chart
- How to add custom text inside the bar and how to reduce the step size in y axis in chart js( Bar chart )
- How to create rounded bar graph with Angular 7 and Chartjs (v2)
- How to create chart.js vertical bar chat with rounded corners in angular 6?
- How can i get the Chart JS Bar Graph Bar Label and Value on click?
- how to create bar chart with group and sam color for each group using chart.js?
- How to create rounded bars for Bar Chart.js v2?
- How do you hide the title of a chart tooltip?
- How to add second Y-axis for Bar and Line chart in Chart.js?
- How to create stacked bar chart using react-chartjs-2?
- Show X axis on top and bottom in line chart rendered with Chart.js 2.4.0
- chartjs - top and bottom padding of a chart area
- How can I remove extra whitespace from the bottom of a line chart in chart.js?
- Remove the label and show only value in tooltips of a bar chart
- Create a rounded bar graph with Angular and chartJS
- Chart js: how can I align the legend and the title
- PrimeNg bar chart how to show a label for the y-axis
More Query from same tag
- Display Date Label in axes - chart js/ng2 charts
- chartjs creating equilvant background like in chartjs.org
- Angular Chart.js Bar Chart
- how to highlight a specific area on chartjs line chart
- Updating chart.js with a dataset of different size not working
- Charts.js - Colors for stacked bar on multi-series line/bar chart are not working
- Chart.js: Set different options to datasets
- How to use images as key for chart.js legend
- Chart.js Version 3: how to set the different color for tick lines and gridlines
- Chart disappears just after finishing animation
- ChartJS onclick fill area (Radar Chart)
- Chart.js - Hide tooltip caret
- ChartJS dynamic label
- drawing bar chart with chart.js jQuery
- How to adding data in loop and display chart dynamically like in live (chart.js & typescript & angular)?
- refresh chart data every second javascript
- JavaScript variable in an object
- Customize Chart js dataset data
- Chart.js v2: How to make tooltips always appear on pie chart?
- Prevent the wiping of an Array after routing Angular.js
- How to resize chartjs in bootstrap columns for different browsers
- How to configure linear labels in Time Cartesian Chartjs?
- Print pie chart in chartjs
- disable legend charts.js when width < yyy px
- Angular .subscribe executes at the end after the ngOnInit
- ChartJS v3 Migration: how to define annotation plugin?
- How to change the default barchart colour in chart.JS and angular 7?
- Chart.js 3.x not able to display data on chart
- Re-render (or animate) chart.js chart on transition within deck.js
- How to make Chart JS responsive?