Open jtushar53 opened 7 years ago
@marjan-georgiev We are also seeing this at times in our production app. Is there a workaround for this? Is there anything new that has been learned since the posting of this issue in April?
I was able to get it to be consistent at 1200x328 and selecting "Fit Container".
Chrome dev tools is showing that the ngx-charts SVG element is 666x228.
I have faced the same issue, it seem like it's a bug with responsive break point. I guess we can find out something in calculate functions for chart size in the src/utils folder.
Thanks for helping to reproduce this, @StanFisher
This seems to be happening because of this: https://github.com/swimlane/ngx-charts/blob/master/src/bar-chart/bar-vertical.component.ts#L37
The charts needs to measure the axes width and heights after they have been rendered, and update its dimensions to make room for them, after which it updates. There is something about these particular dimensions that causes this feedback loop to never end, resulting in the flicker we are seeing.
Also seeing this problem -- on production app. Any plans to continue the investigation/fix? Thanks
First time posting, forgive the lack of introduction: I have encountered this issue as well. I understand that it is quite a challenge to solve for all cases, but I have a thought on this matter: If the calculation for tilting the text in either direction yields no positive result, could you shrink the font, further reduce the number of characters allowed, or place the text within the bar itself?
@marjan-georgiev @jtushar53 is there any update on regards to the resolution of this issue? the character solution limitation suggested above could be a simple and good way to resolve it. Any other solution in mind? are you planning to resolve this issue? thank you very much!
@jchamma i am as of now living with it.
Is there any update on this issue? At least is there any workaround for this ?Seeing the same issue on grouped bar charts as well.
It looks like this bug only occurs when the chart doesn't have enough height. Make it taller to a point, and the problem goes away.
@heshiming i don't sure that the height is the problem, in some situations the chart flickering when the height is tall enough but the width is thin, my guess is the flickering happens when the xAxisTicks need to rotate for fits themselves to the chart size, but there isn't enough space.
I too have the same issue,in which i have some negative values in data. translate(height,width) function on svg element is changing continuously.
Please update the issue ASAP.
Any updates on this issue?
It also happens on the Kubernetes Dashboard. https://www.youtube.com/watch?v=7OhzK_w4u4Q https://i.imgur.com/542tkIa.mp4
Ref: https://github.com/kubernetes/dashboard/issues/5050 https://github.com/kubernetes/dashboard/issues/5101 https://github.com/kubernetes/dashboard/issues/5102 https://github.com/kubernetes/dashboard/issues/5106 https://github.com/kubernetes/dashboard/issues/5118 https://github.com/kubernetes/dashboard/issues/5236
In all this issue you can find an infinite way to reproduce the problem.
The Kubernetes dashboard is a fairly visible project. Is there room for someone to solve this problem shortly?
@marjan-georgiev @Hypercubed Can you please plan somehow to solve this problem? Thank you.
Has anyone found a solution for this problem? I am having this in Production and I am not able to change the size of the chart to prevent it. PLEASE HELP!
The only way we found was to remove x axis labels when the chart had a problematic size.
@Zanhix Thanks for the reply, but unfortunately I can't do that. The customer is expecting some labels.
Hi, my workaround:
1) inside Your project make local copy of chart component (for example: https://github.com/swimlane/ngx-charts/blob/master/projects/swimlane/ngx-charts/src/lib/bar-chart/bar-vertical.component.ts (remember to change component name and selector, for example: 'MyBarChartComponent' and 'my-bar-chart' respectively)
2) in your current template, change from <ngx-charts-bar-vertical/>
to <my-bar-chart/>
3) on Your local copy (MyBarChartComponent) comment this.update()
in updateXAxisHeight
method
It serves my need, i mean i did not spot any lack of functionality or any visual side effect of removing this "update" operation. Updates are triggered by many other sources, so chart still scales smoothly despite lack of "update" operation in some circumstances.
Nonetheless its ugly workaround:
But at least flickering has gone.
@marjan-georgiev @Hypercubed @nelsonGuti any update on this?
@surya-pabbineedi @jogaj @mgilroy, any update on this?
@ddzingielewski, couldn't create a PR with your workaround make sense?
I'm submitting a ... (check one with "x")
Current behavior
chart flickers as per the attachment. currently tested on vertical bar chart. Also on other machines not able to reproduce.
Expected behavior
it should resize as as per container Reproduction of the problem
we've been trying to implement it in angular-gridster2 widgets. we have removed view attribute and it fits to container. When we make the widget big chart renders as expected and fit to widget but when we make the widget small it start flickering.
note: When widget resize chart doesn't fit to container, we had to add window.dispatchEvent(new Event('resize')); to the widget's resize callback. Please tell us about your environment:**
Windows 7 Display - 1366 x 768
ngx-charts version: 5.1.2
d3: 4.8.0
Angular version: 4.0.2
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 ]
Chrome 58.0.3029.81
Language: [all | TypeScript X.X | ES6/7 | ES5] Typescript 2.2.0