Conversation
| scope.options.xAxisLabelLength = 300; | ||
| } | ||
| scope.$watch('options.globalSeriesType', (newType, oldType) => { | ||
| const defaultXAxisLength = 10; |
There was a problem hiding this comment.
Why is this default set separately from DEFAULT_XAXIS_LABEL_LENGTH?
There was a problem hiding this comment.
This default is used when someone is making a visualization for the first time whereas DEFAULT_XAXIS_LABEL_LENGTH is the fallback default when someone clears out the value of the label x-axis-label-length (found in chart-editor.html)
I think we can perhaps set DEFAULT_XAXIS_LABEL_LENGTH to 10 as well to be less confusing
There was a problem hiding this comment.
OK sounds good. On further reflection I wonder if pie charts and line charts should have different defaults.
There was a problem hiding this comment.
Yes, I would say there is probably a better/clearer way to set separate defaults for pie vs line charts. Though I realized that would be a bigger PR and need slightly more time (and we wanted to get this ready soon). For now this workaround does the trick to give pie charts a different default and I'm happy to file a follow-up.
No description provided.