-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resizing to screen size #550
Comments
I had a lot of troubles with this too, and had to go back from 1.0 to 0.0.13 to fix it. |
I found a solution to resolve it. I added a simple timeout to process the constructor method as late possible at line 33 of highcharts-ng.js file. This worked for me. |
Hi brunowebdev, would you be able to share your fix, please? I've encountered exactly the same issue and wondering if there's an easy fix. Thanks |
+1 |
Hi, The problem is coming when the code change from a directive to a component. The reflow() function of Highcharts do not work because the code is not able to get the correct width and height of HTML element When Highcharts fail to detect the size, the chart is set to 600,400 even during a reflow(). @brunowebdev : I try your fix (c5295f5) but it fail under $doCheck method because under line 51 ctrl.chart is not defined due to the timeout. |
Hi, I'm looking into this. There is a css fix here: http://jsfiddle.net/pablojim/LnkgL135/48/ |
@pablojim : it works for me |
@pablojim : it works with me but I am stuck trying to enable animation with no luck. |
Nice!
Try it. I was implemented this on Fuse Angular template and I have troubles to render highcharts.
… On 31 Jan 2017, at 13:45, Ihab Adly ***@***.***> wrote:
@pablojim <https://github.com/pablojim> : it works with me but I am stuck trying to enable animation with no luck.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#550 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AITtRysbVyqNAzsK7pUow8K6PsSpMMRDks5rX1cJgaJpZM4LjxAr>.
|
None of the solutions here were working for me. I'm using highcharts-ng in a nested view with ui-router and angular material. I was able to get this working in my controller as follows: function WidgetCtrl ($scope) {
var vm = this;
vm.highChartConfig = { ... };
$scope.$on('$viewContentLoaded',
function () {
vm.highChartConfig.getChartObj().reflow();
}
);
} Kind of hacky but its working! |
) fix resizing bug with bootstrap and angular material - fixes #550 - fix(resize) : update readme and add a jsfiddle - update repo url
Hi all, @houssemba has committed a fix for this that has now been merged to master. Can you have a look to see if that solves your issue? |
I am not sure if I experience the same issue. I would like the chart to adapt to changing window width. In this example I have built two charts: the top one (vanilla Highcharts API) reacts correctly, but the bottom one has the fixed width all the time (expected that it extends/shrinks). |
@dmak add |
@houssemba: Many thanks, it helped. |
After updating to latest version the resizing to screen size is not working with normal bootstrap.css
Expected Behaviour
The chart in previous versions resizes according to screen size using typical bootstrap.css
After latest update, it only resizes if using bootstrap-combined.css
Current Behaviour
Resizing is not working
Possible Solution
Steps to Reproduce & Link to Example
Context
Your Environment
The text was updated successfully, but these errors were encountered: