File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script >
2- import Sunburst from " @arclamp/ sunburst-chart" ;
2+ import Sunburst from " sunburst-chart" ;
33import debounce from " lodash.debounce" ;
44
55function treeifyTable8 (tab ) {
@@ -114,13 +114,17 @@ export default {
114114 this .chart = Sunburst ()
115115 .width (this .$el .offsetWidth )
116116 .height (this .$el .offsetHeight )
117- .tooltipShow (d => d .name !== " " )
118- .tooltipTitle (d => {
119- const text = this .chart ._tooltipTitle (d);
120- return text
121- .split (" > " )
122- .slice (1 )
123- .join (" > " );
117+ .showTooltip (d => d .name !== " " )
118+ .tooltipTitle ((data , d ) => {
119+ let stack = [];
120+ let curNode = d;
121+ while (curNode) {
122+ stack .unshift (curNode);
123+ curNode = curNode .parent ;
124+ }
125+ stack = stack .slice (1 );
126+
127+ return stack .map (d => d .data .name ).join (' > ' );
124128 })
125129 .tooltipContent (d => (d .value !== undefined ? ` value: ${ d .value } ` : " " ))
126130 .color (d => this .cmap (d .name ))
You can’t perform that action at this time.
0 commit comments