chronograf icon indicating copy to clipboard operation
chronograf copied to clipboard

Layout issues

Open nhaugo opened this issue 10 years ago • 11 comments

Two issues in this ticket

When there are multiple graphs trying to place themselves in the 0,0 position then stack vertically instead of filling the horizontal space first then moving to the next row.

vert

In a single template when a new row starts it overlaps with the row about it.

overlap

The first can be reproduced by using the attached templates cpu_0fa47984-825b-46f1-9ca5-0366e3281cc5.json, mem_4a805493-f7ef-4da0-8de8-e78afd899722.json and load_ec6c48f4-48ca-4ba7-a842-5b700e19f274.json

The second with the file system_060227b4-b7eb-49b6-820b-608ebf32409e.json

nhaugo avatar Nov 06 '16 19:11 nhaugo

Hey @alexpaxton, do you think you've got any quick fixes for this?

toddboom avatar Nov 07 '16 05:11 toddboom

Also, it looks like @jademcgough is taking a look at this one, so maybe sync up with her if you're not sure where to dig in. Thanks!

toddboom avatar Nov 07 '16 05:11 toddboom

screen shot 2016-11-06 at 9 56 11 pm

I can't repro the second bug. I'm on my 15" laptop screen so it could be the screen size, but I've tried changing my resolution and browser zoom and it does a good job of resizing whatever I do.

Are you running off of the master branch? Looks a bit like the bug I fixed on Friday (which hasn't been merged into develop).

imogenkinsman avatar Nov 07 '16 06:11 imogenkinsman

I'll come back to that in a bit and see if I can repro, but going to look into the first issue now.

imogenkinsman avatar Nov 07 '16 06:11 imogenkinsman

The second is inexplicably reproducing for me now, working on a fix.

imogenkinsman avatar Nov 07 '16 06:11 imogenkinsman

I'm altering the row height to adjust for the overlap issue (e43d814052cdc42201683664c5e7f5ac0f6af3cb). Please keep in mind, when creating layouts, that we are using a fixed height currently (which is fine, because dygraphs default to a 320 pixel height). The "h" value in the layout should always be 4.

imogenkinsman avatar Nov 07 '16 07:11 imogenkinsman

It's possible that I'm missing something, as I'm not super familiar with the react-grid-layout library, but I can't find any configuration options for changing the way items stack when placed in the (0,0) position. I think they intend for positions to be preset in the layouts, so it's a little unusual that we're dynamically bringing in layouts.

I just created a branch (https://github.com/influxdata/chronograf/tree/fix/horizontal-graphs) which sets positions programmatically. They'll always be consistent in their position (for a given group of layouts), but you won't be able to set the position for graphs in the layout anymore. It feels a little hacky to me, but it works.

imogenkinsman avatar Nov 07 '16 08:11 imogenkinsman

Hacky but working sounds like exactly what we need right now.

kfitzpatrick avatar Nov 07 '16 18:11 kfitzpatrick

@nhaugo is fine with the positioning fix. I'm going to merge it in and close this issue.

imogenkinsman avatar Nov 07 '16 19:11 imogenkinsman