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.

Line overflow over label in Polar chart

See original GitHub issue

I’m submitting a … (check one with “x”)

[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior

In some cases, one line on the Polar chart type is overflowing over the label.

Expected behavior

All the lines should stop right before each label.

Reproduction of the problem

const data = [
              {
                name: 'Sales',
                series: [
                  {name: 'Label A', value: 13020286.77},
                  {name: 'Label B', value: 5849129.05},
                  {name: 'Label C', value: 596483.73},
                  {name: 'Label D', value: 138544.59},
                  {name: 'Label E', value: 452095.72},
                  {name: 'Label F', value: 398695.48},
                ]
              }
            ];

schermata 2017-08-09 alle 14 27 18

There is an overflow on the Label D

Please tell us about your environment:

  • OS: Mac OSX 10.12.5 | Ubuntu 14.10
  • ngx-charts version: 6.0.1
  • angular-cli version: 1.2.1
  • Angular version: 4.2.6
  • Browser: Chrome 60.0.3112.90
  • Language: TypeScript 2.4.1 | ES5

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:6

github_iconTop GitHub Comments

5reactions
style-x7commented, Dec 5, 2017

Hi all,

Found the (possible) bug. The equal sign is missing. Under pie-label.component.ts textAnchor(), it should be “return this.midAngle(this.data) <= Math.PI ? ‘start’ : ‘end’;”

0reactions
esidatecommented, Aug 19, 2020

This is an ugly fix but it works You need to disable css encapsulation by adding encapsulation: ViewEncapsulation.None to @Component({…}) and add this to your css

.pie-label {
  transform: translateY(10px);
}

You can basically style the labels however you want

Read more comments on GitHub >

github_iconTop Results From Across the Web

Highcharts polar label textoverflow - Stack Overflow
When trying to configure a polar chart in highcharts 7.2.0 I am unable to configure the chart to always show labels on the...
Read more >
zAxis.labels.overflow | highcharts API Reference
How to handle overflowing labels on horizontal axis. If set to "allow" , it will not be aligned at all. By default it...
Read more >
[Solved]-Chart.js v3: how to allow tick label overflow?
You could format the first tick to be empty string, using ticks.callback { type: 'time', ticks: { callback: (value, index) => index ===...
Read more >
How to Wrap Long Labels in the X-Axis Scales in Chart.js
With chart js you can make line chart, bar chart, pie chart, doughnut chart, scatter chart, polar area chart, radar chart, gauge chart...
Read more >
Wrapping, truncating, and auto-rotating axis labels - amCharts
Let's start off with a basic chart, that has very long labels on its ... For now, to make our labels wrap we...
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