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 2018/08/23 23:43:42 UTC

[GitHub] kristw commented on a change in pull request #5690: Repair and refactor Horizon Chart

kristw commented on a change in pull request #5690: Repair and refactor Horizon Chart
URL: https://github.com/apache/incubator-superset/pull/5690#discussion_r212488297
 
 

 ##########
 File path: superset/assets/src/visualizations/HorizonRow.jsx
 ##########
 @@ -0,0 +1,182 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import d3 from 'd3';
+
+export const DEFAULT_COLORS = [
+  '#313695',
+  '#4575b4',
+  '#74add1',
+  '#abd9e9',
+  '#fee090',
+  '#fdae61',
+  '#f46d43',
+  '#d73027',
+];
+
+const propTypes = {
+  className: PropTypes.string,
+  width: PropTypes.number,
+  height: PropTypes.number,
+  data: PropTypes.arrayOf(PropTypes.shape({
+    y: PropTypes.number,
+  })).isRequired,
+  bands: PropTypes.number,
+  colors: PropTypes.arrayOf(PropTypes.string),
+  colorScale: PropTypes.string,
+  mode: PropTypes.string,
+  offsetX: PropTypes.number,
+  title: PropTypes.string,
+  yDomain: PropTypes.arrayOf(PropTypes.number),
+};
+
+const defaultProps = {
+  className: '',
+  width: 800,
+  height: 20,
+  bands: DEFAULT_COLORS.length >> 1,
 
 Review comment:
   Addressed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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