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.

[ngx-advanced-pie-chart] legend goes outside parent container

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

When the parent container of the ngx-advanced-pie is bigger than the pie itself, the legend is displayed under the pie-chart.

ngx-advanced-pie-chart_bug

I think this has to do with

.advanced-pie-legend {
    float: left;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
}

Expected behavior

I would expect the legend to always be displayed next to the chart. This should fix it.

ngx-charts-advanced-pie-chart{
 position: relative;
}

Reproduction of the problem

See: https://plnkr.co/edit/?p=preview (full-screen)

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Windows 10
  • Chrome Version 55.0.2883.87 m (64-bit)
  • ngx-charts version: 4,0,0

D:\dev\bereslim\bsm-ui>ng --version

                             _                           _  _
  __ _  _ __    __ _  _   _ | |  __ _  _ __         ___ | |(_)
 / _` || '_ \  / _` || | | || | / _` || '__|_____  / __|| || |
| (_| || | | || (_| || |_| || || (_| || |  |_____|| (__ | || |
 \__,_||_| |_| \__, | \__,_||_| \__,_||_|          \___||_||_|
               |___/
angular-cli: 1.0.0-beta.25.5
node: 6.9.1
os: win32 x64
@angular/common: 2.4.4
@angular/compiler: 2.4.4
@angular/core: 2.4.4
@angular/flex-layout: 2.0.0-beta.3
@angular/forms: 2.4.4
@angular/http: 2.4.4
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.4
@angular/platform-browser-dynamic: 2.4.4
@angular/router: 3.4.4
@angular/compiler-cli: 2.4.4

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
marjan-georgievcommented, Jan 26, 2017

Got it, I see it now, thanks! Pushed a fix.

1reaction
amcdnlcommented, Jan 25, 2017

Regression from latest release likely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular ngx-charts options for customizing the Legend?
There don't seem to be options for customizing the legend fields (there's a more customizable legend in the advanced pie chart, ...
Read more >
swimlane/ngx-charts - Gitter
Hi, I am trying to implement the percentageFormatting functionality in Advanced Pie Chart. I created the function which will return rounding after 2...
Read more >
Advanced Pie Chart - ngx-charts - GitBook
the dimensions of the chart [width, height]. If left undefined, the chart will fit to the parent container size. results. object[]. ​. the...
Read more >
@swimlane/ngx-charts - npm
Start using @swimlane/ngx-charts in your project by running `npm i @swimlane/ngx-charts`. There are 333 other projects in the npm registry ...
Read more >
How to Adjust the Position of a Matplotlib Colorbar?
It is the legend for colors shown in the chart. ... the position is modified by providing location options concerning the parent box....
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