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
Produces incorrect JSON representation. The xaxis1 and yaxis1 attributes of the layout are empty. The titles on the axes therefore don't show up when the figure is rendered.
Here's the invalid JSON that gets produced in v0.4.0:
The reason why it happens is that each trace gets its own instance of the Layout.XAxis(uid: 1) assigned to the xAxis property. The Figure constructors does a little "dance" and collects these properties from all traces and adds them to the layout.
This way the layout ends up with multiple XAxis objects that don't have unique uid. When the entire figure gets encoded to JSON, the encoder keeps overwriting the value for the xaxis1 key over and over the value that is acually visible is the one that happens to be stored the last.
The text was updated successfully, but these errors were encountered:
#18)
- Redesigned init of Figure that associates trace subplot axis to layout
- Add preset static member to all subplot axis types
- Refactor subplot protocols into a separate file
- Add extensibility modifier for generated structs
- Make .animatable property of all traces computed and static
- Remove Shared namespace
vojtamolda
changed the title
Layout axis system (XAxis, YAxis, ...) and subplots don't work figure contains more than one trace
Layout axis system layout.xAxis/yAxis properties are missing from JSON if figure contains more than one trace
Feb 10, 2021
The following code snippet:
Produces incorrect JSON representation. The
xaxis1
andyaxis1
attributes of thelayout
are empty. The titles on the axes therefore don't show up when the figure is rendered.Here's the invalid JSON that gets produced in
v0.4.0
:The reason why it happens is that each trace gets its own instance of the
Layout.XAxis(uid: 1)
assigned to thexAxis
property. TheFigure
constructors does a little "dance" and collects these properties from all traces and adds them to thelayout
.This way the layout ends up with multiple
XAxis
objects that don't have uniqueuid
. When the entire figure gets encoded to JSON, the encoder keeps overwriting the value for thexaxis1
key over and over the value that is acually visible is the one that happens to be stored the last.The text was updated successfully, but these errors were encountered: