kristw commented on a change in pull request #5718: [SIP-5] Refactor and repair 
partition
URL: 
https://github.com/apache/incubator-superset/pull/5718#discussion_r213839532
 
 

 ##########
 File path: superset/assets/src/visualizations/partition.js
 ##########
 @@ -324,10 +345,78 @@ function partitionVis(slice, payload) {
       d3.event.stopPropagation();
       return true;
     }
+
+    g.on('click', click);
+
+    g.append('svg:rect')
+      .attr('width', root.dy * kx)
+      .attr('height', d => d.dx * ky);
+
+    g.append('svg:text')
+      .attr('transform', transform)
+      .attr('dy', '0.35em')
+      .style('opacity', d => d.dx * ky > 12 ? 1 : 0)
+      .text((d) => {
+        if (!d.disp) {
+          return d.name;
+        }
+        return `${d.name}: ${d.disp}`;
+      });
+
+    // Apply color scheme
+    g.selectAll('rect')
+      .style('fill', (d) => {
+        d.color = getColorFromScheme(d.name, colorScheme);
+        return d.color;
+      });
+
+    // Zoom out when clicking outside vis
 
 Review comment:
   sgtm. will do.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to