question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve bar chart borderRadius

See original GitHub issue

As you can see, the endingShape & startingShape are very ugly for bar chart.

plotOptions: {
  bar: {
    horizontal: false,
    columnWidth: '50%',
    distributed: true,
    endingShape: 'rounded',
    startingShape: 'rounded',
  },
},

image image

Please change ‘flat’ or ‘rounded’ to number (or add the possibility to use number) to create custom border radius for bar column. For example (similar in HighCharts): https://github.com/highcharts/rounded-corners & https://jsfiddle.net/BlackLabel/tdp1y0wb or https://github.com/bellstrand/highcharts-border-radius

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
marssantosocommented, Mar 29, 2021

Can borderRadius accept percentage @junedchhipa? The current implementation looks weird especially when the column width changes.

Here is what I want. Basically perfect round corners.

image

But here it is when the column width becomes too large.

image

It gets even weirder when the column width gets too small.

image

Thx for the great lib btw.

Edit: I suppose the workaround for this is to set the responsive options accordingly (which is what I’m doing currently). But wouldn’t it be great if it just works as expected without tuning more options.

0reactions
Thimowscommented, Mar 31, 2021

+1

Percentages for the borderRadius will make way more sense. Having these same issues as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bar Chart Border Radius | Chart.js
Open source HTML5 Charts for your website. ... Bar Chart Border Radius ... title: { display: true, text: 'Chart.js Bar Chart' } }...
Read more >
How to put rounded corners on a Chart.js Bar chart
Starting on Chart.js v3 you can just specify borderRadius: NUMBER on the dataset.
Read more >
Stacked bar chart with borderRadius only rounds the last dataset
Expected Behavior. All bars should be rounded on all edges. Using borderRadius=500, and borderSkipped=false. On chartjs 3.1.0
Read more >
plotOptions.bar.borderRadius | highcharts API Reference
The maximum allowed pixel width for a column, translated to the height of a bar in a bar chart. This prevents the columns...
Read more >
Bar Charts | Google Developers
Like all Google charts, bar charts display tooltips when the user hovers over the data. For a vertical version of this chart, see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found