Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/build.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
typings
node_modules
.DS_Store
.tmp
dist
.api

webpack.statistics.*.html
4 changes: 4 additions & 0 deletions .tmp/build/.tmp/precompile/visualPlugin.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import powerbiVisualsApi from "powerbi-visuals-api";
import IVisualPlugin = powerbiVisualsApi.visuals.plugins.IVisualPlugin;
declare var PBI_CV_9894B302_1DFF_4A96_ABFE_BF8588197166: IVisualPlugin;
export default PBI_CV_9894B302_1DFF_4A96_ABFE_BF8588197166;
71 changes: 71 additions & 0 deletions .tmp/build/src/barChart.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import "./../style/visual.less";
import powerbiVisualsApi from "powerbi-visuals-api";
import "regenerator-runtime/runtime";
import powerbi = powerbiVisualsApi;
import EnumerateVisualObjectInstancesOptions = powerbi.EnumerateVisualObjectInstancesOptions;
import IVisual = powerbi.extensibility.IVisual;
import VisualObjectInstanceEnumeration = powerbi.VisualObjectInstanceEnumeration;
import VisualUpdateOptions = powerbi.extensibility.visual.VisualUpdateOptions;
import VisualConstructorOptions = powerbi.extensibility.visual.VisualConstructorOptions;
export declare class BarChart implements IVisual {
private svg;
private host;
private selectionManager;
private barContainer;
private xAxis;
private barDataPoints;
private barChartSettings;
private tooltipServiceWrapper;
private locale;
private element;
private barSelection;
static Config: {
xScalePadding: number;
width: number;
transparentOpacity: number;
margins: {
top: number;
right: number;
bottom: number;
left: number;
};
xAxisFontMultiplier: number;
};
/**
* Creates instance of BarChart. This method is only called once.
*
* @constructor
* @param {VisualConstructorOptions} options - Contains references to the element that will
* contain the visual and a reference to the host
* which contains services.
*/
constructor(options: VisualConstructorOptions);
/**
* Updates the state of the visual. Every sequential databinding and resize will call update.
*
* @function
* @param {VisualUpdateOptions} options - Contains references to the size of the container
* and the dataView which contains all the data
* the visual had queried.
*/
update(options: VisualUpdateOptions): void;
private static wordBreak;
private handleClick;
private handleContextMenu;
private syncSelectionState;
/**
* Enumerates through the objects defined in the capabilities and adds the properties to the format pane
*
* @function
* @param {EnumerateVisualObjectInstancesOptions} options - Map of defined objects
*/
enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
/**
* Destroy runs when the visual is removed. Any cleanup that the visual needs to
* do should be done here.
*
* @function
*/
destroy(): void;
private getTooltipData;
}
60 changes: 60 additions & 0 deletions .tmp/build/src/localization/localizationHelper.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
export interface Localization {
"ar-SA": string;
"bg-BG": string;
"ca-ES": string;
"cs-CZ": string;
"da-DK": string;
"de-DE": string;
"el-GR": string;
"en-US": string;
"es-ES": string;
"et-EE": string;
"eU-ES": string;
"fi-FI": string;
"fr-FR": string;
"gl-ES": string;
"he-IL": string;
"hi-IN": string;
"hr-HR": string;
"hu-HU": string;
"id-ID": string;
"it-IT": string;
"ja-JP": string;
"kk-KZ": string;
"ko-KR": string;
"it-LT": string;
"lv-LV": string;
"ms-MY": string;
"nb-NO": string;
"nl-NL": string;
"pl-PL": string;
"pt-BR": string;
"pt-PT": string;
"ro-RO": string;
"ru-RU": string;
"sk-SK": string;
"sl-SI": string;
"sr-Cyrl-RS": string;
"sr-Latn-RS": string;
"sv-SE": string;
"th-TH": string;
"tr-TR": string;
"uk-UA": string;
"vi-VN": string;
"zh-CN": string;
"zh-TW": string;
}
export interface LocalizaionResources {
defaultValue: string;
localization: Localization;
}
export interface Resources {
[key: string]: LocalizaionResources;
}
/**
* Returns the localized string in the locale transfared using the key that was given to serch the resources
*
* @param {string} locale - the locale in which PowerBI is currently running
* @param {object} key - specify a key for the string you want localized in your visual
*/
export declare function getLocalizedString(locale: string, key: string): string;
2 changes: 2 additions & 0 deletions .tmp/build/src/localization/localizedResources.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Resources } from "./localizationHelper";
export declare let localizedResources: Resources;
25 changes: 25 additions & 0 deletions .tmp/build/src/objectEnumerationUtility.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import powerbiVisualsApi from "powerbi-visuals-api";
import powerbi = powerbiVisualsApi;
import DataViewObjects = powerbi.DataViewObjects;
import DataViewCategoryColumn = powerbi.DataViewCategoryColumn;
/**
* Gets property value for a particular object.
*
* @function
* @param {DataViewObjects} objects - Map of defined objects.
* @param {string} objectName - Name of desired object.
* @param {string} propertyName - Name of desired property.
* @param {T} defaultValue - Default value of desired property.
*/
export declare function getValue<T>(objects: DataViewObjects, objectName: string, propertyName: string, defaultValue: T): T;
/**
* Gets property value for a particular object in a category.
*
* @function
* @param {DataViewCategoryColumn} category - List of category objects.
* @param {number} index - Index of category object.
* @param {string} objectName - Name of desired object.
* @param {string} propertyName - Name of desired property.
* @param {T} defaultValue - Default value of desired property.
*/
export declare function getCategoricalObjectValue<T>(category: DataViewCategoryColumn, index: number, objectName: string, propertyName: string, defaultValue: T): T;
1 change: 1 addition & 0 deletions .tmp/drop/pbiviz.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .tmp/drop/status
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1693783140011
PBI_CV_9894B302_1DFF_4A96_ABFE_BF8588197166
43 changes: 43 additions & 0 deletions .tmp/drop/visual.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
p {
font-size: 20px;
font-weight: bold;
}
p em {
background: yellow;
padding: 5px;
}
.xAxis path {
display: none;
}
.helpLink {
position: absolute;
top: 0px;
right: 12px;
display: block;
width: 20px;
height: 20px;
border: 2px solid #80B0E0;
border-radius: 20px;
color: #80B0E0;
text-align: center;
font-size: 16px;
line-height: 20px;
}
.helpLink.hidden {
display: none;
}
.LandingPage {
position: absolute;
text-align: center;
top: 12px;
font-size: 12pt;
right: 15px;
}
.LandingPageHelpLink {
position: absolute;
text-decoration: underline;
top: 50px;
font-size: 12pt;
right: 15px;
}

1 change: 1 addition & 0 deletions .tmp/drop/visual.css.map

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

1 change: 1 addition & 0 deletions .tmp/drop/visual.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .tmp/drop/visual.js.map

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions .tmp/precompile/visualPlugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { BarChart } from "../../src/barChart";
import powerbiVisualsApi from "powerbi-visuals-api";
import IVisualPlugin = powerbiVisualsApi.visuals.plugins.IVisualPlugin;
import VisualConstructorOptions = powerbiVisualsApi.extensibility.visual.VisualConstructorOptions;
import DialogConstructorOptions = powerbiVisualsApi.extensibility.visual.DialogConstructorOptions;
var powerbiKey: any = "powerbi";
var powerbi: any = window[powerbiKey];
var PBI_CV_9894B302_1DFF_4A96_ABFE_BF8588197166: IVisualPlugin = {
name: 'PBI_CV_9894B302_1DFF_4A96_ABFE_BF8588197166',
displayName: 'barChart',
class: 'BarChart',
apiVersion: '3.8.0',
create: (options?: VisualConstructorOptions) => {
if (BarChart) {
return new BarChart(options);
}
throw 'Visual instance not found';
},
createModalDialog: (dialogId: string, options: DialogConstructorOptions, initialState: object) => {
const dialogRegistry = (<any>globalThis).dialogRegistry;
if (dialogId in dialogRegistry) {
new dialogRegistry[dialogId](options, initialState);
}
},
custom: true
};
if (typeof powerbi !== "undefined") {
powerbi.visuals = powerbi.visuals || {};
powerbi.visuals.plugins = powerbi.visuals.plugins || {};
powerbi.visuals.plugins["PBI_CV_9894B302_1DFF_4A96_ABFE_BF8588197166"] = PBI_CV_9894B302_1DFF_4A96_ABFE_BF8588197166;
}
export default PBI_CV_9894B302_1DFF_4A96_ABFE_BF8588197166;
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

Loading