kgabryje commented on a change in pull request #18947:
URL: https://github.com/apache/superset/pull/18947#discussion_r814857591
##########
File path: superset-frontend/src/chart/Chart.jsx
##########
@@ -256,6 +256,13 @@ class Chart extends React.PureComponent {
const isLoading = chartStatus === 'loading';
const isFaded = refreshOverlayVisible && !errorMessage;
+ // redefine the formData because the x & y axis title margin of formData
is string type in case of custom value. And so these should be always number.
+ /* eslint radix: ["error", "as-needed"] */
+ const formData = {
+ ...this.props.formData,
+ x_axis_title_margin: parseInt(this.props.formData.x_axis_title_margin),
Review comment:
I think Chart.jsx shouldn't be aware of such plugin specific controls.
I'd suggest parsing those values in
`plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts` (and wherever
else they're used, I think Echarts Boxplot and MixedTimeseries).
You could create a helper function in
`plugins/plugin-chart-echarts/src/utils` that would return a parsed number or 0
if NaN
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]