Skip to content

Commit

Permalink
Dev to Certification (#209)
Browse files Browse the repository at this point in the history
* Update build.yml

* Update codeql-analysis.yml

* Fix context menu (#186)

* Fix context menu for links and nodes

* Increment version

---------

Co-authored-by: Iuliia Kulagina <[email protected]>

* Fix data labels and weight with zero values (#208)

* Fix weight with zero values

* Increase visual version

---------

Co-authored-by: Iuliia Kulagina <[email protected]>

---------

Co-authored-by: Nikita Grachev <[email protected]>
Co-authored-by: MulyukovAidar <[email protected]>
Co-authored-by: Iuliia Kulagina <[email protected]>
Co-authored-by: Iuliia Kulagina <[email protected]>
  • Loading branch information
5 people authored Sep 24, 2024
1 parent 138fd43 commit 34cb7c6
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 45 deletions.
61 changes: 24 additions & 37 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,49 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [main]
branches: [main, dev, certification]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
branches: [main, dev, certification]
schedule:
- cron: '0 6 * * 4'
- cron: '0 0 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

language: ['typescript']

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Use Node.js 18
uses: actions/setup-node@v2
with:
node-version: 18.x

- name: Install Dependencies
run: npm ci

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.4.3.0
* Fix weight with zero values

## 3.4.2.0
* Fix context menu for links and nodes

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powerbi-visuals-sankey",
"version": "3.4.2.0",
"version": "3.4.3.0",
"description": "Sankey is a type of flow diagram in which the width of the series is in proportion to the quantity of the flow. Use it to find major contributions to an overall flow.",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions pbiviz.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"visual": {
"name": "SankeyDiagram",
"displayName": "Sankey 3.4.2.0",
"displayName": "Sankey 3.4.3.0",
"guid": "sankey02300D1BE6F5427989F3DE31CCA9E0F32020",
"visualClassName": "SankeyDiagram",
"version": "3.4.2.0",
"version": "3.4.3.0",
"description": "Sankey is a type of flow diagram in which the width of the series is in proportion to the quantity of the flow. Use it to find major contributions to an overall flow.",
"supportUrl": "https://community.powerbi.com",
"gitHubUrl": "https://github.com/Microsoft/powerbi-visuals-sankey"
Expand Down
7 changes: 4 additions & 3 deletions src/sankeyDiagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type UpdateSelection<T> = d3Selection<any, T, any, any>;
// powerbi
import DataView = powerbi.DataView;
import IViewport = powerbi.IViewport;
import PrimitiveValue = powerbi.PrimitiveValue;
import DataViewObjects = powerbi.DataViewObjects;
import VisualObjectInstance = powerbi.VisualObjectInstance;
import DataViewObjectPropertyIdentifier = powerbi.DataViewObjectPropertyIdentifier;
Expand Down Expand Up @@ -156,7 +157,7 @@ export class SankeyDiagram implements IVisual {
private static DefaultFormatOfWeight: string = "g";

private static DefaultWeightValue: number = 0;
private static MinWeightValue: number = 1;
private static MinWeightValue: number = 0;

private static TooltipDisplayName: string = "Name";

Expand Down Expand Up @@ -461,7 +462,7 @@ export class SankeyDiagram implements IVisual {
dataView.matrix.rows.root.children.forEach(parent => {
const foundSource: SankeyDiagramNode = nodes.find(found => found.label.name === parent.value)
parent.children.forEach(child => {
let linkLabel = undefined;
let linkLabel: PrimitiveValue = undefined;
let weight: number = SankeyDiagram.DefaultWeightValue;

let foundDestination: SankeyDiagramNode = nodes.find(found => found.label.name === child.value)
Expand Down Expand Up @@ -509,7 +510,7 @@ export class SankeyDiagram implements IVisual {
);

const link: SankeyDiagramLink = {
label: linkLabel && linkLabel.toString(),
label: linkLabel?.toString(),
source: foundSource,
destination: foundDestination,
weight: weight,
Expand Down

0 comments on commit 34cb7c6

Please sign in to comment.