-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Bars on graph2d using sideBySide not equal width when missing items #500
Comments
Hi, The width you define is used as a width for a single bar (without overlap). That space is subdivided for overlapping cases. If you have three datasets you want to compare and there are zero values in them, those are values too and should be shown. That is the idea behind the current implementation. It is not possible to have blank spaces for missing values. You could fake this by having a group with an invisible style (rgba(0,0,0,0)) where you input your missing values. Regards, Alex |
I understand it is the current implementation; so it probably is more of a feature request. Thanks for the suggestion to use invisible group(s), plural as any of the groups could have missing items... there are some remaining issues; with the icons and the legend, but I can work around that. See http://jsfiddle.net/wijgerden/vq4ezLgn/ (an updated fork of the sample fiddle) where I applied this; note the blank icon outline (but the icons could be hidden of course). |
Hi, Hmm. I didn't think of that. Maybe it would be useful to have the legend:true/false option for groups as well. Regards, Alex |
Hi, Over the last year a lot of feature requests have been made. We have just introduced our new website which has a list of the requested features. We have placed this request on that list. The list can be found here: An explaination of the new system can be found here: I would like to stress that this does not mean we abandon this request. Discussion here will continue if needed on this feature but we will close it to keep our Github issue page more of a bug-todo list. Future feature requests will still be made here and then added to the website by us. Regards, Alex |
Reopening as Feature-Request issue (see #2114). |
When adding partial data (explained below) to a Graph2D chart with the
handleOverlap: 'sideBySide'
option, not all bars show equal width. Setting thewidth
option seems to be (as expected, and correctly IMO) ignored by thesideBySide
option to ensure that all bars are visible. However, in doing so, the code doesn't determine a new width to apply to all bars. This results in different width bars.Compare bars on Friday the 13th in http://jsfiddle.net/wijgerden/cttyhfgu/ with the same in http://visjs.org/examples/graph2d/11_barsSideBySideGroups.html where the only difference is that I commented out one item. What you can also see in the fiddle is that the two bars on Fri 13th are not seperated by the space that the missing bar would occupy otherwise.
It probably would be possible for me to provide 0 (zero) values for the missing items in my data, but this would increase the amount of data to be transferred/processed; and it might provide the wrong information (it is not that the value was zero... we simply didn't have the data available).
Is it possible to ensure all bars on a graph2d chart have equal width when using the
handleOverlap: 'sideBySide'
option? Ideally keeping empty space for missing items in above case.The text was updated successfully, but these errors were encountered: