almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.85k stars 1.48k forks source link

Graph2D height and width problem when size changes #534

Closed cdjackson closed 9 years ago

cdjackson commented 9 years ago

Unless I've done something wrong, the issue with the graph2d (#409) height seems to be back. When the height is changed, the grid lines scroll independant to the labels. Also, the width now also seems to have a similar problem is the size is changed...

If I use my original fiddle from November, I can't change the height so easily, but if you change the width of the graph container, you can see wierd stuff happening with the horizontal scale...

http://jsfiddle.net/2u5zdjfe/15/

Chris

cdjackson commented 9 years ago

Another example of the width problem is the example on the angular-vis example (http://visjs.github.io/angular-visjs/#/graph2d). This looks ok at first look, but if you change the width of the browser, then the position of the chart and grid etc are misaligned - the position of one point for example goes from the 21st Oct to the 17th Oct...

bhspencer commented 9 years ago

I believe this is a duplicate of the issue raised here: https://github.com/almende/vis/issues/509

Alex has acknowledged this issue and tagged it as a bug.

cdjackson commented 9 years ago

Yes, only partly though - the width part is a duplicate, but the height part was originally fixed by Alex in the other bug I referenced, and seems to have re-appeared...=

AlexDM0 commented 9 years ago

Hi Chris,

The width resets when manipulating the graph right? Just to check we're looking at the same thing. As for the height.. I'm having trouble seeing what you mean there. I reloaded some code snippets and fiddles from the old issue, but I don't see a problem except the horizontal shifting unless you mean the shifting DURING the resize event? I think that is the same problem as the horizontal shifting. I'll look into it.

Cheers!

AlexDM0 commented 9 years ago

Hi All,

Trickier than I thought it was. I have pushed a fix for both horizontal and vertical to the develop branch.

Cheers!