You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I try to create two time series with type 'bar'.
One trace didn't contain any data, but this one should be shown in legend. To make this trace visible in legend, I have set x: [null] and y: [null];
But in this case both series are not displaying. https://codepen.io/sandertar/pen/VPmOdK
Is there any other way to make label visible in legend for trace without data?
The text was updated successfully, but these errors were encountered:
sandertar
changed the title
Two 'bar' trace are not showing with empty data
Two 'bar' traces are not showing with empty data
Jan 18, 2017
Thanks for writing in. Your codepen points a few separate issues.
First, https://codepen.io/etpinard/pen/xggwYq is probably the best you can do with the current version. You might not like that the trace 1 legend item is semi-transparent, our apologies 😃
Looks like there's a bug with how the null trace interacts with other the trace to compute the bar widths. This bug should be easy to fix.
Moreover, I believe that something like
trace={visible: true,x: [],y: []}
where the user explicitly set visible: true should appear in the legend. At the moment, traces with x.length === 0 and y.length === 0 are taken to be visible: false no matter what the users inputs. Modifying this logic would be a much longer and harder project; I can't guarantee it's going to happen.
Hi! I try to create two time series with type 'bar'.
One trace didn't contain any data, but this one should be shown in legend. To make this trace visible in legend, I have set x: [null] and y: [null];
But in this case both series are not displaying.
https://codepen.io/sandertar/pen/VPmOdK
Is there any other way to make label visible in legend for trace without data?
The text was updated successfully, but these errors were encountered: