Skip to content

Commit

Permalink
Merge pull request #148 from redbearsam/fix/value_labels
Browse files Browse the repository at this point in the history
sunburst - add labels, don't display if no crossValue is supplied
  • Loading branch information
matt-hooper authored Apr 2, 2019
2 parents 9760eae + 5081a36 commit 9152dfb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/perspective-viewer-d3fc/src/js/charts/sunburst.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {colorRangeLegend} from "../legend/colorRangeLegend";
import {tooltip} from "../tooltip/tooltip";

function sunburst(container, settings) {
if (settings.crossValues.length === 0) return;

const sunburstData = treeData(settings);
const {width: containerWidth, height: containerHeight} = container.node().getBoundingClientRect();

Expand Down
14 changes: 13 additions & 1 deletion packages/perspective-viewer-d3fc/src/less/perspective-view.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
);
}

:host([view=d3_xy_scatter]), :host([view=d3_candlestick]), :host([view=d3_ohlc]) {
:host([view=d3_xy_scatter]), :host([view=d3_candlestick]), :host([view=d3_ohlc]), :host([view=d3_sunburst]) {
& #app {
&.columns_horizontal #side_panel #inactive_columns {
padding-top:28px
Expand Down Expand Up @@ -82,3 +82,15 @@
}
}
}

:host([view=d3_sunburst]) {
& #app #side_panel #active_columns perspective-row {
&:nth-child(1):before {
content:"Size"
}

&:nth-child(2):before {
content:"Color"
}
}
}

0 comments on commit 9152dfb

Please sign in to comment.