Repository navigation
Expand file tree
/
Copy pathvisual.d.ts
More file actions
70 lines (70 loc) · 1.58 KB
/
Copy pathvisual.d.ts
File metadata and controls
70 lines (70 loc) · 1.58 KB
1
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*! powerbi-client v2.1.1 | (c) 2016 Microsoft Corporation MIT */
import * as models from 'powerbi-models';
import { IFilterable } from './ifilterable';
import { IPageNode } from './page';
/**
* A Visual node within a report hierarchy
*
* @export
* @interface IVisualNode
*/
export interface IVisualNode {
name: string;
page: IPageNode;
}
/**
* A Power BI visual within a page
*
* @export
* @class Visual
* @implements {IVisualNode}
* @implements {IFilterable}
*/
export declare class Visual implements IVisualNode, IFilterable {
/**
* The visual name
*
* @type {string}
*/
name: string;
/**
* The parent Power BI page that contains this visual
*
* @type {IPageNode}
*/
page: IPageNode;
constructor(page: IPageNode, name: string);
/**
* Gets all page level filters within a report.
*
* ```javascript
* visual.getFilters()
* .then(pages => { ... });
* ```
*
* @returns {(Promise<models.IFilter[]>)}
*/
getFilters(): Promise<models.IFilter[]>;
/**
* Removes all filters on this page of the report.
*
* ```javascript
* visual.removeFilters();
* ```
*
* @returns {Promise<void>}
*/
removeFilters(): Promise<void>;
/**
* Sets all filters at the visual level of the page.
*
* ```javascript
* visual.setFilters(filters)
* .catch(errors => { ... });
* ```
*
* @param {(models.IFilter[])} filters
* @returns {Promise<void>}
*/
setFilters(filters: models.IFilter[]): Promise<void>;
}