I am trying to use the overview diagram in conjunction with my diagram.
However when ever I set the overview.observed property, I start getting errors in the console (I’m using Chrome)
Uncaught Error: Shape.strokeWidth must be a real number and not NaN or Infinity: Infinity go-debug.js:20
u.g go-debug.js:20
u.i go-debug.js:21
u.defineProperty.lz go-debug.js:920
$i go-debug.js:702
Yi.hs go-debug.js:702
si go-debug.js:597
$g go-debug.js:586
(anonymous function) go-debug.js:586
I haven’t set anything yet when I get this error, and the call stack indicates it is not coming from my code.
Any suggestions on how I can debug this and see what property on my main diagram is causing this issue?
Hi. What do you mean by “I haven’t set anything yet when I get this error”? Are you saying that the Diagram that you are setting Overview.observed has not been initialized yet? If so, does everything work OK if you set Overview.observed after initializing the Diagram?
Apologies for the lack of clarity. What I mean is that the diagram has not been displayed yet. When I re-read what I posted I realise it is very vague!
The diagram has been setup, and the data has been loaded into the model. Only after that do I setup the overview. The error only occurs when setting Overview.observed to my initialised and loaded diagram.
I can step over the setting of the Overview.observed property, through the debugger in Chrome, and no errors appear in the console. If I continue execution (F8), then errors appear in the console, but not when my code is setting anything, if that makes sense.
I will try re-produce with a smaller sample, however I’m not sure where to start isolating the problem because the error is not triggered from my code anywhere.
Sure I will try! I’ll download the OrgChartStatic sample, and see if I can reproduce it on that example. I’m sure it is because I am doing something stupid, and not reading the documentation again…
I will have to try tomorrow, and I’ll get back to you as soon as possible.
Ok I think I may solved the issue for me. I think the div that holds the overview needs to have a pre-set height when the overview is created. In my case before I initialised the overview, the height of the div was 0. If I preset the height, then it all works fine.