Template talk:Bar box

Margins
I have deployed the fix of tright to skins other than monobook now. White borders are no longer used for the margins, and true margins have been added, fixing this template for uses in skins other than Monobook. —Th e DJ (talk • contribs) 20:22, 17 January 2010 (UTC)

Problems with Chrome
This template seems to have graphical issues with Google Chrome. It does not show bars smaller than 1% (other browsers do) and words are closer to its margins. --95.236.227.241 (talk) 12:48, 3 June 2012 (UTC)

How to insert vertical gap?
Sometimes the items have a inherent grouping (spring/summer/... smoker/non-smoker whatever). A small vertical space would make the structure obvious to the viewer. Bar box does not seem to support this feature (empty line(s), br token, empty items - none of these seem to work). How can it be done? --HeWhoMowedTheLawn (talk) 19:14, 21 August 2012 (UTC)
 * is this what you want? Frietjes (talk) 21:04, 21 August 2012 (UTC)

or this


 * Yes! Great!) Thanks. I'd likely prefer the first (to my taste height=8 seems enough for a clear separation) --HeWhoMowedTheLawn (talk) 17:59, 22 August 2012 (UTC)

How to add values to the "right1" column ?
Is there any way to add values to the "right1" column without using two "percent bars" like in the "election results" example ? I have tried everything I can to make it show as I want it to show (that being showing percent in the "right1" and additional info in the "right2"), but for some reason it will simply not display any information in the "right1" no matter what and where I place the data, it just defaults to the "right2" and will not add anything to the "right1"... or maybe I'm doing something wrong here :/ Also, is there a way to increase the "width" of the bars themselves, since at the moment even with 100% they are too short, I have tried adding "width= " but it doesn't seem to do anything...


 * you can set the bar width using barwidth. Frietjes (talk) 20:32, 9 September 2015 (UTC)
 * PYX-340, updated your example with the new note. Frietjes (talk) 20:47, 9 September 2015 (UTC)
 * Thank you very much good sir ! PYX-340 (talk) 22:58, 9 September 2015 (UTC)

How to use comma as decimal divider?
How to use comma as decimal divider not dot? Softy (talk) 15:09, 26 November 2015 (UTC)
 * see MOS:DECIMAL. Frietjes (talk) 17:15, 30 November 2015 (UTC)

Narrow color bar mobile version wrap issue
On mobile version when the color bar effective width value is small enough, the color bar appears to be twice higher. —Mykhal (talk) 17:18, 22 October 2017 (UTC)

A fix: Template_talk:Bar_percent —Mykhal (talk) 17:32, 22 October 2017 (UTC)

Does this template accepting stacking?
Like { { Graph:Chart | type=stackedrect } }, but horizontal. — Guarapiranga (talk) 08:23, 30 September 2019 (UTC)
 * Found what I wanted, here. — Guarapiranga (talk) 02:25, 1 October 2019 (UTC)
 * You could also use bar stacked. Alexiscoutinho (talk) 20:41, 3 March 2020 (UTC)

Consensus about paddings and alignments
Every bar template has a different way of adding padding and aligning the 1st, 2nd, 4th and 5th columns. We need to reach a consensus. Which padding scheme do you prefer? A) | 0.4+0.4em 1st-col 0.4+0.4em 2nd-col 0.4   em | BAR |     0.4em 4th-col 0.4+0.4em 5th-col 0.4+0.4em | B) | 0.4+0.4em 1st-col 0.2+0.2em 2nd-col 0.4    em | BAR |     0.4em 4th-col 0.2+0.2em 5th-col 0.4+0.4em | C) | 0.4   em 1st-col     0.4em 2nd-col 0.4    em | BAR |     0.4em 4th-col 0.4    em 5th-col     0.4em | D) | 0.4+0.4em 1st-col 0.4+0.4em 2nd-col 0.8    em | BAR |     0.8em 4th-col 0.4+0.4em 5th-col 0.4+0.4em | N) | 0.4+0.4em 1st-col 0.4+0.4em 2nd-col 0.4+0.4em | BAR | 0.4+0.4em 4th-col 0.4+0.4em 5th-col 0.4+0.4em | Which text-align scheme do you prefer? A) | left  right  | BAR |  left  right  | B) | left   left  | BAR |  left   left  | C) | right  right  | BAR | right  right  | D) | center center | BAR | center center | Alexiscoutinho (talk) 21:18, 3 March 2020 (UTC)
 * Not sure what either look like – could examples be given for each option please? WT79 The Engineer (talk) 14:59, 19 April 2020 (UTC)



Looking this way, I think padding scheme  is the best because it leaves the columns symmetrical and the spaces between info constant! I wonder if its third  can be merged with the child  ... Using this scheme to compare the text-align schemes:

I personally like scheme, but, as a default, I think   would be more appropriate. Opinions? Alexiscoutinho (talk) 20:13, 23 September 2020 (UTC)
 * Thanks. I think I have the same opinion about padding, but I think I prefer  for the text alignment – it looks weird having the bar different to the rest of the column, but in most graphs this is how you would want it. WT79 (speak to me &#124; [//xtools.wmflabs.org/ec/en.wikipedia/WT79 editing patterns] &#124; [//xtools.wmflabs.org/globalcontribs/WT79 what I been doing]) 06:54, 24 September 2020 (UTC)

Template-protected edit request on 3 March 2020
Make left1, left2, right1 and right2 have dynamic colspan to match the bar templates. See Bar stacked's lines 2 and 3, for example. This is important because, without it, it's impossible to centralize a single left column header (as seen in this template at the "Date"). Furthermore, the current implementation creates a dummy space if the column is not used (as seen in here on the right side of "# of cases (including C.D.)"). Alexiscoutinho (talk) 22:15, 3 March 2020 (UTC)
 * Red information icon with gradient background.svg Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. Izno (talk) 03:28, 5 March 2020 (UTC)
 * Updated the sandbox to contain the edit request + an include tag improvement. The test cases don't actually test the column headers which I changed, thus all comparisons looked the same. Alexiscoutinho (talk) 06:14, 5 March 2020 (UTC)
 * So... Alexiscoutinho (talk) 04:28, 10 March 2020 (UTC)
 * ✅ with /includeonly and noinclude tags in accord with WP:INCLUDEONLY.  P.I. Ellsworth   ed.  put'r there 02:00, 13 March 2020 (UTC)