You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/04/15 20:06:18 UTC

[GitHub] [incubator-superset] DiggidyDave commented on a change in pull request #7302: fix: time series table

DiggidyDave commented on a change in pull request #7302: fix: time series table
URL: https://github.com/apache/incubator-superset/pull/7302#discussion_r275523872
 
 

 ##########
 File path: superset/assets/src/explore/components/controls/TimeSeriesColumnControl.jsx
 ##########
 @@ -52,7 +53,21 @@ const colTypeOptions = [
 export default class TimeSeriesColumnControl extends React.Component {
   constructor(props) {
     super(props);
-    const state = { ...props };
+    const state = {
+      label: this.props.label,
+      tooltip: '',
+      colType: '',
+      width: '',
+      height: '',
+      timeLag: '',
+      timeRatio: '',
+      comparisonType: '',
+      showYAxis: false,
+      yAxisBounds: [null, null],
+      bounds: [null, null],
+      d3format: '',
+      dateFormat: '',
+    };
 
 Review comment:
   Instead of adding `null` values and empty strings, can we just _omit_ them? The consumer of that object should be the thing that decides a) if it wants those values to be there and b) what to do if they are missing. Inserting them here seems like it is coupling things in a way that is going to be fragile
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org