Open digitalseas opened 5 years ago
I don't have much time to look into this presently, but I see that Layout has a property called Margin and that has:
/**
* Determines whether or not a layout width or height that has been left undefined by the user is
* initialized on each re-layout. Note that, regardless of this attribute, an undefined layout
* width or height is always initialized on the first call to plot.
*/
private final boolean autoSize;
Is it possible that this is what you're looking for?
Also, I notice that you say "autosize" in the java code and "automargin" in the javascript. Could you clarify?
Hi @digitalseas, I'm not sure if you saw my earlier reply. Is this still an issue for you?
Hi Larry, Thank you for the reply. I tried but I still don't see the Plot.ly automargin property on Axis works on the java wrapper.
Thank you for creating such a great tool.
I am trying to set the margin of xAxis as auto, but could not find this in the tablesaw api. Maybe I am missing something (see sample JS below).
Because Plot.ly has been constantly adding new properties, a more direct way to set the layout/trace properties might be useful. For example:
Layout.builder() .set("autosize", "true") .set("width", 500) .set(yAxis().builder().set("automargin", "true").build() ) .build();
This not only will enable flexible property injection to the graph components, but also will allow developers to directly use existing Plot.ly docuents and examples as a reference without searching a corresponding Java method.