question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • 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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
luciuschinacommented, Jul 31, 2017

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

0reactions
omaraboumradcommented, Jan 26, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

For bar charts, widths of 'row chart-container' are 20px larger ...
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...
Read more >
Chart Container - Concepts - Handbook - Apache ECharts
While initializing, import the chart into the node. Without declaring opts.width or opts.height , the size of the chart will default to the...
Read more >
23 Using Chart Components - Oracle Help Center
The chart components include area, bar, bubble, combination, funnel, line, pie, scatter, spark, and stock charts. The chapter defines the data requirements, tag ......
Read more >
Visualization: Column Chart - Google Developers
A column chart is a vertical bar chart rendered in the browser using SVG or VML, whichever is appropriate for the user's browser....
Read more >
plotOptions.column.pointWidth | highcharts API Reference
The maximum allowed pixel width for a column, translated to the height of a bar in a bar chart. This prevents the columns...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found