Video Module talk:Chart
Population graph
I've developed a more automated template for population growth charts (intended for census data on geographical articles) at the Vietnamese Wikipedia. If anyone's interested, I'd be happy to port vi:Mô ?un:Th?i bi?u dân s? over to this wiki; just contact me. - Minh Nguy?n (talk, contribs) 16:53, 31 March 2013 (UTC)
- i gave it a cursory look. first of all - very nice! second - the Vietnamese version currently is limited to a single dataset, so i am not sure it's The Answer(TM) (although it maybe can be used to develop "The Answer"). However, one thing that the Vietnamese module linked above did right (and i went wrong), is actually using mw:Extension:Timeline (i used divs with position:absolute - quite a disaster). for me personally, timeline has one huge deficiency that tramps (almost) anything else: its RTL support sucks (thogh, maybe Lua can help even here? i'll have to ponder it a bit). i am not all that familiar with the "Timeline" syntax, but it may actually be better.
- So next mission is to develop a line-graph using the timeline syntax.
- peace - ???????? (aka kipod) (talk) 19:55, 31 March 2013 (UTC)
- Hmmm. I was actually hoping that your next project would be developing a set of Lua modules to make the EasyTimeline extension obsolete. I've always found its output to be pretty awful (ugly rasterized image). --MZMcBride (talk) 02:05, 1 April 2013 (UTC)
-
- Actually, Th?i bi?u dân s? supports any arbitrary years (even BC), as seen at vi:B?n m?u:Th?i bi?u dân s?#Thành ph? New York. I brought it up because it allows you to enter each data point as
| yyyy = nnnn
, so editors don't have to learn a special syntax. But obviously you're thinking about broader charting needs, and I would welcome any effort to obsolete EasyTimeline, because its un-antialiased fonts are hideous. - Minh Nguy?n (talk, contribs) 06:31, 2 April 2013 (UTC)-
- it's understood that it can support any year range,but it's still asingle data set. It can't show, for instance, life expectancy vs. Average weight, or crop size vs. Agriculture area, let alone three or four different variables. ???????? (aka kipod) (talk) 12:39, 2 April 2013 (UTC)
-
- Actually, Th?i bi?u dân s? supports any arbitrary years (even BC), as seen at vi:B?n m?u:Th?i bi?u dân s?#Thành ph? New York. I brought it up because it allows you to enter each data point as
Maps Module talk:Chart
It would be helpful to have a right align thumbnail option as well as a caption parameter. --JFH (talk) 20:06, 27 April 2013 (UTC)
- if you mean containing the whole thing in a right-aligned thumb, i think it's better to do it in a template that uses the module, no? i think that in enwiki the consensus is not to use modules directly in articles and always pipe it through templates, so it makes more sense to me to leave all the enveloping of the actual chart to the template.
- if you think it's useful, we can maybe add two new optional parameters for "class" and "style" for the outermost div containing the whole shebang. i'm not so sure about "caption", mainly because it's not clear to me where and how this optional caption should be displayed.
- either way, if you can be more specific, neither of these is out of the question. peace - ???????? (aka kipod) (talk) 23:06, 27 April 2013 (UTC)
- I don't really know how these things work. I suppose I would like a template that uses this module to create something like template:pie chart. The problem with that template is that everything has to add up to 100. --JFH (talk) 13:16, 28 April 2013 (UTC)
- you are correct. {{pie chart}} has several additional limitations which this module overcomes: there is a hard-coded limit to the number of slices (currently 10. it would be easy enough to raise it, e.g. to 15, but limitation of template syntax basically forces a hard coded limit). there is no "hint" (or "tooltip") on the slices, and there is no convenient way to introduce units to the legends.
- it should be pretty easy to wrap all this in a template, and if nobody else does it, maybe i will, one of these days...
- peace - ???????? (aka kipod) (talk) 17:08, 28 April 2013 (UTC)
- I don't really know how these things work. I suppose I would like a template that uses this module to create something like template:pie chart. The problem with that template is that everything has to add up to 100. --JFH (talk) 13:16, 28 April 2013 (UTC)
'Y' axis maximum on stacked bar chart
Can the 'Y' axis maximum be controlled in a stacked bar?
For instance, see User:Begoon/sandbox/casualties, where the 3rd chart (Total fatalities) has a large amount of "dead space" where it extends to 15,000,000 when 12,500,000 would be ample? I don't really understand why it does that, or if I can prevent it. Thanks. Begoon talk 04:00, 27 June 2013 (UTC)
- it's always tricky to select a "round" number to serve as top y. i think anywhere between 1 and 1.5 (or 10 and 15, or 100 and 150 etc.) will use 1.5. the problem here is not just finding the appropriate top value, but also selecting the other y legends: for instance, if we would have selected 13 (or 13 million, for that matter), marking all the values of 1,2,3...12,13 would create too many marks, but nothing else seems very appropriate.
- i guess i could teach the module to accept the y-legend values manually, so the editor will be able to force values when the current logic of the module does not produce good results, but this won't happen before the end of the week. peace - ???????? (aka kipod) (talk) 12:52, 27 June 2013 (UTC)
- Yeah, I know - I've done a fair few PHP routines to generate charts from SQL databases dynamically on websites I maintain (using things like flashchart). It's a pig to code for when the ranges can be anything from 1 to a zillion without getting odd division markers. No big thing, it's ok as it is really, and that's a prototype with imaginary data - so the final thing might use luckier numbers when I plug them in.
- I'm also interested in the question above about thumbnailing. The charts are too big to include in full on the article page, so there'll be a separate chart page. At the moment I'm even thinking I might need to use an image screenshot in the article to link to the page with the full chart, which is OK here, because the data isn't likely to change - but not an ideal way of doing it if the data is regularly updated, because you'd need to update a new thumbnail image each time too. Thanks for the quick reply. Begoon talk 13:27, 27 June 2013 (UTC)
- as the charts generated by this module are not images, proper "thumbnailing" will not work.
- however, playing with "height" and "width" for the whole chart will produce smaller (or larger) versions. one drawback is that the legends text will still show at normal size, which might cause problems, like overlapping legends and such. maybe it should be possible to embed the whole chart inside a "div" with "style='font-size:50%;' " or somesuch:
-
-
- also, note that the module will refuse to draw a chart if either height or width are less than 200 (i guess this could be changed...). total result is still somewhat larger than what you would normally call a "thumbnail". i also never found a good way to place the group legends - whatever i tried, i never found a trick to make them appear in the "right place" for all charts - if it works well with one chart, it doesn't with another. the compromise was to place them a bit far away - too far for most cases really, but if i place them closer they sometime overlap with the horizontal legends, and i did not find a good way to make it intelligent. (anyone is welcome to improve it).
- peace - ???????? (aka kipod) (talk) 14:11, 27 June 2013 (UTC)
-
-
-
-
- That's very good. I played with something similar, but the font-size and overlap was the killer - never even thought of font-size:x% (duh...). I might be able to make that work. Thanks. The pseudo-thumbnail might not need group legends I suppose. How about an option to not display them "group names=none". Then we could drop coloured boxes/text in the template like: Blue and Gold if the position was awful - see above ? Begoon talk 14:25, 27 June 2013 (UTC)
-
-
-
-
-
-
- Or, I guess I could cheat with height:220px; overflow:hidden; :
-
-
-
-
-
-
-
- Begoon talk 15:00, 27 June 2013 (UTC)
-
-
-
-
-
-
-
-
- seems workable. maybe i'll add "hide group names" parameter (i prefer it on "group names=none") later. for now, i think it can work. i am not familiar the with {{rbox}} you used - it seems that it has some undesired side effect (making the group legend a link?), but on the other hand, it seem you are not familiar with {{Spaces}}, so i guess we are even... ;) also, you might want to try embedding the whole thing inside {{Image frame}}.
- ???????? (aka kipod) (talk) 16:51, 27 June 2013 (UTC)
-
-
-
-
-
-
-
-
-
-
- That, sir, is magnificent. I was just going to give it a border, but
{{Image frame}}
is perfect. Thanks for all the help. I've already got the individual chart templates set up, and they transclude data from a data template page, by section, so all I need do is copy the chart templates to Template name(s) thumbnail and add the formatting. Happy now. Great module, by the way, ideal for this job, in which there will probably be some pies too. Cheers. Begoon talk 17:19, 27 June 2013 (UTC)- maybe it would be better not to copy the data, but rather make the "height" and "width" parameters to your template, and then you can just use it (inside the envelope that thumbinize it) instead of copying the whole thing and tweaking just 2 fields. of course, it is very much possible i just did not fully understand what you said, and this is what you are doing anyway... maybe i just got hooked up on the fact you used the word "copy". peace - ???????? (aka kipod) (talk) 18:41, 27 June 2013 (UTC)
- Yes, I realised that last night after typing that. No point at all in trying to maintain 2 sets of template code, I was thinking (badly) out loud... Thanks again. Begoon talk 04:06, 28 June 2013 (UTC)
- so i taught chart 2 new tricks: "tooltip value accumulation": this has effect only with "stack", and will cause the tooltip value to display the accumulation of all the block up to the current (including), and "hide group legends" which prevent displaying the group legends below the chart (the 2nd one works for pie chart also). peace - ???????? (aka kipod) (talk) 21:30, 28 June 2013 (UTC)
- Yes, I realised that last night after typing that. No point at all in trying to maintain 2 sets of template code, I was thinking (badly) out loud... Thanks again. Begoon talk 04:06, 28 June 2013 (UTC)
- +----------------------------------------------------------------------------------------------------+Excellent - that's really cool. Both of those were things I was "working around", and now I don't need to. You can take a look at User:Begoon/sandbox/casualties, and the templates it uses if you're interested - but now, thanks to your hard work, I can simplify them a bit. Thanks for letting me know, and thanks for all of your work with Module:Chart which I think is a great addition to the wiki. Cheers. Begoon talk 01:51, 29 June 2013 (UTC)
- @ ????????: One small problem, I think. I'm trying to use |hide group legends = {{#if:{{{hide group legends|}}}|{{{hide group legends}}}|false}}, and I'm pretty sure I'm passing true/false correctly - but it seems once you even specify the parameter at all it evaluates as true, and hides them, even if blank or false ? Or, I'm screwing up and tested it wrong, which is equally possible...
- (tooltip value accumulation seems to behave the same, now I look - didn't notice that because I always pass 'true' to that) Begoon talk 05:04, 29 June 2013 (UTC)
- maybe it would be better not to copy the data, but rather make the "height" and "width" parameters to your template, and then you can just use it (inside the envelope that thumbinize it) instead of copying the whole thing and tweaking just 2 fields. of course, it is very much possible i just did not fully understand what you said, and this is what you are doing anyway... maybe i just got hooked up on the fact you used the word "copy". peace - ???????? (aka kipod) (talk) 18:41, 27 June 2013 (UTC)
- That, sir, is magnificent. I was just going to give it a border, but
-
-
-
-
-
See this:
-
-
-
-
-
-
-
-
-
- you are absolutely correct when you note that the template does not care if you give it a value of "true", "false", "17" or "bla bla bla" - giving these parameters any value at all means "yes". originally, it was "param exists/param does not exist" logic, and did not pay special attention to test for "blank" value, which meant that blank was also treated as "true".
- this was silly of me, because it makes controlling the bahavior through a parameter to the calling template much more complicated (i am not even sure it it's possible). so i tamed it a little bit to take a blank as "no". i also odified the test above, to demonstrate. any non-blank value still neams "yes", even if it's "false" or "no". peace - ???????? (aka kipod) (talk) 13:44, 29 June 2013 (UTC)
- That works great - thanks again! Passing a blank for "false" is no problem, and does the job perfectly well. The added functionality to do this tooltip accumulation saves a lot of pre-calculation, or maths in the chart template, and means I can use the default groupname:value tooltips instead of building them and passing them through - very useful. Cheers. Begoon talk 15:33, 29 June 2013 (UTC)
-
-
-
-
-
-
-
-
- Please add an option for this. It's silly to have percentages sum to 150 like here. Someone not using his real name (talk) 14:34, 14 December 2013 (UTC)
- Also, the option to display the legend as a gradient (instead of bits all over the place) would also be nice. Someone not using his real name (talk) 14:37, 14 December 2013 (UTC)
Units in the chart
Hi. Currently the module visualizes units only as tool-tips. is it possible to show the units in the chart (e.g. Y axis in case of the bar chart)? --Haithams (talk) 00:51, 7 November 2013 (UTC)
- there are 2 answers here: the first is that the source for this module is free, and anyone who wishes to improve it can do so. however, the darker side is the fact that some 6 months or so after i created the module, a whooping number of 9 articles use it, so the motivation of investing much more time and effort in this module is not huge. ???????? (aka kipod) (talk) 04:11, 7 November 2013 (UTC)
- In fact, I'm surprised to know that such a nice module is not as widely used as it should be. FYI, I copied it to metawiki, and I'm starting some efforts to encourage people use it in their reports ... etc please see here. I would love to improve on the it, but unfortunately I don't have yet enough lua experience to deal with such a complicated module. Perhaps some hints might help! --Haithams (talk) 22:03, 7 November 2013 (UTC)
Discussion regarding this module
There is a discussion involving this module at Wikipedia:Village pump (technical)/Archive 121#New column graphs on WP:Wikipedia with dislocated axis labels, regarding a difficulty with its use on our article about Wikipedia. - PartTimeGnome (talk | contribs) 01:16, 29 December 2013 (UTC)
Group name key
The first entry in the group key is not aligned to the others. On the example shown here "Apple" is higher up than the others. MRSC (talk) 17:30, 24 February 2014 (UTC)
- @MRSC: i believe this has to do with the way the browser displays lists in columns. i would venture a guess you are using google chrome (try to see if same problem exists with ff, ie or opera)... i think there is a problem in the list columns rendering in this browser. i will try to file in a bug report for google chrome. peace - ???????? (aka kipod) (talk) 18:00, 24 February 2014 (UTC)
- Bingo! Yes. It renders fine in IE11. Not switching from Chrome, though. Thanks. MRSC (talk) 18:12, 24 February 2014 (UTC)
Module:Plotter/DefaultColors
Shouldn't this (sub)module be loaded using mw.loadData
instead of require
? Helder.wiki 15:38, 28 April 2014 (UTC)
- in principle, i think yes. in practice, it doesn't really matter. this module have been there for years, and is used in < 30 articles, and i did not find an article containing more than one chart (did not go through *all* 22 articles using it). feel free to make the modification, though. peace - ???????? (aka kipod) (talk) 00:23, 29 April 2014 (UTC)
Line chart option
Hi,
I'm wondering if there is any chance of adding a line chart option to this script.
Thanks in advance. 41.138.237.169 (talk) 08:21, 19 September 2014 (UTC)
- is there something wrong with Template:Line chart? Frietjes (talk) 14:01, 20 September 2014 (UTC)
- @Frietjes: unfortunately, yes. this template is very impressive, but the limitations of templating system makes it difficult to use: specifically having to pass the parameters as "S12V37 = 44" makes it not editor-friendly. Lua can help alleviate this difficulty - see how more convenient it is to fill in the values for this module ( 44 : 46 : 48 : 12 vs. "S02V01 = 44 | S02V02 = 46 | S02V03 = 48 | S02V04 = 12") the module even lets you copy values almost directly from a spreadsheet (you'll need to "export" it to CSV format), simply by setting the "delimiter" to comma. please see Wikipedia:Lua requests#overhaul Module:Chart. also, the template code is so complex that it's practically unmaintainable - for instance, see this attempt, while the module doesn't really care: the same code handles a single data series with 3 values, or 57 series with 82 values each. peace - ???????? (aka kipod) (talk) 23:02, 22 September 2014 (UTC)
Legend
These are really great functions. But I do have a problem with the legend area:
- for pie chart, the whole legend area is limited to the size of the pie, and changing it is only possible through
|radius=
. In addition, long texts don't wrap well. Take a look here - the text is at 88% size, and the radius is increased to 110 from normal 105. Or here where it's normal size but wraps. Wraps badly. Is there any possibility of parameterising the legend area, or forming it into a table? - for (stacked) bar chart, there is a lot of white space to the left of the y-axis, and between the x-axis and the actual legend. see here. Can something be done about that? Also, the graphic is tight against the right edge of its container, and doesn't seem to want to shift.
Unbuttered parsnip (talk) mytime= Tue 21:04, wikitime= 13:04, 4 November 2014 (UTC)
- the gap between the chart and the legend, comes from the
chartHeight
, which in that case is set to be 80 less than the height. some positive value is needed here to prevent the xaxis labels from overlapping the legend, but it could probably be variable. I put a simple hack in the sandbox which allows for some variability. Frietjes (talk) 19:43, 4 November 2014 (UTC)- the reason for the large gap (same goes for the one to the left of the Y axis) is that the legend can wrap, and the module does not really know if it will or won't, so i left (if i remember correctly) about 3 lines worth of gap for wrapping. similarly, the module has hard time calculating how many pixels do the Y-legends occupy.
- it makes sense to allow this to be fed in as optional parameters, but some caution should be used, as this may be browser dependent, so the editor may be perfectly happy with the result, but it will still like crap for some readers, possibly having x-axis legends overlap the group legends, or y-axis legends either overflow to the left, or get its significant part truncated (so "1,000,000", "1,500,000" and "2,000,000" all get truncated to "00,000").
- this is an in-built weakness of this way of plotting charts - the module has to use "absolute" positioning of various things (such as the bars, the axes, and the legends), but does not have the intelligence (or knowledge) the browser has regarding physical sizes of text strings.
- i think the idea behind this module is a good one, but i'm not too happy with the implementation: it would have been better to consume the parameters in a similar way to this module, which i think is more convenient and natural than most "chart" templates, and then translate it to Extension:EasyTimeline construct. this may not be feasible for the piechart (easytimeline does not support piechart, even though the plotting software behind it does), but at least for bar chart i think easytimeline is better choice than the way the chart is built currently. see Wikipedia:Lua requests#overhaul Module:Chart. peace - ???????? (aka kipod) (talk) 20:40, 4 November 2014 (UTC)
Help needed: pie chart doesn't work in Wikidata
I have tried to import this module and import it in Wikidata, but somehow, the pie chart does not work in Wikidata. See d:User:Zolo/Wikipedia content. When previewed in en.wikipedia, the page shows correctly, but on Wikidata, the pie pieces are wrongly sized. Can that be a CSS issue or something ? --Zolo (talk) 10:20, 2 June 2015 (UTC)
- There is a new tool at mw:Extension:Graph that can generate attractive graphs--it should be already available at Wikidata. I'm just letting you know about the extension because it has great potential, but I think you would need to produce about 100 graphs to make figuring out how to use it worthwhile. Johnuniq (talk) 12:00, 2 June 2015 (UTC)
- Ok thanks, I'll try to have a look at it. Actually, as far as my immediate issue is concerned it was just because it needed the "transborder" class, I could have look better before asking.. --Zolo (talk) 12:33, 2 June 2015 (UTC)
- @Zolo: using the graph tag is probably the better course of action, but in the meantime, i looked in d:User:Zolo/Wikipedia content, and did not understand the problem. what do you mean "pie pieces are wrongly sized"? what do you expect to see, and what do you see? peace - ???????? (aka kipod) (talk) 17:36, 3 June 2015 (UTC)
- @????????: without the "transborder" class in the CSS, pie charts were odd-shaped, with broken lines. It works now, thanks. --Zolo (talk) 10:57, 8 June 2015 (UTC)
- @Zolo: using the graph tag is probably the better course of action, but in the meantime, i looked in d:User:Zolo/Wikipedia content, and did not understand the problem. what do you mean "pie pieces are wrongly sized"? what do you expect to see, and what do you see? peace - ???????? (aka kipod) (talk) 17:36, 3 June 2015 (UTC)
- Ok thanks, I'll try to have a look at it. Actually, as far as my immediate issue is concerned it was just because it needed the "transborder" class, I could have look better before asking.. --Zolo (talk) 12:33, 2 June 2015 (UTC)
Mobile wikipedia bar chart presentation terrible
I've used the bar chart version to nice effect (after careful sizing of width and height). But quite some time later I was horrified to see the dreadful presentation on mobile Wikipedia in a high usage article, see here. The x legends are presented vertically rather than horiz, and overlap the article text - so the legend is unreadable and the article text messed up. Can anyone suggest a fix? Otherwise I think I will have no choice but to go back to less flexible .png charts. Thanks. Rwendland (talk) 16:02, 26 July 2016 (UTC)
- Rwendland, try asking at WP:VPT. there are some CSS experts who could probably help. Frietjes (talk) 15:04, 9 September 2016 (UTC)
- This is discussed at Wikipedia:Village pump (technical)##invole:Chart looks terrible in mobile Wikipedia. By the way, "Should be exatly" should be "Should be exactly". PrimeHunter (talk) 11:39, 17 May 2017 (UTC)
Adding wikicode/links to "x legends"
In the docs, it says "x legends" supports wikicode such as links to internal pages. But when I use a legend like "User:AbdealiJK/some/page" it things the color character ":" means that the next legend has started. And this gives me a lisp error saying: X legends expect N values only. How do I add links with a colon ? I tried escaping it with \ and also surrounding the wikicode with double quotes, neither worked.
--AbdealiJK (talk) 11:18, 11 August 2016 (UTC)
-
- this module was created long before the graph extension was added to WP. i strongly recommend to switch from using this module to the more "modern" use of the graph extension. there are several modules and templates that help using it, such that it's as easy, if not easier, to create graphs and charts than with this module, and it's "the right thing to do" (tm).
- however, this module solves this specific problem by allowing you to use an alternative delimiter: pass a "delimiter" parameter which does not appear in any of the values. it can be as simple as :: instead of : , or practically anything else - you can use &, *, #, the word "DELIM", the Arabic letter ?, the Khmer character ? - whatever your heart desires.
- HTH. peace - ???????? (aka kipod) (talk) 18:05, 11 August 2016 (UTC)
Dot plot
I was looking at Ariane 5#Statistics and thought a dot plot-like graph would be more appropriate (very few units). -- Dispenser 01:13, 2 February 2017 (UTC)
Accessibility
The bar graphs should include a border. This would make it work with the Firefox extension Blank Your Monitor and improve printing where background-color
is removed (lots of websites were white-on-black 20 years ago). -- Dispenser 01:20, 2 February 2017 (UTC)
- Firefox/Pale Moon will override authored colors when using High Contrast themes. Colors options dialogue. -- Dispenser 16:05, 29 June 2017 (UTC)
Drop shadows
Could we get rid of the drop shadows? They make the charts look so Microsoft Excel 95. Kaldari (talk) 07:16, 23 February 2017 (UTC)
- @Kaldari: K. also, feel free tomake any other changes you see fit. peace - ???????? (aka kipod) (talk) 15:33, 24 February 2017 (UTC)
- I've reverted it since it made the bad printing situation (browser hide background colors to save ink) even worse. -- Dispenser 03:08, 4 March 2017 (UTC)
- I've added a 1px border (should help with accessibility) and force background-color printing on Safari/Chrome. -- Dispenser 19:56, 4 March 2017 (UTC)
- Thanks for adding the border. It looks like that alleviates the need for the drop shadow. Also, I tried various charts under Blank Your Monitor and it looks like the drop shadow is invisible when the monitor is blanked via BYM anyway (and unfortunately all the color data is lost). One other issue I noticed with the drop shadows is that the renderer creates a drop shadow even when there isn't a bar (i.e. the value is 0), so it's just a shadow of nothing. See Exploration of Mars#Yearly statistics for example. Kaldari (talk) 09:11, 11 March 2017 (UTC)
- I've added a 1px border (should help with accessibility) and force background-color printing on Safari/Chrome. -- Dispenser 19:56, 4 March 2017 (UTC)
- I've reverted it since it made the bad printing situation (browser hide background colors to save ink) even worse. -- Dispenser 03:08, 4 March 2017 (UTC)
Y scale
Feature request: influencing the Y scale.
See List of Proton launches. The chart is an integer count of rocket launches, but the Y scale puts tick marks and labels at a useless "2.5" interval. It would be nice to have any way at all to influence the Y scale, by setting some factor. For example, any one of these might be helpful:
- y interval
- y no. of subdivisions
- y no. secondary subdivisions (tick marks without a label)
- y max
- y integers only
--Michael Z. 2017-03-30 15:07 z
- +1 for this request, especially forcing integers. -- JFG talk 00:51, 19 August 2017 (UTC)
Stacked Bar Charts with zero values display a single line of colour instead of nothing.
See List_of_Falcon_9_and_Falcon_Heavy_launches#Launch_statistics for an example of this. There seems to be a bug here that displays a single line of colour even when the value input is zero for the given field. This makes the Charts look rather amaturish and unprofessional. Is there an easy fix for this or not? -- InsertCleverPhraseHere 07:30, 26 June 2017 (UTC)
- thanks. Fixed. ???????? (aka kipod) (talk) 23:34, 28 June 2017 (UTC)
- Nice work! -- InsertCleverPhraseHere 00:12, 29 June 2017 (UTC)
Title
This chart thing needs a title parameter. There is no way to add a title to the charts!--200.223.199.146 (talk) 13:49, 27 June 2017 (UTC)
- there are too many stylistic options/possibilities for title. it's best left to the template invoking this module. peace - ???????? (aka kipod) (talk) 23:35, 28 June 2017 (UTC)
Negative values in bar charts
Bars are not drawn properly when a chart includes negative values. Example, trying to graph the GDP growth for the Economy of Russia article:
@????????: Could you possibly take a look? -- JFG talk 00:44, 19 August 2017 (UTC)
- @JFG: sorry. currently this module does not support bar-graphs with base (i.e., y-value of x-axis) other than 0, or negative y-values. i will repeat what i wrote above: this module was written before the "graph" extension was included in wikipedia (maybe even before the extension was written), so it was justified. nowadays, when we have graph extension, i do not see any justification of using it - it is here b/c some articles are using it, but any new graph should use the graph extension (see Module:Graph). of course, if someone chooses to further enhance this module they are welcome, but i do not think i will do any more work on it, short of fixing clear and blatant bugs. i do not consider this deficiency (not supporting negative values) to qualify.
- it is somewhat unfortunate that the "graph" module documentation is lacking, and has no examples, but it's not enough to justify using this obsolete module. ???????? (aka kipod) (talk) 19:58, 21 August 2017 (UTC)
- (added later): actually, there are some nice documentation and examples in Template:Graph:Chart, so maybe my criticism of the documentation in the module is not justified. ???????? (aka kipod) (talk) 20:12, 21 August 2017 (UTC)
- Well, I've used both, and I much prefer this module to the standard graph extension. The syntax is much simpler to handle for updates, and the output quality is better in my opinion. I'd be glad to help fixing some issues. -- JFG talk 21:04, 21 August 2017 (UTC)
- (added later): actually, there are some nice documentation and examples in Template:Graph:Chart, so maybe my criticism of the documentation in the module is not justified. ???????? (aka kipod) (talk) 20:12, 21 August 2017 (UTC)
Whole numbers in bar chart Y axis.
See List_of_Falcon_9_and_Falcon_Heavy_launches#Launch_statistics. It is very odd that the Y axis displays numbers such as 2.5 and 7.5 in the Y axis, when you can't have half of a launch. I have been struggling to find a way to fix this... is there a way to force whole numbers, or else specify the scale on an axis for a bar chart? -- InsertCleverPhraseHere (or here) 10:54, 20 August 2017 (UTC)
- Feature was requested above at #Y scale. -- JFG talk 13:47, 20 August 2017 (UTC)
Add noresize class alongside chart for better mobile support
Many of the graphs are larger than the available space on mobile. To rectify this, we advise adding a noresize class to the element to add horizontal scrolling.
It's not perfect but it will make the chart readable on mobile. Please let me know if you have any further questions. Jdlrobson (talk) 21:18, 27 November 2017 (UTC)
Jdlrobson (talk) 21:18, 27 November 2017 (UTC)
Bar width
Does this chart offer the option to determine the bar width like this one? Gun Powder Ma (talk) 01:50, 15 December 2017 (UTC)
- afaict, the bar width is semi-automatic depending on the number of bars and the overall width of the chart. Frietjes (talk) 18:34, 15 December 2017 (UTC)
Source of the article : Wikipedia