Skip to content

Commit

Permalink
Sankey release (#79)
Browse files Browse the repository at this point in the history
* Sotring added

* package.json update, pull request notes implemented

* legacy api replaced, context menu support added

* Lint fixes

* apis integration

* Updated changelog.md

* sort change to implicit

Co-authored-by: Nikita Grachev <[email protected]>
  • Loading branch information
MulyukovAidar and uve authored Feb 28, 2020
1 parent 3371dad commit 8b54608
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 8 additions & 1 deletion capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,14 @@
}
},
"sorting": {
"default": {}
"implicit": {
"clauses": [
{
"role": "Weight",
"direction": 1
}
]
}
},
"supportsKeyboardFocus": true,
"supportsSynchronizingFilterState": true
Expand Down
8 changes: 1 addition & 7 deletions src/sankeyDiagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1379,12 +1379,6 @@ export class SankeyDiagram implements IVisual {
columns: SankeyDiagramColumn[],
scale: SankeyDiagramScaleSettings,
viewportHeight: number, ignoreSelfLinkWeight: boolean): void {
if (sort !== "") {
let [sortBy, order] = sort.split("|");
sortBy = sortBy === "Value" ? "weight" : "name";
let asc: boolean = order === "1";
nodes = this.sortColumns(nodes, columns, asc, sortBy);
}
let shiftByAxisY: number = SankeyDiagram.DefaultOffset,
currentX: number = SankeyDiagram.DefaultPosition,
index: number = SankeyDiagram.DefaultIndex;
Expand All @@ -1407,7 +1401,7 @@ export class SankeyDiagram implements IVisual {

node.x *= scale.x;

let selfLinkHeight: number = d3.max(node.links.filter(l => l.direction === SankeyLinkDirrections.SelfLink).map(l => l.weigth));
let selfLinkHeight: number = d3.max(node.links.filter(l => l.directio SankeyLinkDirrections.SelfLink).map(l => l.weigth));

if (!selfLinkHeight) {
selfLinkHeight = 0;
Expand Down

0 comments on commit 8b54608

Please sign in to comment.