legendgroup titles
A new attribute for every trace that supports a legendgroup called legendgrouptitle. The first legendgrouptitle for a given legend group should be used, even if a later one conflicts. This should specify a title that appears above the legend group in the legend.
Some additional notes:
legendgrouptitleshould be an object that has the same structure as our other title-like objects: keys for text and font (object containing size and color)- resolving multiple
legendgrouptitleobjects for the same group could be just "first one wins" or "merge with a first one wins rule" so that if the title is set in on trace but the font in another, the merged object is used
The default font size for the legend group titles should be slightly smaller than the legend title font size. I actually think that the current default legend font size is too small, as it's often confusable with the legend item text in horizontal orientation, so given that we're in the 2.0 cycle, maybe we bump up the default legend title font size to make this possible, and have the default legend group title font size be the same as the current legend title font size. Feedback welcome.
Should multi-line text and LaTex be supported in the first iteration?
no :)
I'd like to request that the additional functionality of the legendgrouptitle having the clickable behavior of toggling the whole group, be added along with this feature introduction.
This would leave only one more feature to be added, which hopefully can come from a public pull request, if not along with this feature. Which is the ability-
to control whether or not clicking on an item (trace under a legendgroup) in a group toggles only that item or the whole group. This could be a global attribute under
layout.legendfor example.
As discussed here, https://github.com/plotly/plotly.js/issues/3135#issuecomment-858592557
Can you give an example in CodePen please? tried a lot but nothing.. in version 2.3.1 I think. For me legendgrouptitle: {text: "......"} didn't work at all
Can you give an example in CodePen please? tried a lot but nothing.. in version 2.3.1 I think. For me legendgrouptitle: {text: "......"} didn't work at all
Here is a codepen.
Thanks a lot! works now