shuopeng
Posts: 3
Joined: Fri Oct 05, 2018 9:37 pm

Chart is out of boundary/area when zoom in

Capture.PNG
Capture.PNG (15.25 KiB) Viewed 505 times
Hi all,

I have a chart out of plotting area problem, as you see above.
When I refresh the page, and zoom in, it is OK. But when I go to other pages and come back, meaning regain the data, and zoom in the chart, it will be out of area.

I already set up clip to true on every where, including options and series.

like:

plotOptions: {
series: {
clip: true
}
}

But it seems not working.

Any reply will be appreciated. I'm desperate :(

Thanks guys!
wojtek
Posts: 433
Joined: Tue Jul 03, 2018 12:32 pm

Re: Chart is out of boundary/area when zoom in

Hi shuopeng,

Could you reproduce this issue online (jsfiddle for example)? Or send me your page, so that I can debug it and find solution/workaround?

Kind regards.
Wojciech Chmiel
Highcharts Developer
shuopeng
Posts: 3
Joined: Fri Oct 05, 2018 9:37 pm

Re: Chart is out of boundary/area when zoom in

wojtek wrote:Hi shuopeng,

Could you reproduce this issue online (jsfiddle for example)? Or send me your page, so that I can debug it and find solution/workaround?

Kind regards.
Hi wojtek,

Sorry I can't reproduce it online. It's part of our existing product, pretty huge. (I live in CA BTW). The library we are using is AngularJS, it's a little complicated.
wojtek
Posts: 433
Joined: Tue Jul 03, 2018 12:32 pm

Re: Chart is out of boundary/area when zoom in

shuopeng,

What version of Highcharts do you use?

Have you tried to destroy the chart instance when a user navigates away from the page? When he comes back the chart should be initialized again.

Kind regards.
Wojciech Chmiel
Highcharts Developer
shuopeng
Posts: 3
Joined: Fri Oct 05, 2018 9:37 pm

Re: Chart is out of boundary/area when zoom in

wojtek wrote:shuopeng,

What version of Highcharts do you use?

Have you tried to destroy the chart instance when a user navigates away from the page? When he comes back the chart should be initialized again.

Kind regards.
Hi Wojtek!

I fixed it!!!!!

I examined every detail, but that didn't help. Then you give me that idea to initialize again. So I rerender the whole DOM when every a user go to that page.

And it got fixed!

By just one line! ( $scope.$apply( ) )

I think it's the DOM thing. Problem because of AngularJS. It's outdated, I know.

But thanks for everything! Ive been trying to fix it for a really really long time! I really appreciate it!

Best,
Shuo
wojtek
Posts: 433
Joined: Tue Jul 03, 2018 12:32 pm

Re: Chart is out of boundary/area when zoom in

shuopeng,

I'm glad you've solved your issues. Good luck!

Kind regards.
Wojciech Chmiel
Highcharts Developer

Return to “Highcharts Usage”