superset icon indicating copy to clipboard operation
superset copied to clipboard

For bar charts, widths of 'row chart-container' are 20px larger than that of slice cell's

Open fufjvnvnf opened this issue 9 years ago • 10 comments

Make sure these boxes are checked before submitting your issue - thank you!

  • [x] I have checked the superset logs for python stacktraces and included it here as text if any
  • [x] I have reproduced the issue with at least the latest released version of superset
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

0.18.5

Expected results

Like other graphs, these two components have the same size and scrolling bar shouldn't be necessary in the usual cases.

Actual results

chart-container slice-cell As shown by the pictures, because of the difference in size, unnecessary scroll bars are required and annoy users. On an other kinds of visualization types, as long as the box is big enough, the two widths for these two components are all equal.

Steps to reproduce

Create any kind of bar chart (distribution or time series) and inspect web page elements with developer's tools.

Edit

I've spent the entire morning inspecting this peculiar bug, but have no idea how row chart-container's width is set. row chart-container is created by SliceCell in SliceCell.jsx as a normal html tag, not specifying its width, so I guess its width is set automatically, but I've no idea why bar and dist_bar are the only special ones. I checked ndv3_vis.js and indeed these two bars are "special" since they call the function barchartWidth to set their widths, but after some manipulations on that function I diagonalize that this does not cause the bug.

fufjvnvnf avatar Jul 14 '17 03:07 fufjvnvnf

I think this is at least the third issue open for the same problem.

xrmx avatar Jul 14 '17 08:07 xrmx

@xrmx Could you guide me to those issues please? I think I did a pretty thorough search on previous issues and did not find similar issue.

fufjvnvnf avatar Jul 14 '17 08:07 fufjvnvnf

These: https://github.com/apache/incubator-superset/issues/2913 https://github.com/apache/incubator-superset/issues/3069

One PR that would fix them all would be much appreciated :)

xrmx avatar Jul 14 '17 08:07 xrmx

@xrmx Add below code in CSS templates can remove the scrollbars: .row{ margin-right:0px; } 1

luciuschina avatar Jul 31 '17 08:07 luciuschina

horizontal scroll bar removed! thanks! any idea about how to remove it?

Thanks!

olbapito avatar Aug 10 '17 21:08 olbapito

Hello, Thanks for this idea but all my other slices in my dashboard now have the margin right and the design is not that good now. Is there any way to impact only the slice who have the problem ? or have the all viz style reviewed ? Thanks a lot for your help :)

Tiji avatar Oct 25 '17 09:10 Tiji

I've added that code to the CSS area in my dashboard settings but my tables still have scroll bars (although the bar charts no longer have scroll bars).

image

csc5k avatar Nov 20 '17 11:11 csc5k

It can be solved in Bar Chart/Trendline where you have an X/Y axis in Slice go to X axis or Y axis and change margin auto to any other value(check which fits your chart)

vishalg1994 avatar Mar 29 '18 10:03 vishalg1994

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 10 '19 10:04 stale[bot]

It's quite annoying to have scrollbars where they're not needed. I've temporarily resolved the unneeded vertical scrollbar by adding the following to the Dashboard CSS:

.dashboard-component-chart-holder {
    height: auto;
}

I do not know the side effects of doing so.

omaraboumrad avatar Jan 26 '21 10:01 omaraboumrad