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.

Chaning values causes view problems

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 If I change chart values and I didn’t set a chart view so it fits automaticlly, the height of the parent divs gets higher everytime. If I set a view, the size stays like it should.

Expected behavior No size changes of the chart or the parent div.

Reproduction of the problem file.html <ion-grid> <ion-row> <ngx-charts-gauge [scheme]="colorSchemeGauge" [results]="auslastung" [min]="0" [max]="100" [angleSpan]="240" [startAngle]="-120" [units]="'Auslastung in %'" [bigSegments]="5" [smallSegments]="3"> </ngx-charts-gauge> </ion-row></ion-grid>

file.ts

higher(){ var buffer = this.auslastung[0].value+5; this.auslastung=[{"name":"Temperatur", "value": buffer}]; }

trigger this function, doesn’t matter how.

What is the motivation / use case for changing the behavior? No destroyed view and easy value changing.

Please tell us about your environment: Win 10

  • **ngx-charts version:**6.1.0
  • Angular version: 2.x.x

@angular/animations”: “4.4.3”, “@angular/cdk”: “2.0.0-beta.11”, “@angular/common”: “4.4.3”, “@angular/compiler”: “4.4.3”, “@angular/compiler-cli”: “4.4.3”, “@angular/core”: “4.4.3”, “@angular/forms”: “4.4.3”, “@angular/http”: “4.4.3”, “@angular/material”: “2.0.0-beta.11”, “@angular/platform-browser”: “4.4.3”, “@angular/platform-browser-dynamic”: “4.4.3”, “d3”: “^4.11.0”,

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript 2.3.4 | ES6/7 | ES5]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
NatoBoramcommented, Jul 18, 2019

Here’s an updated stackblitz with that example: https://stackblitz.com/edit/angular-dkmxg5?file=app%2Fapp.module.ts

It shows me an empty project

2reactions
marjan-georgievcommented, Oct 26, 2017

You can still do that. Just add a div around the chart and set its width and height to 100%.

As I said, the chart measures it’s parent container’s dimensions. When you use flex box, the dimensions of the containers depend on the dimensions of the contents. With ngx-charts it’s the other way around, so if you don’t have any dimensions set to the container, the chart will measure the dimensions of an empty container.

Here’s an updated stackblitz with that example: https://stackblitz.com/edit/angular-dkmxg5?file=app%2Fapp.module.ts

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to correct a #N/A error in the VLOOKUP function
This topic describes the most common VLOOKUP reasons for an erroneous ... Problem: The lookup value is not in the first column in...
Read more >
What could cause a variable to change value? - Stack Overflow
Incorrectly using a single equal sign (assignment) instead of a double equal sign (comparison) in an if statement is a good way.
Read more >
Why does changing my copy change the original! - JErickson.net
Have you ever been working on your JavaScript code and changing the value of an object you were sure that you made a...
Read more >
Excel VLOOKUP not working - fixing #N/A and #VALUE errors
Solution: When VLOOKUP is returning an #N/A error while you can clearly see the lookup value in the lookup column, and apparently both...
Read more >
15 Easy Solutions To Your Data Frame Problems In R
There are two main ways in which you can access and change these values. In this section, you'll see and practice both of...
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