Skip to content

Commit

Permalink
Merge branch 'master' into locUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
uve committed May 21, 2018
2 parents 61716c1 + 4673c43 commit 1c579b4
Show file tree
Hide file tree
Showing 28 changed files with 15,240 additions and 133 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## 1.8.0

* Added Power BI bookmarks support

## 1.7.1

* Fix drawing backward links on difficult graph (with many backward links)

## 1.7.0

* Options to configure to display cycles
* Display cycles on graph as backward links

## 1.6.1

* Links properties were disappeared - fixed

## 1.6.0

* New option: provide min optimal height of node

## 1.5.2

* Drag&drop crashes browser - fix

## 1.5.1

* Fix error when the visual doesn't display chart without values dataset
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ With Sankey, you can clearly find the sources, destinations and steps in between
Fittingly they are used widely in the energy industry. But it finds interesting use cases across all industries. It energies everyone to visualize information that has a start and an end or dynamic relationship with many intermediaries, for example how the user landed and navigated in a web site, or a material in a manufacturing unit, control or money transfers in business processes in a completely different perspective and bring interesting insights to the forefront.

See also [Sankey at Microsoft Office store](https://store.office.com/en-us/app.aspx?assetid=WA104380777&sourcecorrid=23258f89-8fa4-47b4-ac8c-a1157b5cc3d2&searchapppos=0&ui=en-US&rs=en-US&ad=US&appredirect=false)

# Documentation

Check out documentation to find out more about visual's properties and features

[Sankey visual](https://microsoft.github.io/powerbi-visuals-sankey)
49 changes: 44 additions & 5 deletions capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
"displayName": "Force display",
"displayNameKey": "Visual_Force_Display",
"description": "Display all labels anyway",
"descriptionKey": "Visual_Description_Force_Display",
"type": {
"bool": true
}
Expand Down Expand Up @@ -212,12 +213,19 @@
}
},
"scaleSettings": {
"displayName": "Enable logarithmic scale",
"displayNameKey": "Visual_ScaleSettings",
"displayName": "Scale settings",
"displayNameKey": "Visual_SankeyScaleSettings",
"properties": {
"show": {
"displayName": "Enable",
"displayNameKey": "Visual_Enable",
"lnScale": {
"displayName": "Enable logarithmic scale",
"displayNameKey": "Visual_ScaleSettings",
"type": {
"bool": true
}
},
"provideMinHeight": {
"displayName": "Provide min optimal height of node",
"displayNameKey": "Visual_MinOptimalHeight",
"type": {
"bool": true
}
Expand All @@ -243,6 +251,37 @@
}
}
}
},
"cyclesLinks":{
"displayName": "Cycles displaying",
"displayNameKey": "Visual_Cycles",
"properties": {
"drawCycles": {
"displayName": "Duplicate nodes",
"displayNameKey": "Visual_DuplicateNodes",
"type": {
"enumeration": [
{
"displayName": "Duplicate",
"displayNameKey": "Visual_Duplicate",
"value": "0"
},
{
"displayName": "Draw backward link",
"displayNameKey": "Visual_DrawBackwardLink",
"value": "1"
}
]
}
},
"selfLinksWeight": {
"displayName": "Ignore weight of self links",
"displayNameKey": "Visual_SelflinkWeight",
"type": {
"bool": true
}
}
}
}
},
"sorting": {
Expand Down
Binary file added docs/imgs/Cycles.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/DataLabels.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/DataLinkLabels.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/Default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/DisplayUnitsProperties.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/Drag&Drop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/ForceDisplayProperties.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/LinksProperties.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/LogarithmicScaleProperties.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/MinOptimalHeightProperty.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/NodeSelfCycle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/SourceDestination.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/SourceDestinationWeight.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/SourceDestinationWeightLabels.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 95 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

# Sankey visual documentation

[Data fields](#data-fields)

[Sankey format panel](#sankey-format-panel)

[Scale settings](#scale-settings)

[Cycles](#cycles)

[Drag & drop](#drag--drop)

## Data fields

The Sankey has several buckets. There are Source, Destination, Source labels, Destination labels, Weight. Source and Destination buckets are required to display the diagram.

In this case the custom visual displays links between source and destination with same links weights.

![Source and Destination fields](imgs/SourceDestination.png)

Weight data bucket allows setting weights for each link.

If Weight data field is filled, the custom visual draws the links with different sizes. And size of link depends on value of data

![Source and Destination fields with weight values](imgs/SourceDestinationWeight.png)

If Source and Destination fields are filled, you can construct the Sankey with duplicated nodes. To do so you just need to give different names for nodes but with the same labels.

In this sample, D node is rendered twice.

![Source and Destination fields with custom labels](imgs/SourceDestinationWeightLabels.png)

## Sankey format panel

*Data labels* properties provide settings to configure node labels

_Color_ - defines text color of label

_Text size_ - defines text size of label

![Data labels](imgs/DataLabels.png)

*Data link labels* properties provide settings for configuring link labels.

![Data link labels properties](imgs/DataLinkLabels.png)

_Color_ - defines text color of label

_Text size_ - defines text size of label

_Force display properties_ - changes the behavior of labels in the intersection. Labels will be hidden if there's no room to fit them. If Force display option is enabled, the custom visual displays the label in any way

![Force display properties](imgs/ForceDisplayProperties.png)

_Display units properties_ - changes display units in link labels and tooltips

![Display units properties](imgs/DisplayUnitsProperties.png)

*Links* properties define color for each link

![Links properties](imgs/LinksProperties.png)

### Scale settings

Scale settings allow configuring the scale properties of the chart.

Provide min optimal height property - the chart draws all nodes with minimal height to supply convenient size. It can be useful if a distribution of weight values very hight. For example, the minimal value in a data set is 1 and maximum value in a dataset is 1 million.

![Optimal height](imgs/MinOptimalHeightProperty.png)

Enable logarithmic scale - this option switches linear scaling to logarithmic. With this options, the chart smooths values distribution
in a dataset.

![Log scale](imgs/LogarithmicScaleProperties.png)

## Cycles

If a dataset contains the nodes with a link to itself or graphs with cycles, the visual duplicates one of the node to "break" cycle and draws the same node twice.

In the chart, you can see that node B was drawn twice.

![Cycles](imgs/Cycles.png)

In this chart, the node T has self-link and was drawn twice too.

![Node self cycle](imgs/NodeSelfCycle.png)

## Drag & drop

Sankey visual allows moving nodes to any position of viewport by mouse. After moving nodes to different positions, the visual saves the state and draws nodes at the same positions after resizing the visual or reloading the report.

![Default view if chart](imgs/Default.png)

![Drag & Drop nodes](imgs/Drag&Drop.png)
6 changes: 6 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ module.exports = (config) => {
srcRecursivePath,
'node_modules/powerbi-visuals-utils-testutils/lib/index.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
{
pattern: './capabilities.json',
watched: false,
served: true,
included: false
},
recursivePathToTests,
{
pattern: srcOriginalRecursivePath,
Expand Down

0 comments on commit 1c579b4

Please sign in to comment.