powerbi-visuals-tools 5.2.0-beta.2 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +7 -0
- package/LICENSE +21 -0
- package/README.md +3 -4
- package/bin/pbiviz.js +1 -0
- package/certs/PowerBICustomVisualTest_private.key +26 -26
- package/certs/PowerBICustomVisualTest_public.crt +17 -17
- package/lib/CertificateTools.js +10 -5
- package/lib/CommandManager.js +2 -2
- package/lib/VisualManager.js +21 -14
- package/lib/features/ESLint.js +1 -1
- package/lib/features/TotalSubTotal.js +1 -1
- package/package.json +8 -8
- package/templates/visuals/default/package.json +1 -1
- package/templates/visuals/default/src/settings.ts +1 -1
- package/templates/visuals/default/src/visual.ts +1 -1
- package/templates/visuals/rhtml/capabilities.json +6 -1
- package/templates/visuals/rhtml/package.json +1 -1
- package/templates/visuals/rhtml/src/settings.ts +1 -1
- package/templates/visuals/rhtml/src/visual.ts +1 -1
- package/templates/visuals/rvisual/package.json +1 -1
- package/templates/visuals/rvisual/src/settings.ts +1 -1
- package/templates/visuals/rvisual/src/visual.ts +1 -1
- package/templates/visuals/slicer/package.json +1 -1
- package/templates/visuals/slicer/src/settings.ts +1 -1
- package/templates/visuals/slicer/src/visual.ts +1 -1
- package/templates/visuals/table/package.json +1 -1
package/Changelog.md
CHANGED
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
This page contains information about changes to the PowerBI Visual Tools (pbiviz).
|
|
4
4
|
|
|
5
|
+
## 5.2.1
|
|
6
|
+
* Fixed errors output when packaging the visual
|
|
7
|
+
* Fixed `RHTML` template render error
|
|
8
|
+
|
|
5
9
|
## 5.2.0
|
|
6
10
|
* Integrated PAC validation
|
|
7
11
|
|
|
12
|
+
## 5.1.1
|
|
13
|
+
* Updated crypto import to fix error in old Node versions
|
|
14
|
+
|
|
8
15
|
## 5.1.0
|
|
9
16
|
* New flag `--skip-api` to skip verifying api version. It might produce different errors in visual, so use it only in some specific cases (ex. installing something during the build process brakes packages managed by monorepo managers).
|
|
10
17
|
* New flag `--all-locales` to disable optimization using localization loader. It's recommended not to use this flag because all locales take a huge amount of package size. If you need just a few of them follow [this guide](https://learn.microsoft.com/en-us/power-bi/developer/visuals/localization?tabs=English#step-5---add-a-resources-file-for-each-language). In this case, only declared in stringResources locales will be added to your visual package.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
package/README.md
CHANGED
|
@@ -41,15 +41,14 @@ pbiviz
|
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
## How to build a visual?
|
|
44
|
-
Refer to our [documentation repository](https://
|
|
44
|
+
Refer to our [documentation repository](https://learn.microsoft.com/en-us/power-bi/developer/visuals/develop-circle-card)
|
|
45
45
|
|
|
46
46
|
## Usage
|
|
47
47
|
|
|
48
48
|
You can learn more about using these tools in the following guides
|
|
49
49
|
|
|
50
|
-
* [
|
|
51
|
-
* [
|
|
52
|
-
* [Debugging Guide](https://microsoft.github.io/PowerBI-visuals/docs/how-to-guide/how-to-debug)
|
|
50
|
+
* [Usage Guide](https://learn.microsoft.com/en-us/power-bi/developer/visuals/develop-circle-card#create-a-development-project)
|
|
51
|
+
* [Debugging Guide](https://learn.microsoft.com/en-us/power-bi/developer/visuals/visuals-how-to-debug)
|
|
53
52
|
|
|
54
53
|
## PowerBI Visuals Tools Changes
|
|
55
54
|
|
package/bin/pbiviz.js
CHANGED
|
@@ -89,6 +89,7 @@ pbiviz
|
|
|
89
89
|
.option('--no-stats', "Doesn't generate statistics files")
|
|
90
90
|
.option('--skip-api', "Skips powerbi-visuals-api verifying")
|
|
91
91
|
.option('-l, --all-locales', "Keeps all locale files in the package. By default only used inside stringResources folder locales are included.")
|
|
92
|
+
.option('-v, --verbose', "Enables verbose logging")
|
|
92
93
|
.addOption(new Option('-c, --compression <compressionLevel>', "Enables compression of visual package")
|
|
93
94
|
.choices(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])
|
|
94
95
|
.default('6')
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
-----BEGIN PRIVATE KEY-----
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|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yXtnh2lBJ3xvYZ26MEln6skPC6Iuk
|
|
16
|
+
DBKF3MJ0RNoU3KaBaVDVh6d6QUkSqQm+t5GAeqEHx8elyzLtypUuodYnG4p4poZ3
|
|
17
|
+
UUlf1XA6m8NsLNl2/1XYxwH6/cOZ8/zPcaFAREChc7lEqC/QOAz+nOH4aS2dJS+l
|
|
18
|
+
Q93CnBuVNOscbCHHrg==
|
|
19
19
|
-----END CERTIFICATE-----
|
package/lib/CertificateTools.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-case-declarations */
|
|
1
2
|
/*
|
|
2
3
|
* Power BI Visual CLI
|
|
3
4
|
*
|
|
@@ -28,7 +29,7 @@ import { exec as nodeExec } from 'child_process';
|
|
|
28
29
|
import fs from 'fs-extra';
|
|
29
30
|
import os from 'os';
|
|
30
31
|
import path from 'path';
|
|
31
|
-
import crypto
|
|
32
|
+
import crypto from "crypto";
|
|
32
33
|
import { getRootPath, readJsonFromRoot } from './utils.js';
|
|
33
34
|
import ConsoleWriter from './ConsoleWriter.js';
|
|
34
35
|
const certSafePeriod = 1000 * 60 * 60 * 24; // 24 hours
|
|
@@ -114,11 +115,8 @@ export async function createCertFile(config, open) {
|
|
|
114
115
|
}
|
|
115
116
|
break;
|
|
116
117
|
case "win32":
|
|
117
|
-
// eslint-disable-next-line no-case-declarations
|
|
118
|
-
let passphrase = "";
|
|
119
118
|
// for windows 7 and others
|
|
120
119
|
// 6.1 - Windows 7
|
|
121
|
-
// eslint-disable-next-line no-case-declarations
|
|
122
120
|
const osVersion = os.release().split(".");
|
|
123
121
|
if ((Number(osVersion[0]) === 6 && Number(osVersion[1]) === 1) || Number(osVersion[0]) < 6) {
|
|
124
122
|
await removeCertFiles(certPath, keyPath, pfxPath);
|
|
@@ -140,7 +138,14 @@ export async function createCertFile(config, open) {
|
|
|
140
138
|
}
|
|
141
139
|
break;
|
|
142
140
|
}
|
|
143
|
-
|
|
141
|
+
let randomValues;
|
|
142
|
+
if (crypto.getRandomValues !== undefined) {
|
|
143
|
+
randomValues = crypto.getRandomValues(new Uint32Array(1));
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
randomValues = crypto.webcrypto.getRandomValues(new Uint32Array(1));
|
|
147
|
+
}
|
|
148
|
+
const passphrase = randomValues[0].toString().substring(2);
|
|
144
149
|
config.server.passphrase = passphrase;
|
|
145
150
|
fs.writeFileSync(path.join(rootPath, confPath), JSON.stringify(config));
|
|
146
151
|
// for windows 8 / 8.1 / server 2012 R2 /
|
package/lib/CommandManager.js
CHANGED
|
@@ -40,9 +40,9 @@ export default class CommandManager {
|
|
|
40
40
|
};
|
|
41
41
|
new VisualManager(rootPath)
|
|
42
42
|
.prepareVisual()
|
|
43
|
-
.validateVisual()
|
|
43
|
+
.validateVisual(options.verbose)
|
|
44
44
|
.initializeWebpack(webpackOptions)
|
|
45
|
-
.then(visualManager => visualManager.generatePackage());
|
|
45
|
+
.then(visualManager => visualManager.generatePackage(options.verbose));
|
|
46
46
|
}
|
|
47
47
|
static new({ force, template }, name, rootPath) {
|
|
48
48
|
const generateOptions = {
|
package/lib/VisualManager.js
CHANGED
|
@@ -78,12 +78,12 @@ export default class VisualManager {
|
|
|
78
78
|
this.compiler = webpack(this.webpackConfig);
|
|
79
79
|
return this;
|
|
80
80
|
}
|
|
81
|
-
generatePackage() {
|
|
81
|
+
generatePackage(verbose = false) {
|
|
82
82
|
const callback = (err, stats) => {
|
|
83
|
+
this.parseCompilationResults(err, stats);
|
|
83
84
|
this.createPackageInstance();
|
|
84
85
|
const logs = this.validatePackage();
|
|
85
|
-
this.outputResults(logs);
|
|
86
|
-
this.parseCompilationResults(err, stats);
|
|
86
|
+
this.outputResults(logs, verbose);
|
|
87
87
|
};
|
|
88
88
|
this.compiler.run(callback);
|
|
89
89
|
}
|
|
@@ -114,10 +114,10 @@ export default class VisualManager {
|
|
|
114
114
|
process.exit(1);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
validateVisual() {
|
|
117
|
+
validateVisual(verbose = false) {
|
|
118
118
|
this.featureManager = new FeatureManager();
|
|
119
119
|
const { status, logs } = this.featureManager.validate(Stage.PreBuild, this.visual);
|
|
120
|
-
this.outputResults(logs);
|
|
120
|
+
this.outputResults(logs, verbose);
|
|
121
121
|
if (status === Status.Error) {
|
|
122
122
|
process.exit(1);
|
|
123
123
|
}
|
|
@@ -128,17 +128,21 @@ export default class VisualManager {
|
|
|
128
128
|
const { logs } = featureManager.validate(Stage.PostBuild, this.package);
|
|
129
129
|
return logs;
|
|
130
130
|
}
|
|
131
|
-
outputResults({ errors, deprecation, warnings, info }) {
|
|
132
|
-
const
|
|
133
|
-
|
|
131
|
+
outputResults({ errors, deprecation, warnings, info }, verbose) {
|
|
132
|
+
const headerMessage = {
|
|
133
|
+
error: `Visual doesn't support some features required for all custom visuals:`,
|
|
134
134
|
deprecation: `Some features are going to be required soon, please update the visual:`,
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
warning: `Visual doesn't support some features recommended for all custom visuals:`,
|
|
136
|
+
verboseInfo: `Visual can be improved by adding some features:`,
|
|
137
|
+
shortInfo: `Visual can be improved by adding ${info.length} more optional features.`
|
|
137
138
|
};
|
|
138
|
-
this.outputLogsWithHeadMessage(
|
|
139
|
-
this.outputLogsWithHeadMessage(
|
|
140
|
-
this.outputLogsWithHeadMessage(
|
|
141
|
-
|
|
139
|
+
this.outputLogsWithHeadMessage(headerMessage.error, errors, Severity.Error);
|
|
140
|
+
this.outputLogsWithHeadMessage(headerMessage.deprecation, deprecation, Severity.Deprecation);
|
|
141
|
+
this.outputLogsWithHeadMessage(headerMessage.warning, warnings, Severity.Warning);
|
|
142
|
+
const verboseSuggestion = 'Run `pbiviz package` with --verbose flag to see more details.';
|
|
143
|
+
const headerInfoMessage = headerMessage[verbose ? "verboseInfo" : "shortInfo"];
|
|
144
|
+
const infoLogs = (!info.length || verbose) ? info : [verboseSuggestion];
|
|
145
|
+
this.outputLogsWithHeadMessage(headerInfoMessage, infoLogs, Severity.Info);
|
|
142
146
|
}
|
|
143
147
|
displayInfo() {
|
|
144
148
|
if (this.pbivizConfig) {
|
|
@@ -239,6 +243,9 @@ export default class VisualManager {
|
|
|
239
243
|
if (!err && !stats?.compilation.errors.length) {
|
|
240
244
|
ConsoleWriter.done('Build completed successfully');
|
|
241
245
|
}
|
|
246
|
+
else {
|
|
247
|
+
process.exit(1);
|
|
248
|
+
}
|
|
242
249
|
}
|
|
243
250
|
outputLogsWithHeadMessage(headMessage, logs, severity) {
|
|
244
251
|
if (!logs.length) {
|
package/lib/features/ESLint.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Severity, Stage, VisualFeatureType } from "./FeatureTypes.js";
|
|
|
2
2
|
export default class ESLint {
|
|
3
3
|
static featureName = "ESLint";
|
|
4
4
|
static documentationLink = "https://github.com/microsoft/eslint-plugin-powerbi-visuals";
|
|
5
|
-
static severity = Severity.
|
|
5
|
+
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PreBuild;
|
|
7
7
|
static visualFeatureType = VisualFeatureType.All;
|
|
8
8
|
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
@@ -4,7 +4,7 @@ export default class TotalSubTotal {
|
|
|
4
4
|
static documentationLink = "https://learn.microsoft.com/en-us/power-bi/developer/visuals/total-subtotal-api";
|
|
5
5
|
static severity = Severity.Warning;
|
|
6
6
|
static stage = Stage.PostBuild;
|
|
7
|
-
static visualFeatureType = VisualFeatureType.Matrix
|
|
7
|
+
static visualFeatureType = VisualFeatureType.Matrix;
|
|
8
8
|
static errorMessage = `${this.featureName} - ${this.documentationLink}`;
|
|
9
9
|
static isSupported(packageInstance) {
|
|
10
10
|
return packageInstance.isCapabilityEnabled({ subtotals: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerbi-visuals-tools",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "Command line tool for creating and publishing visuals for Power BI",
|
|
5
5
|
"main": "./bin/pbiviz.js",
|
|
6
6
|
"type": "module",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/Microsoft/PowerBI-visuals-tools#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@typescript-eslint/parser": "^
|
|
33
|
-
"assert": "^2.
|
|
32
|
+
"@typescript-eslint/parser": "^6.7.5",
|
|
33
|
+
"assert": "^2.1.0",
|
|
34
34
|
"async": "^3.2.4",
|
|
35
35
|
"browserify-zlib": "^0.2.0",
|
|
36
36
|
"buffer": "^6.0.3",
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
"string_decoder": "^1.3.0",
|
|
69
69
|
"terser-webpack-plugin": "^5.3.9",
|
|
70
70
|
"timers-browserify": "^2.0.12",
|
|
71
|
-
"ts-loader": "^9.
|
|
71
|
+
"ts-loader": "^9.5.0",
|
|
72
72
|
"tty-browserify": "^0.0.1",
|
|
73
73
|
"typescript": "^4.9.5",
|
|
74
|
-
"url": "^0.11.
|
|
74
|
+
"url": "^0.11.3",
|
|
75
75
|
"util": "^0.12.5",
|
|
76
76
|
"vm-browserify": "^1.1.2",
|
|
77
77
|
"webpack": "^5.88.2",
|
|
78
|
-
"webpack-bundle-analyzer": "4.9.
|
|
78
|
+
"webpack-bundle-analyzer": "4.9.1",
|
|
79
79
|
"webpack-dev-server": "^4.15.1"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
83
|
-
"eslint": "^8.
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^6.7.5",
|
|
83
|
+
"eslint": "^8.51.0",
|
|
84
84
|
"eslint-plugin-powerbi-visuals": "^0.8.1",
|
|
85
85
|
"jasmine": "5.1.0",
|
|
86
86
|
"jasmine-spec-reporter": "7.0.0",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@types/d3": "7.4.0",
|
|
18
18
|
"d3": "7.8.5",
|
|
19
19
|
"powerbi-visuals-api": "5.4.0",
|
|
20
|
-
"powerbi-visuals-utils-formattingmodel": "
|
|
20
|
+
"powerbi-visuals-utils-formattingmodel": "6.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
|
|
30
30
|
|
|
31
|
-
import FormattingSettingsCard = formattingSettings.
|
|
31
|
+
import FormattingSettingsCard = formattingSettings.SimpleCard;
|
|
32
32
|
import FormattingSettingsSlice = formattingSettings.Slice;
|
|
33
33
|
import FormattingSettingsModel = formattingSettings.Model;
|
|
34
34
|
|
|
@@ -59,7 +59,7 @@ export class Visual implements IVisual {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
public update(options: VisualUpdateOptions) {
|
|
62
|
-
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
|
|
62
|
+
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
|
|
63
63
|
|
|
64
64
|
console.log('Visual update', options);
|
|
65
65
|
if (this.textNode) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
|
|
30
30
|
|
|
31
|
-
import FormattingSettingsCard = formattingSettings.
|
|
31
|
+
import FormattingSettingsCard = formattingSettings.SimpleCard;
|
|
32
32
|
import FormattingSettingsSlice = formattingSettings.Slice;
|
|
33
33
|
import FormattingSettingsModel = formattingSettings.Model;
|
|
34
34
|
|
|
@@ -111,7 +111,7 @@ export class Visual implements IVisual {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
const dataView: DataView = options.dataViews[0];
|
|
114
|
-
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
|
|
114
|
+
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
|
|
115
115
|
|
|
116
116
|
let payloadBase64: string = null;
|
|
117
117
|
if (dataView.scriptResult && dataView.scriptResult.payloadBase64) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
|
|
30
30
|
|
|
31
|
-
import FormattingSettingsCard = formattingSettings.
|
|
31
|
+
import FormattingSettingsCard = formattingSettings.SimpleCard;
|
|
32
32
|
import FormattingSettingsSlice = formattingSettings.Slice;
|
|
33
33
|
import FormattingSettingsModel = formattingSettings.Model;
|
|
34
34
|
|
|
@@ -63,7 +63,7 @@ export class Visual implements IVisual {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
const dataView: DataView = options.dataViews[0];
|
|
66
|
-
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
|
|
66
|
+
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
|
|
67
67
|
|
|
68
68
|
let imageUrl: string = null;
|
|
69
69
|
if (dataView.scriptResult && dataView.scriptResult.payloadBase64) {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
import { formattingSettings } from "powerbi-visuals-utils-formattingmodel";
|
|
30
30
|
|
|
31
|
-
import FormattingSettingsCard = formattingSettings.
|
|
31
|
+
import FormattingSettingsCard = formattingSettings.SimpleCard;
|
|
32
32
|
import FormattingSettingsSlice = formattingSettings.Slice;
|
|
33
33
|
import FormattingSettingsModel = formattingSettings.Model;
|
|
34
34
|
|
|
@@ -59,7 +59,7 @@ export class Visual implements IVisual {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
public update(options: VisualUpdateOptions) {
|
|
62
|
-
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews);
|
|
62
|
+
this.formattingSettings = this.formattingSettingsService.populateFormattingSettingsModel(VisualFormattingSettingsModel, options.dataViews[0]);
|
|
63
63
|
console.log("Visual update", options);
|
|
64
64
|
if (this.textNode) {
|
|
65
65
|
this.textNode.textContent = (this.updateCount++).toString();
|