1 |
|
2 | declare function requireAll(requireContext: any): any;
|
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 | declare module powerbi.visuals.samples {
|
32 | import ArcDescriptor = D3.Layout.ArcDescriptor;
|
33 | interface AsterPlotData {
|
34 | dataPoints: AsterDataPoint[];
|
35 | highlightedDataPoints?: AsterDataPoint[];
|
36 | settings: AsterPlotSettings;
|
37 | hasHighlights: boolean;
|
38 | legendData: LegendData;
|
39 | labelFormatter: IValueFormatter;
|
40 | centerText: string;
|
41 | }
|
42 | interface AsterArcDescriptor extends ArcDescriptor {
|
43 | isLabelHasConflict?: boolean;
|
44 | data: AsterDataPoint;
|
45 | }
|
46 | interface AsterDataPoint extends SelectableDataPoint {
|
47 | color: string;
|
48 | sliceHeight: number;
|
49 | sliceWidth: number;
|
50 | label: string;
|
51 | highlight?: boolean;
|
52 | tooltipInfo: TooltipDataItem[];
|
53 | labelFontSize: string;
|
54 | }
|
55 | interface AsterPlotBehaviorOptions {
|
56 | selection: D3.Selection;
|
57 | clearCatcher: D3.Selection;
|
58 | interactivityService: IInteractivityService;
|
59 | hasHighlights: boolean;
|
60 | }
|
61 | class AsterPlotWarning implements IVisualWarning {
|
62 | private message;
|
63 | constructor(message: string);
|
64 | code: string;
|
65 | getMessages(resourceProvider: jsCommon.IStringResourceProvider): IVisualErrorMessage;
|
66 | }
|
67 | class AsterPlotSettings {
|
68 | static Default: AsterPlotSettings;
|
69 | static parse(dataView: DataView, capabilities: VisualCapabilities): AsterPlotSettings;
|
70 | static getProperties(capabilities: VisualCapabilities): {
|
71 | [i: string]: {
|
72 | [i: string]: DataViewObjectPropertyIdentifier;
|
73 | };
|
74 | } & {
|
75 | general: {
|
76 | formatString: DataViewObjectPropertyIdentifier;
|
77 | };
|
78 | dataPoint: {
|
79 | fill: DataViewObjectPropertyIdentifier;
|
80 | };
|
81 | };
|
82 | static createEnumTypeFromEnum(type: any): IEnumType;
|
83 | private static getValueFnByType(type);
|
84 | static enumerateObjectInstances(settings: AsterPlotSettings, options: EnumerateVisualObjectInstancesOptions, capabilities: VisualCapabilities): ObjectEnumerationBuilder;
|
85 | originalSettings: AsterPlotSettings;
|
86 | createOriginalSettings(): void;
|
87 | legend: {
|
88 | show: boolean;
|
89 | position: string;
|
90 | showTitle: boolean;
|
91 | titleText: string;
|
92 | labelColor: string;
|
93 | fontSize: number;
|
94 | };
|
95 | labels: {
|
96 | show: boolean;
|
97 | color: string;
|
98 | displayUnits: number;
|
99 | precision: number;
|
100 | fontSize: number;
|
101 | };
|
102 | outerLine: {
|
103 | show: boolean;
|
104 | thickness: number;
|
105 | };
|
106 | }
|
107 | class AsterPlotColumns<T> {
|
108 | static Roles: AsterPlotColumns<string>;
|
109 | static getColumnSources(dataView: DataView): AsterPlotColumns<DataViewMetadataColumn>;
|
110 | static getTableValues(dataView: DataView): AsterPlotColumns<any[]>;
|
111 | static getTableRows(dataView: DataView): AsterPlotColumns<any[]>[];
|
112 | static getCategoricalValues(dataView: DataView): AsterPlotColumns<any[]>;
|
113 | static getSeriesValues(dataView: DataView): string[];
|
114 | static getCategoricalColumns(dataView: DataView): AsterPlotColumns<DataViewCategoryColumn & DataViewValueColumn[] & DataViewValueColumns>;
|
115 | private static getColumnSourcesT<T>(dataView);
|
116 | Category: T;
|
117 | Y: T;
|
118 | }
|
119 | class AsterPlot implements IVisual {
|
120 | static capabilities: VisualCapabilities;
|
121 | private static AsterSlices;
|
122 | private static AsterSlice;
|
123 | private static AsterHighlightedSlice;
|
124 | private static OuterLine;
|
125 | private static labelGraphicsContextClass;
|
126 | private static linesGraphicsContextClass;
|
127 | private static CenterLabelClass;
|
128 | private static CenterTextFontHeightCoefficient;
|
129 | private static CenterTextFontWidthCoefficient;
|
130 | static converter(dataView: DataView, colors: IDataColorPalette): AsterPlotData;
|
131 | private static parseSettings(dataView, categorySource);
|
132 | private layout;
|
133 | private svg;
|
134 | private mainGroupElement;
|
135 | private mainLabelsElement;
|
136 | private slicesElement;
|
137 | private centerText;
|
138 | private clearCatcher;
|
139 | private colors;
|
140 | private hostServices;
|
141 | private interactivityService;
|
142 | private legend;
|
143 | private data;
|
144 | private settings;
|
145 | private behavior;
|
146 | init(options: VisualInitOptions): void;
|
147 | update(options: VisualUpdateOptions): void;
|
148 | private renderArcsAndLabels(duration, isHighlight?);
|
149 | private getLabelLayout(arc, viewport);
|
150 | private drawLabels(data, context, layout, viewport, outlineArc, labelArc);
|
151 | private renderLegend();
|
152 | private updateViewPortAccordingToLegend();
|
153 | private drawOuterLine(innerRadius, radius, data);
|
154 | private drawCenterText(innerRadius);
|
155 | private clear();
|
156 | onClearSelection(): void;
|
157 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumerationObject;
|
158 | }
|
159 | }
|
160 |
|
161 | declare module powerbi.visuals.samples {
|
162 | import IStringResourceProvider = jsCommon.IStringResourceProvider;
|
163 | interface TornadoChartTextOptions {
|
164 | fontFamily?: string;
|
165 | fontSize?: number;
|
166 | sizeUnit?: string;
|
167 | }
|
168 | interface TornadoChartConstructorOptions {
|
169 | svg?: D3.Selection;
|
170 | animator?: IGenericAnimator;
|
171 | margin?: IMargin;
|
172 | columnPadding?: number;
|
173 | }
|
174 | interface TornadoChartSeries {
|
175 | fill: string;
|
176 | name: string;
|
177 | selectionId: SelectionId;
|
178 | categoryAxisEnd: number;
|
179 | }
|
180 | interface TornadoChartSettings {
|
181 | labelOutsideFillColor: string;
|
182 | categoriesFillColor: string;
|
183 | labelSettings: VisualDataLabelsSettings;
|
184 | showLegend?: boolean;
|
185 | showCategories?: boolean;
|
186 | legendFontSize?: number;
|
187 | legendColor?: string;
|
188 | getLabelValueFormatter?: (formatString: string) => IValueFormatter;
|
189 | }
|
190 | interface TornadoChartDataView {
|
191 | categories: TextData[];
|
192 | series: TornadoChartSeries[];
|
193 | settings: TornadoChartSettings;
|
194 | legend: LegendData;
|
195 | dataPoints: TornadoChartPoint[];
|
196 | highlightedDataPoints?: TornadoChartPoint[];
|
197 | hasDynamicSeries: boolean;
|
198 | hasHighlights: boolean;
|
199 | labelHeight: number;
|
200 | maxLabelsWidth: number;
|
201 | legendObjectProperties: DataViewObject;
|
202 | }
|
203 | interface TornadoChartPoint extends SelectableDataPoint {
|
204 | dx?: number;
|
205 | dy?: number;
|
206 | px?: number;
|
207 | py?: number;
|
208 | angle?: number;
|
209 | width?: number;
|
210 | height?: number;
|
211 | label?: LabelData;
|
212 | color: string;
|
213 | tooltipData: TooltipDataItem[];
|
214 | categoryIndex: number;
|
215 | highlight?: boolean;
|
216 | value: number;
|
217 | minValue: number;
|
218 | maxValue: number;
|
219 | formatString: string;
|
220 | }
|
221 | interface LabelData {
|
222 | dx: number;
|
223 | value: number | string;
|
224 | source: number | string;
|
225 | color: string;
|
226 | }
|
227 | interface LineData {
|
228 | x1: number;
|
229 | y1: number;
|
230 | x2: number;
|
231 | y2: number;
|
232 | }
|
233 | interface TextData {
|
234 | text: string;
|
235 | height: number;
|
236 | width: number;
|
237 | textProperties: TextProperties;
|
238 | }
|
239 | interface TornadoBehaviorOptions {
|
240 | columns: D3.Selection;
|
241 | clearCatcher: D3.Selection;
|
242 | interactivityService: IInteractivityService;
|
243 | }
|
244 | class TornadoChartWarning implements IVisualWarning {
|
245 | code: string;
|
246 | getMessages(resourceProvider: IStringResourceProvider): IVisualErrorMessage;
|
247 | }
|
248 | function getTornadoChartWarning(): IVisualWarning;
|
249 | class TornadoChart implements IVisual {
|
250 | private static ClassName;
|
251 | static capabilities: VisualCapabilities;
|
252 | private static Properties;
|
253 | static getProperties(capabilities: VisualCapabilities): any;
|
254 | private static Columns;
|
255 | private static Column;
|
256 | private static Axes;
|
257 | private static Axis;
|
258 | private static Labels;
|
259 | private static Label;
|
260 | private static LabelTitle;
|
261 | private static LabelText;
|
262 | private static Categories;
|
263 | private static Category;
|
264 | private static CategoryTitle;
|
265 | private static CategoryText;
|
266 | private static MaxSeries;
|
267 | private static MaxPrecision;
|
268 | private static LabelPadding;
|
269 | private static CategoryMinHeight;
|
270 | private static DefaultFontSize;
|
271 | private static DefaultLegendFontSize;
|
272 | private static HighlightedShapeFactor;
|
273 | private static CategoryLabelMargin;
|
274 | static ScrollBarWidth: number;
|
275 | private static DefaultTornadoChartSettings;
|
276 | static converter(dataView: DataView, textOptions: TornadoChartTextOptions, colors: IDataColorPalette): TornadoChartDataView;
|
277 | static parseSeries(dataViewValueColumns: DataViewValueColumns, index: number, isGrouped: boolean, columnGroup: DataViewValueColumnGroup, colors: IDataColorPalette): TornadoChartSeries;
|
278 | private static getColor(properties, defaultColor, objects, colors);
|
279 | private static getTextData(text, textOptions, measureWidth?, measureHeight?, overrideFontSize?);
|
280 | colors: IDataColorPalette;
|
281 | textOptions: TornadoChartTextOptions;
|
282 | private columnPadding;
|
283 | private leftLabelMargin;
|
284 | private durationAnimations;
|
285 | private InnerTextHeightDelta;
|
286 | private margin;
|
287 | private root;
|
288 | private svg;
|
289 | private main;
|
290 | private columns;
|
291 | private axes;
|
292 | private labels;
|
293 | private categories;
|
294 | private clearCatcher;
|
295 | private legend;
|
296 | private behavior;
|
297 | private interactivityService;
|
298 | private animator;
|
299 | private hostService;
|
300 | private scrolling;
|
301 | private viewport;
|
302 | private dataView;
|
303 | private heightColumn;
|
304 | private allLabelsWidth;
|
305 | private allColumnsWidth;
|
306 | private columnWidth;
|
307 | constructor(tornadoChartConstructorOptions?: TornadoChartConstructorOptions);
|
308 | init(visualInitOptions: VisualInitOptions): void;
|
309 | update(visualUpdateOptions: VisualUpdateOptions): void;
|
310 | private validateDataView(dataView);
|
311 | private updateElements();
|
312 | private static parseSettings(objects, value, colors);
|
313 | private static getPrecision(objects);
|
314 | private static getLegendData(series, hasDynamicSeries);
|
315 | private render();
|
316 | private clearData();
|
317 | onClearSelection(): void;
|
318 | private renderWithScrolling(tornadoChartDataView, scrollStart, scrollEnd);
|
319 | private updateViewport();
|
320 | private computeHeightColumn();
|
321 | private renderMiddleSection();
|
322 | /**
|
323 | * Calculate the width, dx value and label info for every data point
|
324 | */
|
325 | private calculateDataPoints(dataPoints);
|
326 | private renderColumns(columnsData, selectSecondSeries?);
|
327 | private renderTooltip(selection);
|
328 | private getColumnWidth(value, minValue, maxValue, width);
|
329 | private getLabelData(value, dxColumn, columnWidth, isColumnPositionLeft, formatStringProp, settings?);
|
330 | private renderAxes();
|
331 | private generateAxesData();
|
332 | private renderLabels(dataPoints, labelsSettings);
|
333 | private renderCategories();
|
334 | private renderLegend();
|
335 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
336 | private enumerateDataPoint(enumeration);
|
337 | private enumerateCategoryAxis(enumeration);
|
338 | destroy(): void;
|
339 | }
|
340 | }
|
341 |
|
342 | declare module powerbi.visuals.samples {
|
343 | import ClassAndSelector = jsCommon.CssConstants.ClassAndSelector;
|
344 | import ISize = shapes.ISize;
|
345 | const enum MekkoChartType {
|
346 | HundredPercentStackedColumn = 0,
|
347 | }
|
348 | interface MekkoColumnChartDrawInfo {
|
349 | shapesSelection: D3.Selection;
|
350 | viewport: IViewport;
|
351 | axisOptions: MekkoColumnAxisOptions;
|
352 | labelDataPoints: MekkoLabelDataPoint[];
|
353 | }
|
354 | interface MekkoLabelDataPointsGroup {
|
355 | labelDataPoints: MekkoLabelDataPoint[];
|
356 | maxNumberOfLabels: number;
|
357 | }
|
358 | interface MekkoLabelParentRect {
|
359 |
|
360 | rect: IRect;
|
361 |
|
362 | orientation: NewRectOrientation;
|
363 |
|
364 | validPositions: RectLabelPosition[];
|
365 | }
|
366 | interface MekkoLabelDataPoint {
|
367 | isParentRect?: boolean;
|
368 |
|
369 | text: string;
|
370 |
|
371 | textSize: ISize;
|
372 |
|
373 | isPreferred: boolean;
|
374 |
|
375 | insideFill: string;
|
376 |
|
377 | outsideFill: string;
|
378 |
|
379 | hasBeenRendered?: boolean;
|
380 |
|
381 | parentType: LabelDataPointParentType;
|
382 |
|
383 | parentShape: MekkoLabelParentRect;
|
384 |
|
385 | identity: powerbi.visuals.SelectionId;
|
386 |
|
387 | fontSize?: number;
|
388 |
|
389 | secondRowText?: string;
|
390 |
|
391 | weight?: number;
|
392 | }
|
393 | interface MekkoVisualRenderResult {
|
394 | dataPoints: SelectableDataPoint[];
|
395 | behaviorOptions: any;
|
396 | labelDataPoints: MekkoLabelDataPoint[];
|
397 | labelsAreNumeric: boolean;
|
398 | labelDataPointGroups?: MekkoLabelDataPointsGroup[];
|
399 | }
|
400 | interface MekkoCalculateScaleAndDomainOptions extends CalculateScaleAndDomainOptions {
|
401 | }
|
402 | interface MekkoConstructorOptions {
|
403 | chartType: MekkoChartType;
|
404 | isScrollable?: boolean;
|
405 | animator?: IGenericAnimator;
|
406 | cartesianSmallViewPortProperties?: CartesianSmallViewPortProperties;
|
407 | behavior?: IInteractiveBehavior;
|
408 | }
|
409 | interface MekkoColumnChartData extends ColumnChartData {
|
410 | borderSettings: MekkoBorderSettings;
|
411 | categoriesWidth: number[];
|
412 | }
|
413 | interface MekkoBorderSettings {
|
414 | show: boolean;
|
415 | color: any;
|
416 | width: number;
|
417 | maxWidth?: number;
|
418 | }
|
419 | interface MekkoLabelSettings {
|
420 | maxPrecision: number;
|
421 | minPrecision: number;
|
422 | }
|
423 | interface MekkoColumnAxisOptions extends ColumnAxisOptions {
|
424 | }
|
425 | interface IMekkoColumnLayout extends IColumnLayout {
|
426 | shapeBorder?: {
|
427 | width: (d: ColumnChartDataPoint) => number;
|
428 | x: (d: ColumnChartDataPoint) => number;
|
429 | y: (d: ColumnChartDataPoint) => number;
|
430 | height: (d: ColumnChartDataPoint) => number;
|
431 | };
|
432 | shapeXAxis?: {
|
433 | width: (d: ColumnChartDataPoint) => number;
|
434 | x: (d: ColumnChartDataPoint) => number;
|
435 | y: (d: ColumnChartDataPoint) => number;
|
436 | height: (d: ColumnChartDataPoint) => number;
|
437 | };
|
438 | }
|
439 | interface MekkoAxisRenderingOptions {
|
440 | axisLabels: ChartAxesLabels;
|
441 | legendMargin: number;
|
442 | viewport: IViewport;
|
443 | margin: IMargin;
|
444 | hideXAxisTitle: boolean;
|
445 | hideYAxisTitle: boolean;
|
446 | hideY2AxisTitle?: boolean;
|
447 | xLabelColor?: Fill;
|
448 | yLabelColor?: Fill;
|
449 | y2LabelColor?: Fill;
|
450 | }
|
451 | interface MekkoDataPoints {
|
452 | categoriesWidth: number[];
|
453 | series: ColumnChartSeries[];
|
454 | hasHighlights: boolean;
|
455 | hasDynamicSeries: boolean;
|
456 | }
|
457 | interface MekkoLegendDataPoint extends LegendDataPoint {
|
458 | fontSize?: number;
|
459 | }
|
460 | interface MekkoCreateAxisOptions extends CreateAxisOptions {
|
461 | formatString: string;
|
462 | is100Pct?: boolean;
|
463 | shouldClamp?: boolean;
|
464 | formatStringProp?: DataViewObjectPropertyIdentifier;
|
465 | }
|
466 | interface MekkoColumnChartContext extends ColumnChartContext {
|
467 | height: number;
|
468 | width: number;
|
469 | duration: number;
|
470 | margin: IMargin;
|
471 | mainGraphicsContext: D3.Selection;
|
472 | labelGraphicsContext: D3.Selection;
|
473 | layout: CategoryLayout;
|
474 | animator: IColumnChartAnimator;
|
475 | onDragStart?: (datum: ColumnChartDataPoint) => void;
|
476 | interactivityService: IInteractivityService;
|
477 | viewportHeight: number;
|
478 | viewportWidth: number;
|
479 | is100Pct: boolean;
|
480 | hostService: IVisualHostServices;
|
481 | isComboChart: boolean;
|
482 | }
|
483 | class MekkoDataWrapper {
|
484 | private data;
|
485 | private isScalar;
|
486 | constructor(columnChartData: CartesianData, isScalar: boolean);
|
487 | lookupXValue(index: number, type: ValueType): any;
|
488 | }
|
489 | class MekkoColumnChartStrategy implements IMekkoColumnChartStrategy {
|
490 | private static classes;
|
491 | private layout;
|
492 | private data;
|
493 | private graphicsContext;
|
494 | private width;
|
495 | private height;
|
496 | private margin;
|
497 | private xProps;
|
498 | private yProps;
|
499 | private categoryLayout;
|
500 | private columnsCenters;
|
501 | private columnSelectionLineHandle;
|
502 | private animator;
|
503 | private interactivityService;
|
504 | private viewportHeight;
|
505 | private viewportWidth;
|
506 | private static validLabelPositions;
|
507 | setupVisualProps(columnChartProps: MekkoColumnChartContext): void;
|
508 | setData(data: MekkoColumnChartData): void;
|
509 | private static createFormatter(scaleDomain, dataDomain, dataType, isScalar, formatString, bestTickCount, tickValues, getValueFn, useTickIntervalForDisplayUnits?);
|
510 | |
511 |
|
512 |
|
513 | private static formatAxisTickValues(axis, tickValues, formatter, dataType, isScalar, getValueFn?);
|
514 | |
515 |
|
516 |
|
517 |
|
518 | private createAxis(options);
|
519 | private getCategoryAxis(data, size, layout, isVertical, forcedXMin?, forcedXMax?, axisScaleType?);
|
520 | setXScale(is100Pct: boolean, forcedTickCount?: number, forcedXDomain?: any[], axisScaleType?: string): IAxisProperties;
|
521 | setYScale(is100Pct: boolean, forcedTickCount?: number, forcedYDomain?: any[], axisScaleType?: string): IAxisProperties;
|
522 | drawColumns(useAnimation: boolean): MekkoColumnChartDrawInfo;
|
523 | private static drawDefaultShapes(data, series, layout, itemCS, filterZeros, hasSelection);
|
524 | selectColumn(selectedColumnIndex: number, lastSelectedColumnIndex: number): void;
|
525 | getClosestColumnIndex(x: number, y: number): number;
|
526 | |
527 |
|
528 |
|
529 | private getColumnsCenters();
|
530 | private moveHandle(selectedColumnIndex);
|
531 | static getLayout(data: MekkoColumnChartData, axisOptions: MekkoColumnAxisOptions): IMekkoColumnLayout;
|
532 | private createMekkoLabelDataPoints();
|
533 | }
|
534 | interface MekkoChartSettings {
|
535 | columnBorder: MekkoBorderSettings;
|
536 | labelSettings: MekkoLabelSettings;
|
537 | }
|
538 | |
539 |
|
540 |
|
541 | class MekkoChart implements IVisual {
|
542 | static capabilities: VisualCapabilities;
|
543 | private static properties;
|
544 | static DefaultSettings: MekkoChartSettings;
|
545 | private static getTextProperties(fontSize?);
|
546 | static MinOrdinalRectThickness: number;
|
547 | static MinScalarRectThickness: number;
|
548 | static OuterPaddingRatio: number;
|
549 | static InnerPaddingRatio: number;
|
550 | static TickLabelPadding: number;
|
551 | private static ClassName;
|
552 | private static AxisGraphicsContextClassName;
|
553 | private static MaxMarginFactor;
|
554 | private static MinBottomMargin;
|
555 | private static LeftPadding;
|
556 | private static RightPadding;
|
557 | private static BottomPadding;
|
558 | private static YAxisLabelPadding;
|
559 | private static XAxisLabelPadding;
|
560 | private static TickPaddingY;
|
561 | private static TickPaddingRotatedX;
|
562 | private static FontSize;
|
563 | static MaxNumberOfLabels: number;
|
564 | private static MinWidth;
|
565 | private static MinHeight;
|
566 | private axisGraphicsContext;
|
567 | private xAxisGraphicsContext;
|
568 | private y1AxisGraphicsContext;
|
569 | private y2AxisGraphicsContext;
|
570 | private element;
|
571 | private svg;
|
572 | private clearCatcher;
|
573 | private margin;
|
574 | private type;
|
575 | private hostServices;
|
576 | private layers;
|
577 | private legend;
|
578 | private legendMargins;
|
579 | private layerLegendData;
|
580 | private hasSetData;
|
581 | private visualInitOptions;
|
582 | private borderObjectProperties;
|
583 | private legendObjectProperties;
|
584 | private categoryAxisProperties;
|
585 | private valueAxisProperties;
|
586 | private cartesianSmallViewPortProperties;
|
587 | private interactivityService;
|
588 | private behavior;
|
589 | private y2AxisExists;
|
590 | private categoryAxisHasUnitType;
|
591 | private valueAxisHasUnitType;
|
592 | private hasCategoryAxis;
|
593 | private yAxisIsCategorical;
|
594 | private secValueAxisHasUnitType;
|
595 | private axes;
|
596 | private yAxisOrientation;
|
597 | private bottomMarginLimit;
|
598 | private leftRightMarginLimit;
|
599 | private sharedColorPalette;
|
600 | animator: IGenericAnimator;
|
601 | private isScrollable;
|
602 | private scrollY;
|
603 | private scrollX;
|
604 | private isXScrollBarVisible;
|
605 | private isYScrollBarVisible;
|
606 | private svgScrollable;
|
607 | private axisGraphicsContextScrollable;
|
608 | private labelGraphicsContextScrollable;
|
609 | private brushGraphicsContext;
|
610 | private brush;
|
611 | private static ScrollBarWidth;
|
612 | private dataViews;
|
613 | private currentViewport;
|
614 | constructor(options: MekkoConstructorOptions);
|
615 | init(options: VisualInitOptions): void;
|
616 | private renderAxesLabels(options);
|
617 | private adjustMargins(viewport);
|
618 | private translateAxes(viewport);
|
619 | static getIsScalar(objects: DataViewObjects, propertyId: DataViewObjectPropertyIdentifier, type: ValueType): boolean;
|
620 | private populateObjectProperties(dataViews);
|
621 | update(options: VisualUpdateOptions): void;
|
622 | /**
|
623 | * Clear the viewport area
|
624 | */
|
625 | private clearViewport();
|
626 | private setVisibility(status?);
|
627 | static parseLabelSettings(objects: DataViewObjects): VisualDataLabelsSettings;
|
628 | static parseBorderSettings(objects: DataViewObjects): MekkoBorderSettings;
|
629 | private enumerateBorder(enumeration);
|
630 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
631 | private shouldShowLegendCard();
|
632 | private getCategoryAxisValues(enumeration);
|
633 | private getValueAxisValues(enumeration);
|
634 | onClearSelection(): void;
|
635 | private createAndInitLayers(dataViews);
|
636 | private renderLegend();
|
637 | private hideLegends();
|
638 | private addUnitTypeToAxisLabel(axes);
|
639 | private shouldRenderSecondaryAxis(axisProperties);
|
640 | private shouldRenderAxis(axisProperties, propertyName?);
|
641 | private render(suppressAnimations);
|
642 | private hideAxisLabels(legendMargins);
|
643 | private static getUnitType(axis, axisPropertiesLookup);
|
644 | private getMaxMarginFactor();
|
645 | private static getChartViewport(viewport, margin);
|
646 | private static wordBreak(text, axisProperties, columnsWidth, maxHeight, borderWidth);
|
647 | private renderChart(mainAxisScale, axes, width, tickLabelMargins, chartHasAxisLabels, axisLabels, viewport, suppressAnimations, scrollScale?, extent?);
|
648 | /**
|
649 | * Within the context of the given selection (g), find the offset of
|
650 | * the zero tick using the d3 attached datum of g.tick elements.
|
651 | * 'Classed' is undefined for transition selections
|
652 | */
|
653 | private static darkenZeroLine(g);
|
654 | private static setAxisLabelColor(g, fill);
|
655 | private static setAxisLabelFontSize(g, fontSize);
|
656 | private static moveBorder(g, scale, borderWidth, yOffset?);
|
657 | }
|
658 | function createLayers(type: MekkoChartType, objects: DataViewObjects, interactivityService: IInteractivityService, animator?: any, isScrollable?: boolean): IMekkoColumnChartVisual[];
|
659 | /**
|
660 | * Renders a stacked and clustered column chart.
|
661 | */
|
662 | interface IMekkoColumnChartVisual {
|
663 | getColumnsWidth(): number[];
|
664 | getBorderWidth(): number;
|
665 | init(options: CartesianVisualInitOptions): void;
|
666 | setData(dataViews: DataView[], resized?: boolean): void;
|
667 | calculateAxesProperties(options: CalculateScaleAndDomainOptions): IAxisProperties[];
|
668 | overrideXScale(xProperties: IAxisProperties): void;
|
669 | render(suppressAnimations: boolean): MekkoVisualRenderResult;
|
670 | calculateLegend(): LegendData;
|
671 | hasLegend(): boolean;
|
672 | onClearSelection(): void;
|
673 | enumerateObjectInstances?(enumeration: ObjectEnumerationBuilder, options: EnumerateVisualObjectInstancesOptions): void;
|
674 | getVisualCategoryAxisIsScalar?(): boolean;
|
675 | getSupportedCategoryAxisType?(): string;
|
676 | getPreferredPlotArea?(isScalar: boolean, categoryCount: number, categoryThickness: number): IViewport;
|
677 | setFilteredData?(startIndex: number, endIndex: number): CartesianData;
|
678 | }
|
679 | interface IMekkoColumnChartStrategy {
|
680 | drawColumns(useAnimation: boolean): MekkoColumnChartDrawInfo;
|
681 | setData(data: ColumnChartData): void;
|
682 | setupVisualProps(columnChartProps: ColumnChartContext): void;
|
683 | setXScale(is100Pct: boolean, forcedTickCount?: number, forcedXDomain?: any[], axisScaleType?: string, axisDisplayUnits?: number, axisPrecision?: number): IAxisProperties;
|
684 | setYScale(is100Pct: boolean, forcedTickCount?: number, forcedYDomain?: any[], axisScaleType?: string, axisDisplayUnits?: number, axisPrecision?: number): IAxisProperties;
|
685 | selectColumn(selectedColumnIndex: number, lastSelectedColumnIndex: number): void;
|
686 | getClosestColumnIndex(x: number, y: number): number;
|
687 | }
|
688 | class MekkoColumnChart implements IMekkoColumnChartVisual {
|
689 | private static ColumnChartClassName;
|
690 | static SeriesClasses: ClassAndSelector;
|
691 | static BorderClass: ClassAndSelector;
|
692 | private svg;
|
693 | private unclippedGraphicsContext;
|
694 | private mainGraphicsContext;
|
695 | private labelGraphicsContext;
|
696 | private xAxisProperties;
|
697 | private yAxisProperties;
|
698 | private currentViewport;
|
699 | private data;
|
700 | private style;
|
701 | private colors;
|
702 | private chartType;
|
703 | private columnChart;
|
704 | private hostService;
|
705 | private cartesianVisualHost;
|
706 | private interactivity;
|
707 | private margin;
|
708 | private options;
|
709 | private lastInteractiveSelectedColumnIndex;
|
710 | private supportsOverflow;
|
711 | private interactivityService;
|
712 | private dataViewCat;
|
713 | private categoryAxisType;
|
714 | private animator;
|
715 | private isScrollable;
|
716 | private element;
|
717 | constructor(options: ColumnChartConstructorOptions);
|
718 | init(options: CartesianVisualInitOptions): void;
|
719 | private getCategoryLayout(numCategoryValues, options);
|
720 | static getBorderWidth(border: MekkoBorderSettings): number;
|
721 | static getBorderColor(border: MekkoBorderSettings): any;
|
722 | static converter(dataView: DataViewCategorical, colors: IDataColorPalette, is100PercentStacked?: boolean, isScalar?: boolean, supportsOverflow?: boolean, dataViewMetadata?: DataViewMetadata, chartType?: ColumnChartType): MekkoColumnChartData;
|
723 | private static getStackedMultiplier(rawValues, rowIdx, seriesCount, categoryCount);
|
724 | private static createDataPoints(dataViewCat, categories, categoryIdentities, legend, seriesObjectsList, converterStrategy, defaultLabelSettings, is100PercentStacked?, isScalar?, supportsOverflow?, isCategoryAlsoSeries?, categoryObjectsList?, defaultDataPointColor?, chartType?, categoryMetadata?);
|
725 | private static getDataPointColor(legendItem, categoryIndex, dataPointObjects?);
|
726 | private static getStackedLabelColor(isNegative, seriesIndex, seriesCount, categoryIndex, rawValues);
|
727 | static sliceSeries(series: ColumnChartSeries[], endIndex: number, startIndex?: number): ColumnChartSeries[];
|
728 | static getInteractiveColumnChartDomElement(element: JQuery): HTMLElement;
|
729 | getColumnsWidth(): number[];
|
730 | getBorderWidth(): number;
|
731 | setData(dataViews: DataView[]): void;
|
732 | calculateLegend(): LegendData;
|
733 | hasLegend(): boolean;
|
734 | enumerateObjectInstances(enumeration: ObjectEnumerationBuilder, options: EnumerateVisualObjectInstancesOptions): void;
|
735 | private enumerateDataLabels(enumeration);
|
736 | private getLabelSettingsOptions(enumeration, labelSettings, isSeries, series?);
|
737 | private enumerateDataPoints(enumeration);
|
738 | calculateAxesProperties(options: MekkoCalculateScaleAndDomainOptions): IAxisProperties[];
|
739 | getPreferredPlotArea(isScalar: boolean, categoryCount: number, categoryThickness: number): IViewport;
|
740 | private ApplyInteractivity(chartContext);
|
741 | private selectColumn(indexOfColumnSelected, force?);
|
742 | private createInteractiveMekkoLegendDataPoints(columnIndex);
|
743 | overrideXScale(xProperties: IAxisProperties): void;
|
744 | render(suppressAnimations: boolean): MekkoVisualRenderResult;
|
745 | onClearSelection(): void;
|
746 | getVisualCategoryAxisIsScalar(): boolean;
|
747 | getSupportedCategoryAxisType(): string;
|
748 | setFilteredData(startIndex: number, endIndex: number): CartesianData;
|
749 | }
|
750 | interface MekkoBehaviorOptions {
|
751 | layerOptions: any[];
|
752 | clearCatcher: D3.Selection;
|
753 | }
|
754 | class MekkoChartBehavior implements IInteractiveBehavior {
|
755 | private behaviors;
|
756 | constructor(behaviors: IInteractiveBehavior[]);
|
757 | bindEvents(options: MekkoBehaviorOptions, selectionHandler: ISelectionHandler): void;
|
758 | renderSelection(hasSelection: boolean): void;
|
759 | }
|
760 | }
|
761 |
|
762 | declare module powerbi.visuals.samples {
|
763 | interface SankeyDiagramConstructorOptions {
|
764 | svg?: D3.Selection;
|
765 | margin?: IMargin;
|
766 | curvatureOfLinks?: number;
|
767 | }
|
768 | interface SankeyDiagramLabel {
|
769 | name: string;
|
770 | formattedName: string;
|
771 | width: number;
|
772 | height: number;
|
773 | colour: string;
|
774 | }
|
775 | interface SankeyDiagramTooltipData {
|
776 | tooltipData: TooltipDataItem[];
|
777 | }
|
778 | interface SankeyDiagramScale {
|
779 | x: number;
|
780 | y: number;
|
781 | }
|
782 | interface SankeyDiagramSettings {
|
783 | scale?: SankeyDiagramScale;
|
784 | fontSize: number;
|
785 | isVisibleLabels?: boolean;
|
786 | colourOfLabels: string;
|
787 | }
|
788 | interface SankeyDiagramNode extends SankeyDiagramTooltipData {
|
789 | label: SankeyDiagramLabel;
|
790 | inputWeight: number;
|
791 | outputWeight: number;
|
792 | links: SankeyDiagramLink[];
|
793 | x?: number;
|
794 | y?: number;
|
795 | width?: number;
|
796 | height?: number;
|
797 | colour: string;
|
798 | selectionIds: SelectionId[];
|
799 | }
|
800 | interface SankeyDiagramLink extends SankeyDiagramTooltipData {
|
801 | source: SankeyDiagramNode;
|
802 | destination: SankeyDiagramNode;
|
803 | weigth: number;
|
804 | height?: number;
|
805 | dySource?: number;
|
806 | dyDestination?: number;
|
807 | colour: string;
|
808 | selectionId: SelectionId;
|
809 | }
|
810 | interface SankeyDiagramColumn {
|
811 | countOfNodes: number;
|
812 | sumValueOfNodes: number;
|
813 | }
|
814 | interface SankeyDiagramDataView {
|
815 | nodes: SankeyDiagramNode[];
|
816 | links: SankeyDiagramLink[];
|
817 | columns: SankeyDiagramColumn[];
|
818 | settings: SankeyDiagramSettings;
|
819 | }
|
820 | interface SankeyDiagramRoleNames {
|
821 | rows: string;
|
822 | columns: string;
|
823 | values: string;
|
824 | }
|
825 | class SankeyDiagram implements IVisual {
|
826 | private static ClassName;
|
827 | private static Nodes;
|
828 | private static Node;
|
829 | private static NodeRect;
|
830 | private static NodeLabel;
|
831 | private static Links;
|
832 | private static Link;
|
833 | private static DefaultColourOfNode;
|
834 | private static DefaultColourOfLink;
|
835 | private static DefaultSettings;
|
836 | private static MinWidthOfLabel;
|
837 | private static NodeBottomMargin;
|
838 | private static NodeMargin;
|
839 | private static LabelMargin;
|
840 | static RoleNames: SankeyDiagramRoleNames;
|
841 | static capabilities: VisualCapabilities;
|
842 | private static Properties;
|
843 | static getProperties(capabilities: VisualCapabilities): any;
|
844 | private margin;
|
845 | private nodeWidth;
|
846 | private curvatureOfLinks;
|
847 | private root;
|
848 | private svg;
|
849 | private main;
|
850 | private nodes;
|
851 | private links;
|
852 | private colours;
|
853 | private viewport;
|
854 | private textProperties;
|
855 | private dataView;
|
856 | private selectionManager;
|
857 | constructor(constructorOptions?: SankeyDiagramConstructorOptions);
|
858 | init(visualsInitOptions: VisualInitOptions): void;
|
859 | update(visualUpdateOptions: VisualUpdateOptions): void;
|
860 | private updateViewport(viewport);
|
861 | /**
|
862 | * Public for testability.
|
863 | */
|
864 | getPositiveNumber(value: number): number;
|
865 | private updateElements(height, width);
|
866 | converter(dataView: DataView): SankeyDiagramDataView;
|
867 | private getObjectsFromDataView(dataView);
|
868 | private getColour(properties, defaultColor, objects);
|
869 | private getTooltipDataForLink(valueFormatter, sourceNodeName, destinationNodeName, linkWeight);
|
870 | private updateValueOfNode(node);
|
871 | private getTooltipForNode(valueFormatter, nodeName, nodeWeight);
|
872 | private parseSettings(objects);
|
873 | private computePositions(sankeyDiagramDataView);
|
874 | private computeXPositions(sankeyDiagramDataView);
|
875 | private getScaleByAxisX(numberOfColumns?);
|
876 | /**
|
877 | * Public for testability.
|
878 | */
|
879 | sortNodesByX(nodes: SankeyDiagramNode[]): SankeyDiagramNode[];
|
880 | /**
|
881 | * Public for testability.
|
882 | */
|
883 | getColumns(nodes: SankeyDiagramNode[]): SankeyDiagramColumn[];
|
884 | /**
|
885 | * Public for testability.
|
886 | */
|
887 | getMaxColumn(columns?: SankeyDiagramColumn[]): SankeyDiagramColumn;
|
888 | private getScaleByAxisY(sumValueOfNodes);
|
889 | private getAvailableSumNodeMarginByY();
|
890 | private scalePositionsByAxes(nodes, columns, scale, viewportHeight);
|
891 | private computeYPosition(nodes, scale);
|
892 | private render(sankeyDiagramDataView);
|
893 | private renderNodes(sankeyDiagramDataView);
|
894 | private getLabelPositionByAxisX(node);
|
895 | private isLabelLargerThanWidth(node);
|
896 | private getCurrentPositionOfLabelByAxisX(node);
|
897 | private renderLinks(sankeyDiagramDataView);
|
898 | private getSvgPath(link);
|
899 | private renderTooltip(selection);
|
900 | private bindSelectionHandler(sankeyDiagramDataView, nodesSelection, linksSelection);
|
901 | private selectMany(selectionIds, clear?);
|
902 | private setSelection(nodes, links);
|
903 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
904 | private enumerateLabels(enumeration);
|
905 | private enumerateLinks(enumeration);
|
906 | }
|
907 | }
|
908 |
|
909 | declare module powerbi.visuals.samples {
|
910 | let bulletChartProps: {
|
911 | values: {
|
912 | targetValue: DataViewObjectPropertyIdentifier;
|
913 | minimumPercent: DataViewObjectPropertyIdentifier;
|
914 | needsImprovementPercent: DataViewObjectPropertyIdentifier;
|
915 | satisfactoryPercent: DataViewObjectPropertyIdentifier;
|
916 | goodPercent: DataViewObjectPropertyIdentifier;
|
917 | veryGoodPercent: DataViewObjectPropertyIdentifier;
|
918 | maximumPercent: DataViewObjectPropertyIdentifier;
|
919 | targetValue2: DataViewObjectPropertyIdentifier;
|
920 | secondTargetVisibility: DataViewObjectPropertyIdentifier;
|
921 | };
|
922 | orientation: {
|
923 | orientation: DataViewObjectPropertyIdentifier;
|
924 | };
|
925 | colors: {
|
926 | badColor: DataViewObjectPropertyIdentifier;
|
927 | needsImprovementColor: DataViewObjectPropertyIdentifier;
|
928 | satisfactoryColor: DataViewObjectPropertyIdentifier;
|
929 | goodColor: DataViewObjectPropertyIdentifier;
|
930 | veryGoodColor: DataViewObjectPropertyIdentifier;
|
931 | bulletColor: DataViewObjectPropertyIdentifier;
|
932 | };
|
933 | axis: {
|
934 | axis: DataViewObjectPropertyIdentifier;
|
935 | axisColor: DataViewObjectPropertyIdentifier;
|
936 | measureUnits: DataViewObjectPropertyIdentifier;
|
937 | unitsColor: DataViewObjectPropertyIdentifier;
|
938 | };
|
939 | formatString: DataViewObjectPropertyIdentifier;
|
940 | labels: {
|
941 | fontSize: DataViewObjectPropertyIdentifier;
|
942 | show: DataViewObjectPropertyIdentifier;
|
943 | labelColor: DataViewObjectPropertyIdentifier;
|
944 | };
|
945 | };
|
946 | interface BarData {
|
947 | scale: any;
|
948 | barIndex: number;
|
949 | categoryLabel: string;
|
950 | axis: any;
|
951 | x: number;
|
952 | y: number;
|
953 | key: string;
|
954 | }
|
955 | interface BarRect extends SelectableDataPoint {
|
956 | barIndex: number;
|
957 | start: number;
|
958 | end: number;
|
959 | fill: string;
|
960 | tooltipInfo?: TooltipDataItem[];
|
961 | key: string;
|
962 | highlight?: boolean;
|
963 | }
|
964 | interface TargetValue {
|
965 | barIndex: number;
|
966 | value: number;
|
967 | value2: number;
|
968 | fill: string;
|
969 | key: string;
|
970 | }
|
971 | interface ScaledValues {
|
972 | firstScale: number;
|
973 | secondScale: number;
|
974 | thirdScale: number;
|
975 | fourthScale: number;
|
976 | fifthScale: number;
|
977 | }
|
978 | interface BarValueRect extends BarRect {
|
979 | }
|
980 | interface BulletChartSettings {
|
981 | values: {
|
982 | targetValue: number;
|
983 | minimumPercent: number;
|
984 | needsImprovementPercent: number;
|
985 | satisfactoryPercent: number;
|
986 | goodPercent: number;
|
987 | veryGoodPercent: number;
|
988 | maximumPercent: number;
|
989 | targetValue2: number;
|
990 | secondTargetVisibility: boolean;
|
991 | };
|
992 | orientation: {
|
993 | orientation: string;
|
994 | reverse: boolean;
|
995 | vertical: boolean;
|
996 | };
|
997 | colors: {
|
998 | badColor: string;
|
999 | needsImprovementColor: string;
|
1000 | satisfactoryColor: string;
|
1001 | goodColor: string;
|
1002 | veryGoodColor: string;
|
1003 | bulletColor: string;
|
1004 | };
|
1005 | axis: {
|
1006 | axis: boolean;
|
1007 | axisColor: string;
|
1008 | measureUnits: string;
|
1009 | unitsColor: string;
|
1010 | };
|
1011 | labelSettings: VisualDataLabelsSettings;
|
1012 | }
|
1013 | interface BulletChartModel {
|
1014 | bars: BarData[];
|
1015 | bulletChartSettings: BulletChartSettings;
|
1016 | bulletValueFormatString: string;
|
1017 | barRects: BarRect[];
|
1018 | valueRects: BarValueRect[];
|
1019 | targetValues: TargetValue[];
|
1020 | hasHighlights: boolean;
|
1021 | viewportLength: number;
|
1022 | labelHeight: number;
|
1023 | labelHeightTop: number;
|
1024 | spaceRequiredForBarHorizontally: number;
|
1025 | }
|
1026 | let bulletChartRoleNames: {
|
1027 | value: string;
|
1028 | targetValue: string;
|
1029 | minValue: string;
|
1030 | needsImprovementValue: string;
|
1031 | satisfactoryValue: string;
|
1032 | goodValue: string;
|
1033 | veryGoodValue: string;
|
1034 | maxValue: string;
|
1035 | targetValue2: string;
|
1036 | };
|
1037 | class BulletChart implements IVisual {
|
1038 | private static ScrollBarSize;
|
1039 | private static SpaceRequiredForBarVertically;
|
1040 | private static XMarginHorizontal;
|
1041 | private static YMarginHorizontal;
|
1042 | private static XMarginVertical;
|
1043 | private static YMarginVertical;
|
1044 | private static BulletSize;
|
1045 | private static DefaultSubtitleFontSizeInPt;
|
1046 | private static BarMargin;
|
1047 | private static MaxLabelWidth;
|
1048 | private static MaxMeasureUnitWidth;
|
1049 | private static SubtitleMargin;
|
1050 | private static AxisFontSizeInPt;
|
1051 | private static SecondTargetLineSize;
|
1052 | private static MarkerMarginHorizontal;
|
1053 | private static MarkerMarginVertical;
|
1054 | private static FontFamily;
|
1055 | private baselineDelta;
|
1056 | static capabilities: VisualCapabilities;
|
1057 | private clearCatcher;
|
1058 | private bulletBody;
|
1059 | private scrollContainer;
|
1060 | private labelGraphicsContext;
|
1061 | private bulletGraphicsContext;
|
1062 | private model;
|
1063 | private behavior;
|
1064 | private interactivityService;
|
1065 | private hostService;
|
1066 | private reverse;
|
1067 | private vertical;
|
1068 | static DefaultStyleProperties(): BulletChartSettings;
|
1069 | private viewport;
|
1070 | private viewportIn;
|
1071 | private viewportScroll;
|
1072 | private static getTextProperties(text, fontSize);
|
1073 | static converter(dataView: DataView, options: VisualUpdateOptions): BulletChartModel;
|
1074 | private static addItemToBarArray(collection, barIndex, start, end, fill, tooltipInfo?, categoryIdentity?, highlight?);
|
1075 | init(options: VisualInitOptions): void;
|
1076 | update(options: VisualUpdateOptions): void;
|
1077 | private ClearViewport();
|
1078 | onClearSelection(): void;
|
1079 | private calculateLabelWidth(barData, bar?, reversed?);
|
1080 | private calculateLabelHeight(barData, bar?, reversed?);
|
1081 | private setUpBulletsHorizontally(bulletBody, model, reveresed);
|
1082 | private setUpBulletsVertically(bulletBody, model, reveresed);
|
1083 | private drawSecondTarget(selection, getX, getY);
|
1084 | destroy(): void;
|
1085 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[];
|
1086 | private enumerateLabels(data);
|
1087 | private enumerateValues(data);
|
1088 | private enumerateOrientation(data);
|
1089 | private enumerateAxis(data);
|
1090 | private enumerateColors(data);
|
1091 | }
|
1092 | module TextMeasurementHelper {
|
1093 | function estimateSvgTextBaselineDelta(textProperties: TextProperties): number;
|
1094 | }
|
1095 | interface BulletBehaviorOptions {
|
1096 | rects: D3.Selection;
|
1097 | valueRects: D3.Selection;
|
1098 | clearCatcher: D3.Selection;
|
1099 | interactivityService: IInteractivityService;
|
1100 | bulletChartSettings: BulletChartSettings;
|
1101 | hasHighlights: boolean;
|
1102 | }
|
1103 | class BulletWebBehavior implements IInteractiveBehavior {
|
1104 | private options;
|
1105 | bindEvents(options: BulletBehaviorOptions, selectionHandler: ISelectionHandler): void;
|
1106 | renderSelection(hasSelection: boolean): void;
|
1107 | }
|
1108 | }
|
1109 |
|
1110 | declare module powerbi.visuals.samples {
|
1111 | enum WordCloudScaleType {
|
1112 | logn = 0,
|
1113 | sqrt = 1,
|
1114 | value = 2,
|
1115 | }
|
1116 | interface WordCloudText {
|
1117 | text: string;
|
1118 | textGroup: string;
|
1119 | count: number;
|
1120 | index: number;
|
1121 | selectionId: SelectionId;
|
1122 | color: string;
|
1123 | }
|
1124 | interface WordCloudDataPoint extends IPoint {
|
1125 | text: string;
|
1126 | xOff: number;
|
1127 | yOff: number;
|
1128 | rotate?: number;
|
1129 | size?: number;
|
1130 | padding: number;
|
1131 | width: number;
|
1132 | height: number;
|
1133 | sprite?: number[];
|
1134 | x0: number;
|
1135 | y0: number;
|
1136 | x1: number;
|
1137 | y1: number;
|
1138 | color: string;
|
1139 | selectionIds: SelectionId[];
|
1140 | wordIndex: number;
|
1141 | widthOfWord?: number;
|
1142 | count: number;
|
1143 | }
|
1144 | interface WordCloudData {
|
1145 | dataView: DataView;
|
1146 | settings: WordCloudSettings;
|
1147 | texts: WordCloudText[];
|
1148 | dataPoints: WordCloudDataPoint[];
|
1149 | }
|
1150 | interface WordCloudDataView {
|
1151 | data: WordCloudDataPoint[];
|
1152 | leftBorder: IPoint;
|
1153 | rightBorder: IPoint;
|
1154 | }
|
1155 | interface WordCloudConstructorOptions {
|
1156 | svg?: D3.Selection;
|
1157 | animator?: IGenericAnimator;
|
1158 | margin?: IMargin;
|
1159 | }
|
1160 | class WordCloudSettings {
|
1161 | static Default: WordCloudSettings;
|
1162 | static parse(dataView: DataView, capabilities: VisualCapabilities): WordCloudSettings;
|
1163 | static getProperties(capabilities: VisualCapabilities): {
|
1164 | [i: string]: {
|
1165 | [i: string]: DataViewObjectPropertyIdentifier;
|
1166 | };
|
1167 | } & {
|
1168 | general: {
|
1169 | formatString: DataViewObjectPropertyIdentifier;
|
1170 | };
|
1171 | dataPoint: {
|
1172 | fill: DataViewObjectPropertyIdentifier;
|
1173 | };
|
1174 | };
|
1175 | static createEnumTypeFromEnum(type: any): IEnumType;
|
1176 | private static getValueFnByType(type);
|
1177 | static enumerateObjectInstances(settings: WordCloudSettings, options: EnumerateVisualObjectInstancesOptions, capabilities: VisualCapabilities): ObjectEnumerationBuilder;
|
1178 | originalSettings: WordCloudSettings;
|
1179 | createOriginalSettings(): void;
|
1180 | general: {
|
1181 | maxNumberOfWords: number;
|
1182 | minFontSize: number;
|
1183 | maxFontSize: number;
|
1184 | isBrokenText: boolean;
|
1185 | };
|
1186 | stopWords: {
|
1187 | show: boolean;
|
1188 | isDefaultStopWords: boolean;
|
1189 | words: any;
|
1190 | };
|
1191 | rotateText: {
|
1192 | show: boolean;
|
1193 | minAngle: number;
|
1194 | maxAngle: number;
|
1195 | maxNumberOfOrientations: number;
|
1196 | };
|
1197 | }
|
1198 | class WordCloudColumns<T> {
|
1199 | static Roles: WordCloudColumns<string>;
|
1200 | static getColumnSources(dataView: DataView): WordCloudColumns<DataViewMetadataColumn>;
|
1201 | static getTableValues(dataView: DataView): WordCloudColumns<any[]>;
|
1202 | static getTableRows(dataView: DataView): WordCloudColumns<any[]>[];
|
1203 | static getCategoricalValues(dataView: DataView): WordCloudColumns<any[]>;
|
1204 | static getSeriesValues(dataView: DataView): string[];
|
1205 | static getCategoricalColumns(dataView: DataView): WordCloudColumns<DataViewCategoryColumn & DataViewValueColumn[] & DataViewValueColumns>;
|
1206 | private static getColumnSourcesT<T>(dataView);
|
1207 | Category: T;
|
1208 | Values: T;
|
1209 | }
|
1210 | class WordCloud implements IVisual {
|
1211 | private static ClassName;
|
1212 | private static Words;
|
1213 | private static WordGroup;
|
1214 | private static Size;
|
1215 | private static StopWordsDelemiter;
|
1216 | private static Radians;
|
1217 | private static MinAngle;
|
1218 | private static MaxAngle;
|
1219 | private static MaxNumberOfWords;
|
1220 | private static MinOpacity;
|
1221 | private static MaxOpacity;
|
1222 | static FontSizePercentageCoefficent: number;
|
1223 | static capabilities: VisualCapabilities;
|
1224 | private static Punctuation;
|
1225 | private static StopWords;
|
1226 | private static DefaultMargin;
|
1227 | static converter(dataView: DataView, colors: IDataColorPalette, previousData: WordCloudData): WordCloudData;
|
1228 | private static parseSettings(dataView, previousSettings);
|
1229 | private static getReducedText(texts, stopWords, settings);
|
1230 | private static getBrokenWords(words, stopWords, settings);
|
1231 | private static getDataPoints(textGroups, settings, wordValueFormatter);
|
1232 | private static getWordFontSize(texts, settings, value, minValue, maxValue, scaleType?);
|
1233 | private static getAngle(settings);
|
1234 | private settings;
|
1235 | private data;
|
1236 | private durationAnimations;
|
1237 | private specialViewport;
|
1238 | private fakeViewport;
|
1239 | private canvasViewport;
|
1240 | private colors;
|
1241 | private root;
|
1242 | private svg;
|
1243 | private main;
|
1244 | private wordsContainerSelection;
|
1245 | private wordsGroupUpdateSelection;
|
1246 | private wordsTextUpdateSelection;
|
1247 | private canvas;
|
1248 | private fontFamily;
|
1249 | private animator;
|
1250 | private layout;
|
1251 | private hostService;
|
1252 | private selectionManager;
|
1253 | private visualUpdateOptions;
|
1254 | private isUpdating;
|
1255 | private incomingUpdateOptions;
|
1256 | constructor(options?: WordCloudConstructorOptions);
|
1257 | init(options: VisualInitOptions): void;
|
1258 | update(visualUpdateOptions: VisualUpdateOptions): void;
|
1259 | private computePositions(onPositionsComputed);
|
1260 | private computeCycle(words, context, surface, borders, onPositionsComputed, wordsForDraw?, index?);
|
1261 | private updateBorders(word, borders);
|
1262 | private generateSprites(context, words, startIndex);
|
1263 | private setSprites(context, words);
|
1264 | private findPosition(surface, word, borders);
|
1265 | private archimedeanSpiral(value);
|
1266 | private checkIntersect(word, surface);
|
1267 | private checkIntersectOfRectangles(word, leftBorder, rightBorder);
|
1268 | private getCanvasContext();
|
1269 | private UpdateSize();
|
1270 | private render(wordCloudDataView);
|
1271 | private setSelection(dataPoint);
|
1272 | private scaleMainView(wordCloudDataView);
|
1273 | private renderSelection();
|
1274 | private setOpacity(element, opacityValue);
|
1275 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumerationObject;
|
1276 | private animation<T>(element, duration?, delay?, callback?);
|
1277 | destroy(): void;
|
1278 | }
|
1279 | }
|
1280 |
|
1281 | declare module powerbi.visuals.samples {
|
1282 | import SemanticFilter = powerbi.data.SemanticFilter;
|
1283 | interface ITableView {
|
1284 | data(data: any[], dataIdFunction: (d) => {}, dataAppended: boolean): ITableView;
|
1285 | rowHeight(rowHeight: number): ITableView;
|
1286 | columnWidth(columnWidth: number): ITableView;
|
1287 | orientation(orientation: string): ITableView;
|
1288 | rows(rows: number): ITableView;
|
1289 | columns(columns: number): ITableView;
|
1290 | viewport(viewport: IViewport): ITableView;
|
1291 | render(): void;
|
1292 | empty(): void;
|
1293 | }
|
1294 | module TableViewFactory {
|
1295 | function createTableView(options: any): ITableView;
|
1296 | }
|
1297 | interface TableViewViewOptions {
|
1298 | enter: (selection: D3.Selection) => void;
|
1299 | exit: (selection: D3.Selection) => void;
|
1300 | update: (selection: D3.Selection) => void;
|
1301 | loadMoreData: () => void;
|
1302 | baseContainer: D3.Selection;
|
1303 | rowHeight: number;
|
1304 | columnWidth: number;
|
1305 | orientation: string;
|
1306 | rows: number;
|
1307 | columns: number;
|
1308 | viewport: IViewport;
|
1309 | scrollEnabled: boolean;
|
1310 | }
|
1311 | var chicletSlicerProps: {
|
1312 | general: {
|
1313 | orientation: DataViewObjectPropertyIdentifier;
|
1314 | columns: DataViewObjectPropertyIdentifier;
|
1315 | rows: DataViewObjectPropertyIdentifier;
|
1316 | showDisabled: DataViewObjectPropertyIdentifier;
|
1317 | multiselect: DataViewObjectPropertyIdentifier;
|
1318 | selection: DataViewObjectPropertyIdentifier;
|
1319 | selfFilterEnabled: DataViewObjectPropertyIdentifier;
|
1320 | };
|
1321 | header: {
|
1322 | show: DataViewObjectPropertyIdentifier;
|
1323 | title: DataViewObjectPropertyIdentifier;
|
1324 | fontColor: DataViewObjectPropertyIdentifier;
|
1325 | background: DataViewObjectPropertyIdentifier;
|
1326 | outline: DataViewObjectPropertyIdentifier;
|
1327 | textSize: DataViewObjectPropertyIdentifier;
|
1328 | outlineColor: DataViewObjectPropertyIdentifier;
|
1329 | outlineWeight: DataViewObjectPropertyIdentifier;
|
1330 | };
|
1331 | rows: {
|
1332 | fontColor: DataViewObjectPropertyIdentifier;
|
1333 | textSize: DataViewObjectPropertyIdentifier;
|
1334 | height: DataViewObjectPropertyIdentifier;
|
1335 | width: DataViewObjectPropertyIdentifier;
|
1336 | background: DataViewObjectPropertyIdentifier;
|
1337 | transparency: DataViewObjectPropertyIdentifier;
|
1338 | selectedColor: DataViewObjectPropertyIdentifier;
|
1339 | hoverColor: DataViewObjectPropertyIdentifier;
|
1340 | unselectedColor: DataViewObjectPropertyIdentifier;
|
1341 | disabledColor: DataViewObjectPropertyIdentifier;
|
1342 | outline: DataViewObjectPropertyIdentifier;
|
1343 | outlineColor: DataViewObjectPropertyIdentifier;
|
1344 | outlineWeight: DataViewObjectPropertyIdentifier;
|
1345 | borderStyle: DataViewObjectPropertyIdentifier;
|
1346 | };
|
1347 | images: {
|
1348 | imageSplit: DataViewObjectPropertyIdentifier;
|
1349 | stretchImage: DataViewObjectPropertyIdentifier;
|
1350 | bottomImage: DataViewObjectPropertyIdentifier;
|
1351 | };
|
1352 | selectedPropertyIdentifier: DataViewObjectPropertyIdentifier;
|
1353 | filterPropertyIdentifier: DataViewObjectPropertyIdentifier;
|
1354 | formatString: DataViewObjectPropertyIdentifier;
|
1355 | hasSavedSelection: boolean;
|
1356 | };
|
1357 | interface ChicletSlicerConstructorOptions {
|
1358 | behavior?: ChicletSlicerWebBehavior;
|
1359 | }
|
1360 | interface ChicletSlicerData {
|
1361 | categorySourceName: string;
|
1362 | formatString: string;
|
1363 | slicerDataPoints: ChicletSlicerDataPoint[];
|
1364 | slicerSettings: ChicletSlicerSettings;
|
1365 | hasSelectionOverride?: boolean;
|
1366 | }
|
1367 | interface ChicletSlicerDataPoint extends SelectableDataPoint {
|
1368 | category?: string;
|
1369 | value?: number;
|
1370 | mouseOver?: boolean;
|
1371 | mouseOut?: boolean;
|
1372 | isSelectAllDataPoint?: boolean;
|
1373 | imageURL?: string;
|
1374 | selectable?: boolean;
|
1375 | filtered?: boolean;
|
1376 | }
|
1377 | interface ChicletSlicerSettings {
|
1378 | general: {
|
1379 | orientation: string;
|
1380 | columns: number;
|
1381 | rows: number;
|
1382 | multiselect: boolean;
|
1383 | showDisabled: string;
|
1384 | selection: string;
|
1385 | selfFilterEnabled: boolean;
|
1386 | getSavedSelection?: () => string[];
|
1387 | setSavedSelection?: (filter: SemanticFilter, selectionIds: string[]) => void;
|
1388 | };
|
1389 | margin: IMargin;
|
1390 | header: {
|
1391 | borderBottomWidth: number;
|
1392 | show: boolean;
|
1393 | outline: string;
|
1394 | fontColor: string;
|
1395 | background?: string;
|
1396 | textSize: number;
|
1397 | outlineColor: string;
|
1398 | outlineWeight: number;
|
1399 | title: string;
|
1400 | };
|
1401 | headerText: {
|
1402 | marginLeft: number;
|
1403 | marginTop: number;
|
1404 | };
|
1405 | slicerText: {
|
1406 | textSize: number;
|
1407 | height: number;
|
1408 | width: number;
|
1409 | fontColor: string;
|
1410 | selectedColor: string;
|
1411 | hoverColor: string;
|
1412 | unselectedColor: string;
|
1413 | disabledColor: string;
|
1414 | marginLeft: number;
|
1415 | outline: string;
|
1416 | background?: string;
|
1417 | transparency: number;
|
1418 | outlineColor: string;
|
1419 | outlineWeight: number;
|
1420 | borderStyle: string;
|
1421 | };
|
1422 | slicerItemContainer: {
|
1423 | marginTop: number;
|
1424 | marginLeft: number;
|
1425 | };
|
1426 | images: {
|
1427 | imageSplit: number;
|
1428 | stretchImage: boolean;
|
1429 | bottomImage: boolean;
|
1430 | };
|
1431 | }
|
1432 | class ChicletSlicer implements IVisual {
|
1433 | static capabilities: VisualCapabilities;
|
1434 | private element;
|
1435 | private searchHeader;
|
1436 | private searchInput;
|
1437 | private currentViewport;
|
1438 | private dataView;
|
1439 | private slicerHeader;
|
1440 | private slicerBody;
|
1441 | private tableView;
|
1442 | private slicerData;
|
1443 | private settings;
|
1444 | private interactivityService;
|
1445 | private behavior;
|
1446 | private hostServices;
|
1447 | private waitingForData;
|
1448 | private isSelectionLoaded;
|
1449 | private isSelectionSaved;
|
1450 | static DefaultFontFamily: string;
|
1451 | static DefaultFontSizeInPt: number;
|
1452 | private static cellTotalInnerPaddings;
|
1453 | private static cellTotalInnerBorders;
|
1454 | private static chicletTotalInnerRightLeftPaddings;
|
1455 | private static ItemContainer;
|
1456 | private static HeaderText;
|
1457 | private static Container;
|
1458 | private static LabelText;
|
1459 | private static Header;
|
1460 | private static Input;
|
1461 | private static Clear;
|
1462 | private static Body;
|
1463 | static DefaultStyleProperties(): ChicletSlicerSettings;
|
1464 | constructor(options?: ChicletSlicerConstructorOptions);
|
1465 | static converter(dataView: DataView, localizedSelectAllText: string, searchText: string, interactivityService: IInteractivityService): ChicletSlicerData;
|
1466 | init(options: VisualInitOptions): void;
|
1467 | private static canSelect(args);
|
1468 | update(options: VisualUpdateOptions): void;
|
1469 | onResizing(finalViewport: IViewport): void;
|
1470 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[];
|
1471 | private enumerateHeader(data);
|
1472 | private enumerateRows(data);
|
1473 | private enumerateGeneral(data);
|
1474 | private enumerateImages(data);
|
1475 | private updateInternal(resetScrollbarPosition);
|
1476 | private initContainer();
|
1477 | private createSearchHeader(container);
|
1478 | private updateSearchHeader();
|
1479 | private onLoadMoreData();
|
1480 | private getSlicerBodyViewport(currentViewport);
|
1481 | private updateSlicerBodyDimensions();
|
1482 | static getChicletTextProperties(textSize?: number): TextProperties;
|
1483 | private getHeaderHeight();
|
1484 | private getRowHeight();
|
1485 | private getBorderStyle(outlineElement);
|
1486 | private getBorderWidth(outlineElement, outlineWeight);
|
1487 | private getBorderRadius(borderType);
|
1488 | }
|
1489 | module ChicletSlicerTextMeasurementHelper {
|
1490 | function estimateSvgTextBaselineDelta(textProperties: TextProperties): number;
|
1491 | }
|
1492 | interface ChicletSlicerBehaviorOptions {
|
1493 | slicerItemContainers: D3.Selection;
|
1494 | slicerItemLabels: D3.Selection;
|
1495 | slicerItemInputs: D3.Selection;
|
1496 | slicerClear: D3.Selection;
|
1497 | dataPoints: ChicletSlicerDataPoint[];
|
1498 | interactivityService: IInteractivityService;
|
1499 | slicerSettings: ChicletSlicerSettings;
|
1500 | isSelectionLoaded: boolean;
|
1501 | }
|
1502 | class ChicletSlicerWebBehavior implements IInteractiveBehavior {
|
1503 | private slicers;
|
1504 | private slicerItemLabels;
|
1505 | private slicerItemInputs;
|
1506 | private dataPoints;
|
1507 | private interactivityService;
|
1508 | private slicerSettings;
|
1509 | private options;
|
1510 | bindEvents(options: ChicletSlicerBehaviorOptions, selectionHandler: ISelectionHandler): void;
|
1511 | loadSelection(selectionHandler: ISelectionHandler): void;
|
1512 | private static getFilterFromSelectors(selectionHandler, isSelectionModeInverted);
|
1513 | saveSelection(selectionHandler: ISelectionHandler): void;
|
1514 | renderSelection(hasSelection: boolean): void;
|
1515 | private renderMouseover();
|
1516 | styleSlicerInputs(slicers: D3.Selection, hasSelection: boolean): void;
|
1517 | }
|
1518 | }
|
1519 |
|
1520 | declare module powerbi.visuals.samples {
|
1521 | interface ChordChartData {
|
1522 | settings: ChordChartSettings;
|
1523 | dataView: DataView;
|
1524 | dataMatrix: number[][];
|
1525 | labelDataPoints: ChordArcDescriptor[];
|
1526 | legendData?: LegendData;
|
1527 | tooltipData: ChordTooltipData[][];
|
1528 | sliceTooltipData: ChordTooltipData[];
|
1529 | tickUnit: number;
|
1530 | differentFromTo: boolean;
|
1531 | defaultDataPointColor?: string;
|
1532 | prevAxisVisible: boolean;
|
1533 | }
|
1534 | interface ChordArcDescriptor extends D3.Layout.ArcDescriptor, IDataLabelInfo {
|
1535 | data: ChordArcLabelData;
|
1536 | }
|
1537 | interface ChordTicksArcDescriptor extends D3.Layout.ArcDescriptor {
|
1538 | angleLabels: {
|
1539 | angle: number;
|
1540 | label: string;
|
1541 | }[];
|
1542 | }
|
1543 | interface ChordArcLabelData extends LabelEnabledDataPoint, SelectableDataPoint {
|
1544 | label: string;
|
1545 | labelColor: string;
|
1546 | barColor: string;
|
1547 | isCategory: boolean;
|
1548 | }
|
1549 | interface ChordTooltipData {
|
1550 | tooltipInfo: TooltipDataItem[];
|
1551 | }
|
1552 | class ChordChartSettings {
|
1553 | static Default: ChordChartSettings;
|
1554 | static parse(dataView: DataView, capabilities: VisualCapabilities): ChordChartSettings;
|
1555 | static getProperties(capabilities: VisualCapabilities): {
|
1556 | [i: string]: {
|
1557 | [i: string]: DataViewObjectPropertyIdentifier;
|
1558 | };
|
1559 | } & {
|
1560 | general: {
|
1561 | formatString: DataViewObjectPropertyIdentifier;
|
1562 | };
|
1563 | dataPoint: {
|
1564 | fill: DataViewObjectPropertyIdentifier;
|
1565 | };
|
1566 | };
|
1567 | static createEnumTypeFromEnum(type: any): IEnumType;
|
1568 | private static getValueFnByType(type);
|
1569 | static enumerateObjectInstances(settings: any, options: EnumerateVisualObjectInstancesOptions, capabilities: VisualCapabilities): ObjectEnumerationBuilder;
|
1570 | dataPoint: {
|
1571 | defaultColor: any;
|
1572 | showAllDataPoints: boolean;
|
1573 | };
|
1574 | axis: {
|
1575 | show: boolean;
|
1576 | };
|
1577 | labels: {
|
1578 | show: boolean;
|
1579 | color: string;
|
1580 | fontSize: number;
|
1581 | };
|
1582 | }
|
1583 | class ChordChartColumns<T> {
|
1584 | static Roles: ChordChartColumns<string>;
|
1585 | static getColumnSources(dataView: DataView): ChordChartColumns<DataViewMetadataColumn>;
|
1586 | static getTableValues(dataView: DataView): ChordChartColumns<any[]>;
|
1587 | static getTableRows(dataView: DataView): ChordChartColumns<any[]>[];
|
1588 | static getCategoricalValues(dataView: DataView): ChordChartColumns<any[]>;
|
1589 | static getSeriesValues(dataView: DataView): string[];
|
1590 | static getCategoricalColumns(dataView: DataView): ChordChartColumns<DataViewCategoryColumn & DataViewValueColumn[] & DataViewValueColumns>;
|
1591 | private static getColumnSourcesT<T>(dataView);
|
1592 | Category: T;
|
1593 | Series: T;
|
1594 | Y: T;
|
1595 | }
|
1596 | class ChordChart implements IVisual {
|
1597 | static capabilities: VisualCapabilities;
|
1598 | static PolylineOpacity: number;
|
1599 | private static OuterArcRadiusRatio;
|
1600 | private static InnerArcRadiusRatio;
|
1601 | private static LabelMargin;
|
1602 | private static DefaultMargin;
|
1603 | private static VisualClassName;
|
1604 | private static TicksFontSize;
|
1605 | private static sliceClass;
|
1606 | private static chordClass;
|
1607 | private static sliceTicksClass;
|
1608 | private static tickPairClass;
|
1609 | private static tickLineClass;
|
1610 | private static tickTextClass;
|
1611 | private static labelGraphicsContextClass;
|
1612 | private static labelsClass;
|
1613 | private static linesGraphicsContextClass;
|
1614 | private static lineClass;
|
1615 | private chordLayout;
|
1616 | private element;
|
1617 | private svg;
|
1618 | private mainGraphicsContext;
|
1619 | private slices;
|
1620 | private labels;
|
1621 | private lines;
|
1622 | private data;
|
1623 | private settings;
|
1624 | private layout;
|
1625 | private duration;
|
1626 | private colors;
|
1627 | private selectionManager;
|
1628 | private radius;
|
1629 | private innerRadius;
|
1630 | private outerRadius;
|
1631 | static converter(dataView: DataView, colors: IDataColorPalette, prevAxisVisible: boolean): ChordChartData;
|
1632 | private static parseSettings(dataView);
|
1633 | private static getValidArrayLength(array);
|
1634 | private static getChordArcDescriptors(groups, datum);
|
1635 | init(options: VisualInitOptions): void;
|
1636 | update(options: VisualUpdateOptions): void;
|
1637 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumerationObject;
|
1638 | private calculateRadius();
|
1639 | private drawCategoryLabels();
|
1640 | private getDataLabelManager();
|
1641 | private render();
|
1642 | private clear();
|
1643 | private clearTicks();
|
1644 | private getChordTicksArcDescriptors();
|
1645 | private drawTicks();
|
1646 | private renderLabels(filteredData, layout, isDonut?, forAnimation?);
|
1647 | private renderLines(filteredData, arc, outerArc);
|
1648 | private getChordChartLabelLayout(outerArc);
|
1649 | private static union_arrays(x, y);
|
1650 | }
|
1651 | }
|
1652 |
|
1653 | declare module powerbi.visuals.samples {
|
1654 | import ClassAndSelector = jsCommon.CssConstants.ClassAndSelector;
|
1655 | import IInteractiveBehavior = powerbi.visuals.IInteractiveBehavior;
|
1656 | import Lazy = jsCommon.Lazy;
|
1657 | import ISize = powerbi.visuals.shapes.ISize;
|
1658 | import DataViewMetadataColumn = powerbi.DataViewMetadataColumn;
|
1659 | import DataViewValueColumn = powerbi.DataViewValueColumn;
|
1660 | import SelectableDataPoint = powerbi.visuals.SelectableDataPoint;
|
1661 | import TooltipEnabledDataPoint = powerbi.visuals.TooltipEnabledDataPoint;
|
1662 | import ContentPositions = powerbi.ContentPositions;
|
1663 | import LegendData = powerbi.visuals.LegendData;
|
1664 | import NumberRange = powerbi.NumberRange;
|
1665 | import PointDataLabelsSettings = powerbi.visuals.PointDataLabelsSettings;
|
1666 | import SelectionId = powerbi.visuals.SelectionId;
|
1667 | import DataViewObjectPropertyIdentifier = powerbi.DataViewObjectPropertyIdentifier;
|
1668 | import IVisual = powerbi.IVisual;
|
1669 | import TextProperties = powerbi.TextProperties;
|
1670 | import IAxisProperties = powerbi.visuals.IAxisProperties;
|
1671 | import IDataColorPalette = powerbi.IDataColorPalette;
|
1672 | import VisualInitOptions = powerbi.VisualInitOptions;
|
1673 | import IInteractivityService = powerbi.visuals.IInteractivityService;
|
1674 | import DataViewObject = powerbi.DataViewObject;
|
1675 | import VisualCapabilities = powerbi.VisualCapabilities;
|
1676 | import IValueFormatter = powerbi.visuals.IValueFormatter;
|
1677 | import VisualUpdateOptions = powerbi.VisualUpdateOptions;
|
1678 | import CalculateScaleAndDomainOptions = powerbi.visuals.CalculateScaleAndDomainOptions;
|
1679 | import EnumerateVisualObjectInstancesOptions = powerbi.EnumerateVisualObjectInstancesOptions;
|
1680 | import VisualObjectInstanceEnumeration = powerbi.VisualObjectInstanceEnumeration;
|
1681 | import ISelectionHandler = powerbi.visuals.ISelectionHandler;
|
1682 | import DataView = powerbi.DataView;
|
1683 | interface ElementProperty {
|
1684 | [propertyName: string]: any;
|
1685 | }
|
1686 | interface ElementProperties {
|
1687 | name: string;
|
1688 | selector: string;
|
1689 | className?: string;
|
1690 | data?: any;
|
1691 | styles?: ElementProperty;
|
1692 | attributes?: ElementProperty;
|
1693 | }
|
1694 | interface EnhancedScatterChartRadiusData {
|
1695 | sizeMeasure: DataViewValueColumn;
|
1696 | index: number;
|
1697 | }
|
1698 | interface EnhancedScatterChartDataPoint extends SelectableDataPoint, TooltipEnabledDataPoint {
|
1699 | x: any;
|
1700 | y: any;
|
1701 | size: number | ISize;
|
1702 | radius: EnhancedScatterChartRadiusData;
|
1703 | fill: string;
|
1704 | labelFill?: string;
|
1705 | labelFontSize: any;
|
1706 | contentPosition: ContentPositions;
|
1707 | formattedCategory: Lazy<string>;
|
1708 | colorFill?: string;
|
1709 | svgurl?: string;
|
1710 | shapeSymbolType?: (number) => string;
|
1711 | rotation: number;
|
1712 | backdrop?: string;
|
1713 | xStart?: number;
|
1714 | xEnd?: number;
|
1715 | yStart?: number;
|
1716 | yEnd?: number;
|
1717 | }
|
1718 | interface EnhancedScatterChartBackdrop {
|
1719 | show: boolean;
|
1720 | url: string;
|
1721 | }
|
1722 | interface EnhancedScatterChartAxesLabels {
|
1723 | x: string;
|
1724 | y: string;
|
1725 | y2?: string;
|
1726 | }
|
1727 | interface EnhancedScatterChartData {
|
1728 | useShape: boolean;
|
1729 | useCustomColor: boolean;
|
1730 | backdrop?: EnhancedScatterChartBackdrop;
|
1731 | outline?: boolean;
|
1732 | crosshair?: boolean;
|
1733 | xCol: DataViewMetadataColumn;
|
1734 | yCol: DataViewMetadataColumn;
|
1735 | dataPoints: EnhancedScatterChartDataPoint[];
|
1736 | legendData: LegendData;
|
1737 | axesLabels: EnhancedScatterChartAxesLabels;
|
1738 | size?: DataViewMetadataColumn;
|
1739 | sizeRange: NumberRange;
|
1740 | dataLabelsSettings: PointDataLabelsSettings;
|
1741 | defaultDataPointColor?: string;
|
1742 | showAllDataPoints?: boolean;
|
1743 | hasDynamicSeries?: boolean;
|
1744 | fillPoint?: boolean;
|
1745 | colorBorder?: boolean;
|
1746 | colorByCategory?: boolean;
|
1747 | selectedIds: SelectionId[];
|
1748 | }
|
1749 | interface EnhancedScatterDataRange {
|
1750 | minRange: number;
|
1751 | maxRange: number;
|
1752 | delta: number;
|
1753 | }
|
1754 | interface EnhancedScatterChartProperty {
|
1755 | [properyName: string]: DataViewObjectPropertyIdentifier;
|
1756 | }
|
1757 | interface EnhancedScatterChartProperties {
|
1758 | [properyName: string]: EnhancedScatterChartProperty;
|
1759 | }
|
1760 | class EnhancedScatterChart implements IVisual {
|
1761 | private static AxisGraphicsContextClassName;
|
1762 | private static ClassName;
|
1763 | private static MainGraphicsContextClassName;
|
1764 | private static LegendLabelFontSizeDefault;
|
1765 | private static LabelDisplayUnitsDefault;
|
1766 | private static AxisFontSize;
|
1767 | private static CrosshairTextMargin;
|
1768 | private static BubbleRadius;
|
1769 | private static MinSizeRange;
|
1770 | private static MaxSizeRange;
|
1771 | private static AreaOf300By300Chart;
|
1772 | private static DataLabelXOffset;
|
1773 | private static DataLabelYOffset;
|
1774 | private static DotClasses;
|
1775 | private static ImageClasses;
|
1776 | private static TextProperties;
|
1777 | static CrosshairCanvasSelector: ClassAndSelector;
|
1778 | static CrosshairLineSelector: ClassAndSelector;
|
1779 | static CrosshairVerticalLineSelector: ClassAndSelector;
|
1780 | static CrosshairHorizontalLineSelector: ClassAndSelector;
|
1781 | static CrosshairTextSelector: ClassAndSelector;
|
1782 | static MaxTranslateValue: number;
|
1783 | static MinTranslateValue: number;
|
1784 | static DefaultBubbleOpacity: number;
|
1785 | static DimmedBubbleOpacity: number;
|
1786 | private legend;
|
1787 | private svgScrollable;
|
1788 | private axisGraphicsContext;
|
1789 | private axisGraphicsContextScrollable;
|
1790 | private xAxisGraphicsContext;
|
1791 | private backgroundGraphicsContext;
|
1792 | private y1AxisGraphicsContext;
|
1793 | private svg;
|
1794 | private element;
|
1795 | private mainGraphicsSVGSelection;
|
1796 | private mainGraphicsContext;
|
1797 | private clearCatcher;
|
1798 | private mainGraphicsG;
|
1799 | private crosshairCanvasSelection;
|
1800 | private crosshairVerticalLineSelection;
|
1801 | private crosshairHorizontalLineSelection;
|
1802 | private crosshairTextSelection;
|
1803 | private style;
|
1804 | private data;
|
1805 | private dataView;
|
1806 | private xAxisProperties;
|
1807 | private yAxisProperties;
|
1808 | private colors;
|
1809 | private options;
|
1810 | private interactivity;
|
1811 | private interactivityService;
|
1812 | private categoryAxisProperties;
|
1813 | private valueAxisProperties;
|
1814 | private yAxisOrientation;
|
1815 | private scrollY;
|
1816 | private scrollX;
|
1817 | private dataViews;
|
1818 | private legendObjectProperties;
|
1819 | private hostServices;
|
1820 | private layerLegendData;
|
1821 | private legendLabelFontSize;
|
1822 | private hasCategoryAxis;
|
1823 | private yAxisIsCategorical;
|
1824 | private bottomMarginLimit;
|
1825 | private leftRightMarginLimit;
|
1826 | private isXScrollBarVisible;
|
1827 | private isYScrollBarVisible;
|
1828 | private ScrollBarWidth;
|
1829 | private categoryAxisHasUnitType;
|
1830 | private valueAxisHasUnitType;
|
1831 | private svgDefaultImage;
|
1832 | private oldBackdrop;
|
1833 | private behavior;
|
1834 | private animator;
|
1835 | private keyArray;
|
1836 | private _margin;
|
1837 | private margin;
|
1838 | private _viewport;
|
1839 | private viewport;
|
1840 | private _viewportIn;
|
1841 | private viewportIn;
|
1842 | private legendViewport;
|
1843 | static ColumnCategory: string;
|
1844 | static ColumnSeries: string;
|
1845 | static ColumnX: string;
|
1846 | static ColumnY: string;
|
1847 | static ColumnSize: string;
|
1848 | static ColumnGradient: string;
|
1849 | static ColumnColorFill: string;
|
1850 | static ColumnShape: string;
|
1851 | static ColumnImage: string;
|
1852 | static ColumnRotation: string;
|
1853 | static ColumnBackdrop: string;
|
1854 | static ColumnXStart: string;
|
1855 | static ColumnXEnd: string;
|
1856 | static ColumnYStart: string;
|
1857 | static ColumnYEnd: string;
|
1858 | static capabilities: VisualCapabilities;
|
1859 | |
1860 |
|
1861 |
|
1862 | static getPropertiesByCapabilities<T>(capabilities: VisualCapabilities): T;
|
1863 | |
1864 |
|
1865 |
|
1866 | static Properties: EnhancedScatterChartProperties;
|
1867 | private static substractMargin(viewport, margin);
|
1868 | private static getCustomSymbolType(shape);
|
1869 | init(options: VisualInitOptions): void;
|
1870 | private adjustMargins();
|
1871 | private getValueAxisProperties(dataViewMetadata, axisTitleOnByDefault?);
|
1872 | private getCategoryAxisProperties(dataViewMetadata, axisTitleOnByDefault?);
|
1873 | static converter(dataView: DataView, colorPalette: IDataColorPalette, interactivityService?: IInteractivityService, categoryAxisProperties?: DataViewObject, valueAxisProperties?: DataViewObject): EnhancedScatterChartData;
|
1874 | private static createSeriesLegend(dataValues, colorPalette, categorical, formatString, defaultDataPointColor);
|
1875 | private static getSizeRangeForGroups(dataViewValueGroups, sizeColumnIndex);
|
1876 | private static getMetadata(categories, grouped, source);
|
1877 | static createLazyFormattedCategory(formatter: IValueFormatter, value: string): Lazy<string>;
|
1878 | private static createDataPoints(dataValues, metadata, categories, categoryValues, categoryFormatter, categoryIdentities, categoryObjects, colorPalette, hasDynamicSeries, labelSettings, defaultDataPointColor?, categoryQueryName?);
|
1879 | private static getMeasureValue(measureIndex, seriesValues);
|
1880 | private static getNumberFromDataViewValueColumnById(dataViewValueColumn, index);
|
1881 | private static getValueFromDataViewValueColumnById(dataViewValueColumn, index);
|
1882 | private static getDefaultData();
|
1883 | setData(dataViews: DataView[]): void;
|
1884 | update(options: VisualUpdateOptions): void;
|
1885 | private populateObjectProperties(dataViews);
|
1886 | private renderLegend();
|
1887 | private shouldRenderAxis(axisProperties, propertyName?);
|
1888 | private getMaxMarginFactor();
|
1889 | private adjustViewportbyBackdrop();
|
1890 | render(suppressAnimations: boolean): void;
|
1891 | private cloneDataPoints(dataPoints);
|
1892 | private darkenZeroLine(g);
|
1893 | private getCategoryAxisFill();
|
1894 | private getEnhanchedScatterChartLabelLayout(labelSettings, viewport, sizeRange);
|
1895 | private static getBubbleRadius(radiusData, sizeRange, viewport);
|
1896 | private static getBubblePixelAreaSizeRange(viewPort, minSizeRange, maxSizeRange);
|
1897 | static projectSizeToPixels(size: number, actualSizeDataRange: EnhancedScatterDataRange, bubblePixelAreaSizeRange: EnhancedScatterDataRange): number;
|
1898 | static project(value: number, actualSizeDataRange: EnhancedScatterDataRange, bubblePixelAreaSizeRange: EnhancedScatterDataRange): number;
|
1899 | static rangeContains(range: EnhancedScatterDataRange, value: number): boolean;
|
1900 | private getValueAxisFill();
|
1901 | |
1902 |
|
1903 |
|
1904 | renderCrosshair(): D3.Selection;
|
1905 | |
1906 |
|
1907 |
|
1908 | addCrosshairCanvasToDOM(rootElement: D3.Selection): D3.Selection;
|
1909 | |
1910 |
|
1911 |
|
1912 | addCrosshairLineToDOM(rootElement: D3.Selection, elementSelector: ClassAndSelector): D3.Selection;
|
1913 | |
1914 |
|
1915 |
|
1916 | addCrosshairTextToDOM(rootElement: D3.Selection): D3.Selection;
|
1917 | |
1918 |
|
1919 |
|
1920 | bindCrosshairEvents(): void;
|
1921 | |
1922 |
|
1923 |
|
1924 | updateCrosshair(x: number, y: number): void;
|
1925 | |
1926 |
|
1927 |
|
1928 | addElementToDOM(rootElement: D3.Selection, properties: ElementProperties): D3.Selection;
|
1929 | private renderBackground();
|
1930 | private renderChart(mainAxisScale, xAxis, yAxis, tickLabelMargins, chartHasAxisLabels, axisLabels, suppressAnimations, scrollScale?, extent?);
|
1931 | private renderAxesLabels(axisLabels, legendMargin, hideXAxisTitle, hideYAxisTitle, hideY2AxisTitle);
|
1932 | private updateAxis();
|
1933 | private getUnitType(xAxis);
|
1934 | private addUnitTypeToAxisLabel(xAxis, yAxis);
|
1935 | private drawScatterMarkers(scatterData, hasSelection, sizeRange, duration);
|
1936 | static getBubbleOpacity(d: EnhancedScatterChartDataPoint, hasSelection: boolean): number;
|
1937 | calculateAxes(categoryAxisProperties: DataViewObject, valueAxisProperties: DataViewObject, textProperties: TextProperties, scrollbarVisible: boolean): IAxisProperties[];
|
1938 | calculateAxesProperties(options: CalculateScaleAndDomainOptions): IAxisProperties[];
|
1939 | |
1940 |
|
1941 |
|
1942 | optimizeTranslateValues(values: number[]): number[];
|
1943 | |
1944 |
|
1945 |
|
1946 | optimizeTranslateValue(value: number): number;
|
1947 | private enumerateDataPoints(enumeration);
|
1948 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
1949 | hasLegend(): boolean;
|
1950 | private getLegendValue(enumeration);
|
1951 | private getCategoryAxisValues(enumeration);
|
1952 | private getValueAxisValues(enumeration);
|
1953 | onClearSelection(): void;
|
1954 | }
|
1955 | interface CustomVisualBehaviorOptions {
|
1956 | layerOptions: any[];
|
1957 | clearCatcher: D3.Selection;
|
1958 | }
|
1959 | class CustomVisualBehavior implements IInteractiveBehavior {
|
1960 | private behaviors;
|
1961 | constructor(behaviors: IInteractiveBehavior[]);
|
1962 | bindEvents(options: CustomVisualBehaviorOptions, selectionHandler: ISelectionHandler): void;
|
1963 | renderSelection(hasSelection: boolean): void;
|
1964 | }
|
1965 | interface EnhancedScatterBehaviorOptions {
|
1966 | dataPointsSelection: D3.Selection;
|
1967 | data: EnhancedScatterChartData;
|
1968 | plotContext: D3.Selection;
|
1969 | }
|
1970 | class EnhancedScatterChartWebBehavior implements IInteractiveBehavior {
|
1971 | private dimmedBubbleOpacity;
|
1972 | private defaultBubbleOpacity;
|
1973 | private bubbles;
|
1974 | private shouldEnableFill;
|
1975 | private colorBorder;
|
1976 | constructor(dimmedBubbleOpacity: number, defaultBubbleOpacity: number);
|
1977 | bindEvents(options: EnhancedScatterBehaviorOptions, selectionHandler: ISelectionHandler): void;
|
1978 | renderSelection(hasSelection: boolean): void;
|
1979 | private getMarkerFillOpacity(hasSize, shouldEnableFill, hasSelection, isSelected);
|
1980 | getMarkerStrokeOpacity(hasSize: boolean, colorBorder: boolean, hasSelection: boolean, isSelected: boolean): number;
|
1981 | }
|
1982 | }
|
1983 |
|
1984 | declare var THREE: any;
|
1985 | declare var WebGLHeatmap: any;
|
1986 | declare var GlobeMapCanvasLayers: JQuery[];
|
1987 | declare module powerbi.visuals.samples {
|
1988 | class GlobeMap implements IVisual {
|
1989 | static MercartorSphere: any;
|
1990 | private viewport;
|
1991 | private container;
|
1992 | private domElement;
|
1993 | private camera;
|
1994 | private renderer;
|
1995 | private scene;
|
1996 | private orbitControls;
|
1997 | private earth;
|
1998 | private settings;
|
1999 | private data;
|
2000 | private dataPointsToEnumerate;
|
2001 | private heatmap;
|
2002 | private heatTexture;
|
2003 | private mapTextures;
|
2004 | private barsGroup;
|
2005 | private readyToRender;
|
2006 | private categoricalView;
|
2007 | private deferredRenderTimerId;
|
2008 | private globeMapLocationCache;
|
2009 | private locationsToLoad;
|
2010 | private locationsLoaded;
|
2011 | private renderLoopEnabled;
|
2012 | private needsRender;
|
2013 | private mousePosNormalized;
|
2014 | private mousePos;
|
2015 | private rayCaster;
|
2016 | private selectedBar;
|
2017 | private hoveredBar;
|
2018 | private averageBarVector;
|
2019 | private zoomControl;
|
2020 | private colorHelper;
|
2021 | private colors;
|
2022 | private style;
|
2023 | static capabilities: VisualCapabilities;
|
2024 | private static Properties;
|
2025 | static converter(dataView: DataView): any;
|
2026 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
2027 | private enumerateDataPoints(enumeration);
|
2028 | init(options: VisualInitOptions): void;
|
2029 | private setup();
|
2030 | private initSettings();
|
2031 | private initScene();
|
2032 | private shouldRender();
|
2033 | private createEarth();
|
2034 | zoomClicked(zoomDirection: any): void;
|
2035 | rotateCam(deltaX: number, deltaY: number): void;
|
2036 | private initTextures();
|
2037 | private initHeatmap();
|
2038 | private setEarthTexture();
|
2039 | update(options: VisualUpdateOptions): void;
|
2040 | cleanHeatAndBar(): void;
|
2041 | private renderMagic();
|
2042 | private getBarMaterialByIndex(index);
|
2043 | private getToolTipDataForSeries(toolTipData, dataPointToolTip);
|
2044 | private createDataPointForEnumeration(seriesData, valueIndex, seriesIndex, metaData?);
|
2045 | private composeRenderData(categoricalView?, metadataView?);
|
2046 | private geocodeRenderDatum(renderDatum, place, locationType);
|
2047 | private defferedRender();
|
2048 | private initRayCaster();
|
2049 | private intersectBars();
|
2050 | private animateCamera(to, done?);
|
2051 | destroy(): void;
|
2052 | private initZoomControl();
|
2053 | private initMercartorSphere();
|
2054 | private getBingMapCanvas(resolution);
|
2055 | }
|
2056 | }
|
2057 | declare function loadGlobeMapLibs(): void;
|
2058 |
|
2059 | declare module powerbi.visuals.samples {
|
2060 | interface RadarChartConstructorOptions {
|
2061 | animator?: IGenericAnimator;
|
2062 | svg?: D3.Selection;
|
2063 | margin?: IMargin;
|
2064 | }
|
2065 | interface RadarChartDatapoint extends SelectableDataPoint {
|
2066 | x: number;
|
2067 | y: number;
|
2068 | y0?: number;
|
2069 | color?: string;
|
2070 | value?: number;
|
2071 | tooltipInfo?: TooltipDataItem[];
|
2072 | labelFormatString?: string;
|
2073 | labelFontSize?: string;
|
2074 | }
|
2075 | interface RadarChartData {
|
2076 | legendData: LegendData;
|
2077 | series: RadarChartSeries[];
|
2078 | settings: RadarChartSettings;
|
2079 | dataLabelsSettings: PointDataLabelsSettings;
|
2080 | }
|
2081 | interface RadarChartSeries {
|
2082 | fill: string;
|
2083 | name: string;
|
2084 | data: RadarChartDatapoint[];
|
2085 | identity: SelectionId;
|
2086 | }
|
2087 | interface RadarChartSettings {
|
2088 | showLegend?: boolean;
|
2089 | }
|
2090 | interface RadarChartBehaviorOptions {
|
2091 | selection: D3.Selection;
|
2092 | clearCatcher: D3.Selection;
|
2093 | }
|
2094 | |
2095 |
|
2096 |
|
2097 | class RadarChartWebBehavior implements IInteractiveBehavior {
|
2098 | private selection;
|
2099 | bindEvents(options: RadarChartBehaviorOptions, selectionHandler: ISelectionHandler): void;
|
2100 | renderSelection(hasSelection: boolean): void;
|
2101 | }
|
2102 | class RadarChart implements IVisual {
|
2103 | static capabilities: VisualCapabilities;
|
2104 |
|
2105 | static formatStringProp: DataViewObjectPropertyIdentifier;
|
2106 | private static Properties;
|
2107 | private static VisualClassName;
|
2108 | private static Segments;
|
2109 | private static SegmentNode;
|
2110 | private static ZeroSegment;
|
2111 | private static ZeroSegmentNode;
|
2112 | private static ZeroLabel;
|
2113 | private static Axis;
|
2114 | private static AxisNode;
|
2115 | private static AxisLabel;
|
2116 | private static Chart;
|
2117 | private static ChartNode;
|
2118 | private static ChartArea;
|
2119 | private static ChartPolygon;
|
2120 | private static ChartDot;
|
2121 | private static MaxPrecision;
|
2122 | private static MinPrecision;
|
2123 | private svg;
|
2124 | private segments;
|
2125 | private zeroSegment;
|
2126 | private axis;
|
2127 | private chart;
|
2128 | private mainGroupElement;
|
2129 | private colors;
|
2130 | private viewport;
|
2131 | private interactivityService;
|
2132 | private animator;
|
2133 | private margin;
|
2134 | private legend;
|
2135 | private legendObjectProperties;
|
2136 | private radarChartData;
|
2137 | private isInteractiveChart;
|
2138 | private zeroPointRadius;
|
2139 | private static DefaultMargin;
|
2140 | private static SegmentLevels;
|
2141 | private static SegmentFactor;
|
2142 | private static Radians;
|
2143 | private static Scale;
|
2144 | static NodeFillOpacity: number;
|
2145 | static AreaFillOpacity: number;
|
2146 | static DimmedAreaFillOpacity: number;
|
2147 | private angle;
|
2148 | private radius;
|
2149 | static AxesLabelsFontFamily: string;
|
2150 | static AxesLabelsfontSize: string;
|
2151 | static AxesLabelsMaxWidth: number;
|
2152 | static converter(dataView: DataView, colors: IDataColorPalette): RadarChartData;
|
2153 | constructor(options?: RadarChartConstructorOptions);
|
2154 | init(options: VisualInitOptions): void;
|
2155 | update(options: VisualUpdateOptions): void;
|
2156 | private getRadarChartLabelLayout(labelSettings, allDataPoints);
|
2157 | private drawCircularSegments(values);
|
2158 | private drawDataLabels(series);
|
2159 | private drawAxes(values);
|
2160 | private drawAxesLabels(values, dataViewMetadataColumn?);
|
2161 | private drawChart(series, duration);
|
2162 | private calculateChartDomain(series);
|
2163 | private renderLegend(radarChartData);
|
2164 | private drawZeroCircularSegment(values);
|
2165 | private drawZeroLabel();
|
2166 | private getDataPoints(series);
|
2167 | private getAllDataPointsList(series);
|
2168 | private isPercentChart(dataPointsList);
|
2169 | private parseLegendProperties(dataView);
|
2170 | private static parseSettings(dataView);
|
2171 | private static getPrecision(value);
|
2172 | private static parseLabelSettings(dataView);
|
2173 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
2174 | private getLabelSettingsOptions(enumeration, labelSettings);
|
2175 | private enumerateDataLabels(enumeration);
|
2176 | private enumerateLegend(settings);
|
2177 | private enumerateDataPoint(enumeration);
|
2178 | private updateViewport();
|
2179 | }
|
2180 | }
|
2181 |
|
2182 | declare module powerbi.visuals.samples {
|
2183 | interface HistogramConstructorOptions {
|
2184 | svg?: D3.Selection;
|
2185 | animator?: IGenericAnimator;
|
2186 | margin?: IMargin;
|
2187 | }
|
2188 | interface HistogramAxisSettings {
|
2189 | axisColor?: string;
|
2190 | displayUnits?: number;
|
2191 | precision?: number;
|
2192 | title?: boolean;
|
2193 | show?: boolean;
|
2194 | style?: string;
|
2195 | }
|
2196 | interface HistogramXAxisSettings extends HistogramAxisSettings {
|
2197 | }
|
2198 | interface HistogramYAxisSettings extends HistogramAxisSettings {
|
2199 | start?: number;
|
2200 | end?: number;
|
2201 | position?: string;
|
2202 | }
|
2203 | interface HistogramLabelSettings {
|
2204 | show?: boolean;
|
2205 | color?: string;
|
2206 | displayUnits?: number;
|
2207 | precision?: number;
|
2208 | fontSize?: number;
|
2209 | }
|
2210 | interface HistogramSettings {
|
2211 | displayName?: string;
|
2212 | fillColor?: string;
|
2213 | frequency: boolean;
|
2214 | bins?: number;
|
2215 | precision: number;
|
2216 | maxX?: number;
|
2217 | xAxisSettings: HistogramXAxisSettings;
|
2218 | yAxisSettings: HistogramYAxisSettings;
|
2219 | labelSettings: HistogramLabelSettings;
|
2220 | }
|
2221 | interface HistogramData extends D3.Layout.Bin, TooltipEnabledDataPoint {
|
2222 | range: number[];
|
2223 | selectionIds: SelectionId[];
|
2224 | }
|
2225 | interface HistogramDataView {
|
2226 | data: HistogramData[];
|
2227 | xScale?: D3.Scale.LinearScale;
|
2228 | yScale?: D3.Scale.LinearScale;
|
2229 | settings: HistogramSettings;
|
2230 | formatter: IValueFormatter;
|
2231 | xLabelFormatter?: IValueFormatter;
|
2232 | yLabelFormatter?: IValueFormatter;
|
2233 | }
|
2234 | class HistogramChartWarning implements IVisualWarning {
|
2235 | static ErrorInvalidDataValues: string;
|
2236 | private message;
|
2237 | constructor(message: string);
|
2238 | code: string;
|
2239 | getMessages(resourceProvider: jsCommon.IStringResourceProvider): IVisualErrorMessage;
|
2240 | }
|
2241 | class Histogram implements IVisual {
|
2242 | private static ClassName;
|
2243 | private static FrequencyText;
|
2244 | private static DensityText;
|
2245 | private static Properties;
|
2246 | private static DefaultHistogramSettings;
|
2247 | private static Axes;
|
2248 | private static Axis;
|
2249 | private static Labels;
|
2250 | private static Columns;
|
2251 | private static Column;
|
2252 | private static Legends;
|
2253 | private static Legend;
|
2254 | static capabilities: VisualCapabilities;
|
2255 | private ColumnPadding;
|
2256 | private MinColumnHeight;
|
2257 | private MinOpacity;
|
2258 | private MaxOpacity;
|
2259 | private static MinNumberOfBins;
|
2260 | private static MaxNumberOfBins;
|
2261 | private static MinPrecision;
|
2262 | private static MaxPrecision;
|
2263 | private TooltipDisplayName;
|
2264 | private SeparatorNumbers;
|
2265 | private LegendSize;
|
2266 | private YLegendSize;
|
2267 | private XLegendSize;
|
2268 | private AxisSize;
|
2269 | private DataLabelMargin;
|
2270 | private widthOfColumn;
|
2271 | private yTitleMargin;
|
2272 | private outerPadding;
|
2273 | private xAxisProperties;
|
2274 | private yAxisProperties;
|
2275 | private ExcludeBrackets;
|
2276 | private IncludeBrackets;
|
2277 | private margin;
|
2278 | private durationAnimations;
|
2279 | private oldInnerPaddingRatio;
|
2280 | private oldMinOrdinalRectThickness;
|
2281 | private viewport;
|
2282 | private hostService;
|
2283 | private selectionManager;
|
2284 | private colors;
|
2285 | private root;
|
2286 | private svg;
|
2287 | private main;
|
2288 | private axes;
|
2289 | private axisX;
|
2290 | private axisY;
|
2291 | private legend;
|
2292 | private columns;
|
2293 | private labels;
|
2294 | private histogramDataView;
|
2295 | private animator;
|
2296 | private columnsSelection;
|
2297 | private textProperties;
|
2298 | constructor(histogramConstructorOptions?: HistogramConstructorOptions);
|
2299 | init(visualsOptions: VisualInitOptions): void;
|
2300 | converter(dataView: DataView): HistogramDataView;
|
2301 | private static getValuesByFrequencies(sourceValues, frequencies, identities);
|
2302 | private getData(values, numericalValues, data, settings, yValueFormatter, xValueFormatter);
|
2303 | private static getRange(minValue, maxValue, step, index);
|
2304 | private getTooltipData(value, range, settings, includeLeftBorder, yValueFormatter, xValueFormatter);
|
2305 | private static getSelectionIds(values, bin, index);
|
2306 | private static isValueContainedInRange(value, bin, index);
|
2307 | private parseSettings(dataView);
|
2308 | private static getLegend(title, style, displayUnit);
|
2309 | private static getLabelFontSize(objects);
|
2310 | private static getLabelShow(objects);
|
2311 | private static getLabelColor(objects);
|
2312 | private static getLabelDisplayUnits(objects);
|
2313 | private static getLabelPrecision(objects);
|
2314 | private static getXStyle(objects);
|
2315 | private static getXDisplayUnit(objects);
|
2316 | private static getXPrecision(objects);
|
2317 | private static getXAxisShow(objects);
|
2318 | private static getXAxisColor(objects);
|
2319 | private static getXTitle(objects);
|
2320 | private static getYStyle(objects);
|
2321 | private static getYPosition(objects);
|
2322 | private static getYAxisShow(objects);
|
2323 | private static getYAxisColor(objects);
|
2324 | private static getYStart(objects);
|
2325 | private static getYEnd(objects);
|
2326 | private static getYDisplayUnit(objects);
|
2327 | private static getYPrecision(objects);
|
2328 | private static getYTitle(objects);
|
2329 | private static getBins(objects);
|
2330 | private static getFrequency(objects);
|
2331 | private static getPrecision(objects);
|
2332 | validateData(data: HistogramDataView): boolean;
|
2333 | update(visualUpdateOptions: VisualUpdateOptions): void;
|
2334 | private fixXTicSize();
|
2335 | private setSize(viewport);
|
2336 | private updateElements(height, width);
|
2337 | shouldShowYOnRight(): boolean;
|
2338 | private columsAndAxesTransform(labelWidth);
|
2339 | private render();
|
2340 | private adjustTransformToAxisLabels();
|
2341 | private renderColumns();
|
2342 | private static renderTooltip(selection);
|
2343 | private getColumnHeight(column, y);
|
2344 | private renderAxes();
|
2345 | private getLabaelLayout();
|
2346 | private renderLabels();
|
2347 | private static rangesToArray(data);
|
2348 | private rangeToString(range, includeLeftBorder, valueFormatter);
|
2349 | private renderLegend();
|
2350 | private getDataLegends(settings);
|
2351 | private static getLegendText(settings);
|
2352 | private bindSelectionHandler(columnsSelection);
|
2353 | private setSelection(columnsSelection, data?);
|
2354 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[];
|
2355 | private static getObjectsFromDataView(dataView);
|
2356 | destroy(): void;
|
2357 | private calculateXAxes(source, textProperties, scrollbarVisible);
|
2358 | private calculateXAxesProperties(options, metaDataColumn);
|
2359 | private calculateYAxes(source, textProperties, scrollbarVisible);
|
2360 | private calculateYAxesProperties(options, metaDataColumn);
|
2361 | }
|
2362 | }
|
2363 | declare module powerbi.visuals.samples {
|
2364 | import ClassAndSelector = jsCommon.CssConstants.ClassAndSelector;
|
2365 | module DotPlotLabelsOrientation {
|
2366 | enum Orientation {
|
2367 | Horizontal = 0,
|
2368 | Vertical = 1,
|
2369 | }
|
2370 | var type: IEnumType;
|
2371 | }
|
2372 | var DotPlotProperties: any;
|
2373 | interface DotPlotSelectors {
|
2374 | svgPlotSelector: ClassAndSelector;
|
2375 | plotSelector: ClassAndSelector;
|
2376 | plotGroupSelector: ClassAndSelector;
|
2377 | axisSelector: ClassAndSelector;
|
2378 | xAxisSelector: ClassAndSelector;
|
2379 | circleSeletor: ClassAndSelector;
|
2380 | }
|
2381 | interface DotPlotChartCategory {
|
2382 | value: string;
|
2383 | selectionId: SelectionId;
|
2384 | }
|
2385 | interface DotPlotConstructorOptions {
|
2386 | animator?: IGenericAnimator;
|
2387 | svg?: D3.Selection;
|
2388 | margin?: IMargin;
|
2389 | radius?: number;
|
2390 | strokeWidth?: number;
|
2391 | }
|
2392 | interface DotPlotDataPoint {
|
2393 | x: number;
|
2394 | y: number;
|
2395 | tooltipInfo: TooltipDataItem[];
|
2396 | }
|
2397 | interface DotPlotSettings {
|
2398 | labelSettings?: VisualDataLabelsSettings;
|
2399 | formatter?: IValueFormatter;
|
2400 | tooltipFormatter?: IValueFormatter;
|
2401 | categorySettings?: DotPlotCategorySettings;
|
2402 | defaultDataPointColor?: string;
|
2403 | categoryAxisSettings?: DotPlotCategoryAxisSettings;
|
2404 | labelOrientation?: DotPlotLabelsOrientation.Orientation;
|
2405 | labelTextMaxSize: number;
|
2406 | }
|
2407 | interface DotPlotCategoryAxisSettings {
|
2408 | show?: boolean;
|
2409 | showAxisTitle?: boolean;
|
2410 | labelColor?: Fill;
|
2411 | }
|
2412 | interface DotPlotCategorySettings {
|
2413 | show?: boolean;
|
2414 | fontColor?: string;
|
2415 | fontSize?: number;
|
2416 | }
|
2417 | interface DotPlotDataGroup extends SelectableDataPoint {
|
2418 | label?: string;
|
2419 | value?: number;
|
2420 | color?: string;
|
2421 | tooltipInfo?: TooltipDataItem[];
|
2422 | dataPoints: DotPlotDataPoint[];
|
2423 | labelFontSize: string;
|
2424 | highlight?: boolean;
|
2425 | }
|
2426 | interface DotPlotDataView {
|
2427 | displayName: string;
|
2428 | dataPoints: DotPlotDataGroup[];
|
2429 | values: any[];
|
2430 | settings: DotPlotSettings;
|
2431 | categories: DotPlotChartCategory[];
|
2432 | }
|
2433 | class DotPlot implements IVisual {
|
2434 | private viewportIn;
|
2435 | static capabilities: VisualCapabilities;
|
2436 | private DefaultMargin;
|
2437 | private svg;
|
2438 | private xAxis;
|
2439 | private dotPlot;
|
2440 | private clearCatcher;
|
2441 | private behavior;
|
2442 | private colors;
|
2443 | private dataView;
|
2444 | private animator;
|
2445 | private durationAnimations;
|
2446 | private dotPlotDataView;
|
2447 | private radius;
|
2448 | private strokeWidth;
|
2449 | private interactivityService;
|
2450 | private scaleType;
|
2451 | private textProperties;
|
2452 | private dotPlotSelectors;
|
2453 | private DefaultDotPlotSettings;
|
2454 | private static getTooltipData(value);
|
2455 | static converter(dataView: DataView, objects: DataViewObjects, scale: D3.Scale.OrdinalScale, defaultMargin: IMargin, defaultSetting: DotPlotSettings, colors: IDataColorPalette, viewport: IViewport, radius: number): DotPlotDataView;
|
2456 | constructor(options?: DotPlotConstructorOptions);
|
2457 | init(options: VisualInitOptions): void;
|
2458 | update(options: VisualUpdateOptions): void;
|
2459 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
2460 | private enumerateCategoryAxisValues(enumeration, dataView);
|
2461 | private static getObjectsFromDataView(dataView);
|
2462 | private static parseSettings(objects, defaultDotPlotSettings);
|
2463 | private static parseCategoryAxisSettings(objects, defaultDotPlotSettings);
|
2464 | private static getCategorySettings(objects, defaultDotPlotSettings);
|
2465 | private static getPrecision(objects, defaultDotPlotSettings);
|
2466 | private drawDotPlot(data, setting);
|
2467 | private getEnhanchedDotplotLayout(labelSettings, viewport);
|
2468 | private enumerateDataLabels(enumeration, dataView);
|
2469 | private enumerateDataPoints(enumeration, dataView);
|
2470 | private enumerateCategories(enumeration, dataView);
|
2471 | private clearData();
|
2472 | private renderTooltip(selection);
|
2473 | private calculateAxes(viewportIn, categoryAxisSettings, textProperties, objects, scrollbarVisible);
|
2474 | private calculateAxesProperties(viewportIn, categoryAxisSettings, options, metaDataColumn, objects);
|
2475 | private renderAxis(height, viewportIn, xAxisProperties, categoryAxisSettings, data, duration);
|
2476 | private static setAxisLabelColor(g, fill);
|
2477 | }
|
2478 | interface DotplotBehaviorOptions {
|
2479 | columns: D3.Selection;
|
2480 | clearCatcher: D3.Selection;
|
2481 | interactivityService: IInteractivityService;
|
2482 | }
|
2483 | class DotplotBehavior implements IInteractiveBehavior {
|
2484 | private columns;
|
2485 | private clearCatcher;
|
2486 | private interactivityService;
|
2487 | bindEvents(options: DotplotBehaviorOptions, selectionHandler: ISelectionHandler): void;
|
2488 | renderSelection(hasSelection: boolean): void;
|
2489 | }
|
2490 | }
|
2491 |
|
2492 | declare module powerbi.visuals.samples {
|
2493 | enum LinkColorType {
|
2494 | ByWeight,
|
2495 | ByLinkType,
|
2496 | Interactive,
|
2497 | }
|
2498 | class ForceGraphSettings {
|
2499 | static Default: ForceGraphSettings;
|
2500 | static parse(dataView: DataView, capabilities: VisualCapabilities): ForceGraphSettings;
|
2501 | static getProperties(capabilities: VisualCapabilities): {
|
2502 | [i: string]: {
|
2503 | [i: string]: DataViewObjectPropertyIdentifier;
|
2504 | };
|
2505 | };
|
2506 | static createEnumTypeFromEnum(type: any): IEnumType;
|
2507 | private static getValueFnByType(type);
|
2508 | static enumerateObjectInstances(settings: any, options: EnumerateVisualObjectInstancesOptions, capabilities: VisualCapabilities): VisualObjectInstanceEnumeration;
|
2509 | labels: {
|
2510 | show: boolean;
|
2511 | color: string;
|
2512 | fontSize: number;
|
2513 | };
|
2514 | links: {
|
2515 | showArrow: boolean;
|
2516 | showLabel: boolean;
|
2517 | colorLink: LinkColorType;
|
2518 | thickenLink: boolean;
|
2519 | displayUnits: number;
|
2520 | decimalPlaces: number;
|
2521 | };
|
2522 | nodes: {
|
2523 | displayImage: boolean;
|
2524 | defaultImage: string;
|
2525 | imageUrl: string;
|
2526 | imageExt: string;
|
2527 | nameMaxLength: number;
|
2528 | highlightReachableLinks: boolean;
|
2529 | };
|
2530 | size: {
|
2531 | charge: number;
|
2532 | };
|
2533 | }
|
2534 | class ForceGraphColumns<T> {
|
2535 | static Roles: ForceGraphColumns<string>;
|
2536 | static getMetadataColumns(dataView: DataView): ForceGraphColumns<DataViewMetadataColumn>;
|
2537 | static getTableValues(dataView: DataView): ForceGraphColumns<any[]>;
|
2538 | static getTableRows(dataView: DataView): ForceGraphColumns<any>[];
|
2539 | Source: T;
|
2540 | Target: T;
|
2541 | Weight: T;
|
2542 | LinkType: T;
|
2543 | SourceType: T;
|
2544 | TargetType: T;
|
2545 | }
|
2546 | interface ForceGraphLink {
|
2547 | source: ForceGraphNode;
|
2548 | target: ForceGraphNode;
|
2549 | weight: number;
|
2550 | formattedWeight: string;
|
2551 | type: string;
|
2552 | tooltipInfo: TooltipDataItem[];
|
2553 | }
|
2554 | interface ForceGraphNode {
|
2555 | name: string;
|
2556 | image: string;
|
2557 | adj: {
|
2558 | [i: string]: number;
|
2559 | };
|
2560 | x?: number;
|
2561 | y?: number;
|
2562 | isDrag?: boolean;
|
2563 | isOver?: boolean;
|
2564 | }
|
2565 | interface ForceGraphNodes {
|
2566 | [i: string]: ForceGraphNode;
|
2567 | }
|
2568 | interface ForceGraphData {
|
2569 | nodes: ForceGraphNodes;
|
2570 | links: ForceGraphLink[];
|
2571 | minFiles: number;
|
2572 | maxFiles: number;
|
2573 | linkedByName: {};
|
2574 | linkTypes: {};
|
2575 | settings: ForceGraphSettings;
|
2576 | }
|
2577 | class ForceGraph implements IVisual {
|
2578 | static VisualClassName: string;
|
2579 | private static Count;
|
2580 | private static DefaultValues;
|
2581 | private static Href;
|
2582 | private data;
|
2583 | private settings;
|
2584 | private root;
|
2585 | private paths;
|
2586 | private nodes;
|
2587 | private forceLayout;
|
2588 | private dataView;
|
2589 | private colors;
|
2590 | private uniqieId;
|
2591 | private marginValue;
|
2592 | private margin;
|
2593 | private viewportValue;
|
2594 | private viewport;
|
2595 | private viewportInValue;
|
2596 | private viewportIn;
|
2597 | private static substractMargin(viewport, margin);
|
2598 | private scale1to10(d);
|
2599 | private getLinkColor(d);
|
2600 | static capabilities: VisualCapabilities;
|
2601 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
2602 | static converter(dataView: DataView, colors: IDataColorPalette): ForceGraphData;
|
2603 | private static parseSettings(dataView);
|
2604 | init(options: VisualInitOptions): void;
|
2605 | update(options: VisualUpdateOptions): void;
|
2606 | private updateNodes();
|
2607 | private tick();
|
2608 | private fadePath(opacity, highlight);
|
2609 | private isReachable(a, b);
|
2610 | private fadeNode(node);
|
2611 | destroy(): void;
|
2612 | }
|
2613 | }
|
2614 |
|
2615 | declare module powerbi.visuals.samples {
|
2616 | import IStringResourceProvider = jsCommon.IStringResourceProvider;
|
2617 | enum GanttDateType {
|
2618 | Day,
|
2619 | Week,
|
2620 | Month,
|
2621 | Year,
|
2622 | }
|
2623 | interface Task extends SelectableDataPoint {
|
2624 | id: number;
|
2625 | name: string;
|
2626 | start: Date;
|
2627 | duration: number;
|
2628 | completion: number;
|
2629 | resource: string;
|
2630 | end: Date;
|
2631 | taskType: string;
|
2632 | description: string;
|
2633 | color: string;
|
2634 | tooltipInfo: TooltipDataItem[];
|
2635 | }
|
2636 | interface GroupedTask {
|
2637 | id: number;
|
2638 | name: string;
|
2639 | tasks: Task[];
|
2640 | }
|
2641 | interface GanttChartFormatters {
|
2642 | startDateFormatter: IValueFormatter;
|
2643 | completionFormatter: IValueFormatter;
|
2644 | durationFormatter: IValueFormatter;
|
2645 | }
|
2646 | interface GanttViewModel {
|
2647 | dataView: DataView;
|
2648 | settings: GanttSettings<any>;
|
2649 | tasks: Task[];
|
2650 | series: GanttSeries[];
|
2651 | legendData: LegendData;
|
2652 | taskTypes: TaskTypes;
|
2653 | }
|
2654 | interface GanttDataPoint extends SelectableDataPoint {
|
2655 | color: string;
|
2656 | value: any;
|
2657 | }
|
2658 | interface GanttSeries extends SelectableDataPoint {
|
2659 | tasks: Task[];
|
2660 | fill: string;
|
2661 | name: string;
|
2662 | }
|
2663 | interface TaskTypes {
|
2664 | types: string[];
|
2665 | typeName: string;
|
2666 | }
|
2667 | interface GanttSettings<T> {
|
2668 | general: {
|
2669 | groupTasks: T;
|
2670 | };
|
2671 | legend: {
|
2672 | show: T;
|
2673 | position: T;
|
2674 | showTitle: T;
|
2675 | titleText: T;
|
2676 | labelColor: T;
|
2677 | fontSize: T;
|
2678 | };
|
2679 | taskLabels: {
|
2680 | show: T;
|
2681 | fill: T;
|
2682 | fontSize: T;
|
2683 | width: T;
|
2684 | };
|
2685 | taskCompletion: {
|
2686 | show: T;
|
2687 | fill: T;
|
2688 | };
|
2689 | taskResource: {
|
2690 | show: T;
|
2691 | fill: T;
|
2692 | fontSize: T;
|
2693 | };
|
2694 | dateType: {
|
2695 | type: T;
|
2696 | };
|
2697 | }
|
2698 | class Gantt implements IVisual {
|
2699 | private viewport;
|
2700 | private colors;
|
2701 | private legend;
|
2702 | private textProperties;
|
2703 | static DefaultSettings: GanttSettings<any>;
|
2704 | static DefaultValues: {
|
2705 | AxisTickSize: number;
|
2706 | MaxTaskOpacity: number;
|
2707 | MinTaskOpacity: number;
|
2708 | ProgressBarHeight: number;
|
2709 | ResourceWidth: number;
|
2710 | TaskColor: string;
|
2711 | TaskLineWidth: number;
|
2712 | DefaultDateType: string;
|
2713 | DateFormatStrings: {
|
2714 | Day: string;
|
2715 | Week: string;
|
2716 | Month: string;
|
2717 | Year: string;
|
2718 | };
|
2719 | };
|
2720 | static capabilities: VisualCapabilities;
|
2721 | private static Properties;
|
2722 | private static getProperties(capabilities);
|
2723 | private static DefaultMargin;
|
2724 | private margin;
|
2725 | private style;
|
2726 | private body;
|
2727 | private ganttSvg;
|
2728 | private viewModel;
|
2729 | private timeScale;
|
2730 | private axisGroup;
|
2731 | private chartGroup;
|
2732 | private taskGroup;
|
2733 | private lineGroup;
|
2734 | private clearCatcher;
|
2735 | private ganttDiv;
|
2736 | private selectionManager;
|
2737 | private behavior;
|
2738 | private interactivityService;
|
2739 | private hostServices;
|
2740 | private isInteractiveChart;
|
2741 | init(options: VisualInitOptions): void;
|
2742 | |
2743 |
|
2744 |
|
2745 | private createViewport(element);
|
2746 | |
2747 |
|
2748 |
|
2749 | private clearViewport();
|
2750 | |
2751 |
|
2752 |
|
2753 |
|
2754 | private updateChartSize();
|
2755 | |
2756 |
|
2757 |
|
2758 |
|
2759 |
|
2760 |
|
2761 | private static getTaskProperty<T>(columnSource, child, propertyName);
|
2762 | |
2763 |
|
2764 |
|
2765 |
|
2766 |
|
2767 | private static hasRole(column, name);
|
2768 | |
2769 |
|
2770 |
|
2771 |
|
2772 |
|
2773 | private static getTooltipInfo(task, formatters, timeInterval?);
|
2774 | |
2775 |
|
2776 |
|
2777 |
|
2778 | private static isChartHasTask(dataView);
|
2779 | |
2780 |
|
2781 |
|
2782 |
|
2783 | private static getFormatters(dataView);
|
2784 | |
2785 |
|
2786 |
|
2787 |
|
2788 |
|
2789 |
|
2790 | private static createTasks(dataView, formatters, colors);
|
2791 | |
2792 |
|
2793 |
|
2794 |
|
2795 | private static createSeries(objects, tasks, dataView, colors);
|
2796 | |
2797 |
|
2798 |
|
2799 |
|
2800 | static converter(dataView: DataView, colors: IDataColorPalette): GanttViewModel;
|
2801 | private static parseSettings(dataView, colors);
|
2802 | private static isValidDate(date);
|
2803 | private static convertToDecimal(number);
|
2804 | |
2805 |
|
2806 |
|
2807 |
|
2808 | private static getAllTasksTypes(dataView);
|
2809 | |
2810 |
|
2811 |
|
2812 | private renderLegend();
|
2813 | |
2814 |
|
2815 |
|
2816 |
|
2817 | update(options: VisualUpdateOptions): void;
|
2818 | private getDateType();
|
2819 | private calculateAxes(viewportIn, textProperties, startDate, endDate, axisLength, ticksCount, scrollbarVisible);
|
2820 | private calculateAxesProperties(viewportIn, options, axisLength, metaDataColumn);
|
2821 | private groupTasks(tasks);
|
2822 | private renderAxis(xAxisProperties, duration);
|
2823 | |
2824 |
|
2825 |
|
2826 |
|
2827 |
|
2828 | private updateTaskLabels(tasks, width);
|
2829 | private renderTasks(groupedTasks);
|
2830 | onClearSelection(): void;
|
2831 | |
2832 |
|
2833 |
|
2834 |
|
2835 | private getTaskLabelCoordinateY(taskIndex);
|
2836 | |
2837 |
|
2838 |
|
2839 |
|
2840 | private setTaskProgress(task);
|
2841 | |
2842 |
|
2843 |
|
2844 |
|
2845 | private getBarYCoordinate(lineNumber);
|
2846 | private getBarHeight();
|
2847 | |
2848 |
|
2849 |
|
2850 |
|
2851 | private taskDurationToWidth(task);
|
2852 | private getTooltipForMilstoneLine(timestamp, milestoneTitle);
|
2853 | |
2854 |
|
2855 |
|
2856 |
|
2857 |
|
2858 | private createMilestoneLine(tasks, milestoneTitle?, timestamp?);
|
2859 | private updateElementsPositions(viewport, margin);
|
2860 | private getMilestoneLineLength(numOfTasks);
|
2861 | private enumerateGeneral(settings);
|
2862 | private enumerateLegend(settings);
|
2863 | private enumerateDataPoints(settings);
|
2864 | private enumerateTaskCompletion(settings);
|
2865 | private enumerateTaskLabels(settings);
|
2866 | private enumerateTaskResources(settings);
|
2867 | private enumerateDateType(settings);
|
2868 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
2869 | }
|
2870 | interface GanttBehaviorOptions {
|
2871 | clearCatcher: D3.Selection;
|
2872 | taskSelection: D3.Selection;
|
2873 | legendSelection: D3.Selection;
|
2874 | interactivityService: IInteractivityService;
|
2875 | }
|
2876 | class GanttChartBehavior implements IInteractiveBehavior {
|
2877 | private options;
|
2878 | bindEvents(options: GanttBehaviorOptions, selectionHandler: ISelectionHandler): void;
|
2879 | renderSelection(hasSelection: boolean): void;
|
2880 | }
|
2881 | class GanttChartWarning implements IVisualWarning {
|
2882 | code: string;
|
2883 | getMessages(resourceProvider: IStringResourceProvider): IVisualErrorMessage;
|
2884 | }
|
2885 | }
|
2886 |
|
2887 | declare module powerbi.visuals.samples {
|
2888 | import ClassAndSelector = jsCommon.CssConstants.ClassAndSelector;
|
2889 | const Months: IEnumType;
|
2890 | const WeekDays: IEnumType;
|
2891 | enum GranularityType {
|
2892 | year = 0,
|
2893 | quarter = 1,
|
2894 | month = 2,
|
2895 | week = 3,
|
2896 | day = 4,
|
2897 | }
|
2898 | interface GranularityName {
|
2899 | granularityType: GranularityType;
|
2900 | name: string;
|
2901 | }
|
2902 | interface TimelineMargins {
|
2903 | LeftMargin: number;
|
2904 | RightMargin: number;
|
2905 | TopMargin: number;
|
2906 | BottomMargin: number;
|
2907 | CellWidth: number;
|
2908 | CellHeight: number;
|
2909 | StartXpoint: number;
|
2910 | StartYpoint: number;
|
2911 | ElementWidth: number;
|
2912 | MinCellWidth: number;
|
2913 | MaxCellHeight: number;
|
2914 | PeriodSlicerRectWidth: number;
|
2915 | PeriodSlicerRectHeight: number;
|
2916 | }
|
2917 | interface DefaultTimelineProperties {
|
2918 | DefaultLabelsShow: boolean;
|
2919 | TimelineDefaultTextSize: number;
|
2920 | TimelineDefaultCellColor: string;
|
2921 | TimelineDefaultCellColorOut: string;
|
2922 | TimelineDefaultTimeRangeShow: boolean;
|
2923 | DefaultTimeRangeColor: string;
|
2924 | DefaultLabelColor: string;
|
2925 | DefaultScaleColor: string;
|
2926 | DefaultSliderColor: string;
|
2927 | DefaultGranularity: GranularityType;
|
2928 | DefaultFirstMonth: number;
|
2929 | DefaultFirstDay: number;
|
2930 | DefaultFirstWeekDay: number;
|
2931 | }
|
2932 | interface TimelineSelectors {
|
2933 | TimelineVisual: ClassAndSelector;
|
2934 | SelectionRangeContainer: ClassAndSelector;
|
2935 | textLabel: ClassAndSelector;
|
2936 | LowerTextCell: ClassAndSelector;
|
2937 | UpperTextCell: ClassAndSelector;
|
2938 | UpperTextArea: ClassAndSelector;
|
2939 | LowerTextArea: ClassAndSelector;
|
2940 | RangeTextArea: ClassAndSelector;
|
2941 | CellsArea: ClassAndSelector;
|
2942 | CursorsArea: ClassAndSelector;
|
2943 | MainArea: ClassAndSelector;
|
2944 | SelectionCursor: ClassAndSelector;
|
2945 | Cell: ClassAndSelector;
|
2946 | CellRect: ClassAndSelector;
|
2947 | VertLine: ClassAndSelector;
|
2948 | TimelineSlicer: ClassAndSelector;
|
2949 | PeriodSlicerGranularities: ClassAndSelector;
|
2950 | PeriodSlicerSelection: ClassAndSelector;
|
2951 | PeriodSlicerSelectionRect: ClassAndSelector;
|
2952 | PeriodSlicerRect: ClassAndSelector;
|
2953 | }
|
2954 | interface TimelineLabel {
|
2955 | title: string;
|
2956 | text: string;
|
2957 | id: number;
|
2958 | }
|
2959 | interface ExtendedLabel {
|
2960 | yearLabels?: TimelineLabel[];
|
2961 | quarterLabels?: TimelineLabel[];
|
2962 | monthLabels?: TimelineLabel[];
|
2963 | weekLabels?: TimelineLabel[];
|
2964 | dayLabels?: TimelineLabel[];
|
2965 | }
|
2966 | interface DatePeriod {
|
2967 | identifierArray: (string | number)[];
|
2968 | startDate: Date;
|
2969 | endDate: Date;
|
2970 | year: number;
|
2971 | week: number[];
|
2972 | fraction: number;
|
2973 | index: number;
|
2974 | }
|
2975 | interface Granularity {
|
2976 | getType(): GranularityType;
|
2977 | splitDate(date: Date): (string | number)[];
|
2978 | getDatePeriods(): DatePeriod[];
|
2979 | resetDatePeriods(): void;
|
2980 | getExtendedLabel(): ExtendedLabel;
|
2981 | setExtendedLabel(extendedLabel: ExtendedLabel): void;
|
2982 | createLabels(granularity: Granularity): TimelineLabel[];
|
2983 | sameLabel(firstDatePeriod: DatePeriod, secondDatePeriod: DatePeriod): boolean;
|
2984 | generateLabel(datePeriod: DatePeriod): TimelineLabel;
|
2985 | addDate(date: Date, identifierArray: (string | number)[]): any;
|
2986 | setNewEndDate(date: Date): void;
|
2987 | splitPeriod(index: number, newFraction: number, newDate: Date): void;
|
2988 | }
|
2989 | interface TimelineCursorOverElement {
|
2990 | index: number;
|
2991 | datapoint: TimelineDatapoint;
|
2992 | }
|
2993 | class TimelineGranularity {
|
2994 | private datePeriods;
|
2995 | private extendedLabel;
|
2996 | |
2997 |
|
2998 |
|
2999 | shortMonthName(date: Date): string;
|
3000 | resetDatePeriods(): void;
|
3001 | getDatePeriods(): DatePeriod[];
|
3002 | getExtendedLabel(): ExtendedLabel;
|
3003 | setExtendedLabel(extendedLabel: ExtendedLabel): void;
|
3004 | createLabels(granularity: Granularity): TimelineLabel[];
|
3005 | |
3006 |
|
3007 |
|
3008 |
|
3009 |
|
3010 |
|
3011 |
|
3012 | addDate(date: Date, identifierArray: (string | number)[]): void;
|
3013 | setNewEndDate(date: Date): void;
|
3014 | |
3015 |
|
3016 |
|
3017 |
|
3018 |
|
3019 |
|
3020 |
|
3021 | splitPeriod(index: number, newFraction: number, newDate: Date): void;
|
3022 | private previousMonth(month);
|
3023 | private nextMonth(month);
|
3024 | private countWeeks(startDate, endDate);
|
3025 | determineWeek(date: Date): number[];
|
3026 | private inPreviousYear(date);
|
3027 | determineYear(date: Date): number;
|
3028 | }
|
3029 | class DayGranularity extends TimelineGranularity implements Granularity {
|
3030 | getType(): GranularityType;
|
3031 | splitDate(date: Date): (string | number)[];
|
3032 | sameLabel(firstDatePeriod: DatePeriod, secondDatePeriod: DatePeriod): boolean;
|
3033 | generateLabel(datePeriod: DatePeriod): TimelineLabel;
|
3034 | }
|
3035 | class MonthGranularity extends TimelineGranularity implements Granularity {
|
3036 | getType(): GranularityType;
|
3037 | splitDate(date: Date): (string | number)[];
|
3038 | sameLabel(firstDatePeriod: DatePeriod, secondDatePeriod: DatePeriod): boolean;
|
3039 | generateLabel(datePeriod: DatePeriod): TimelineLabel;
|
3040 | }
|
3041 | class WeekGranularity extends TimelineGranularity implements Granularity {
|
3042 | getType(): GranularityType;
|
3043 | splitDate(date: Date): (string | number)[];
|
3044 | sameLabel(firstDatePeriod: DatePeriod, secondDatePeriod: DatePeriod): boolean;
|
3045 | generateLabel(datePeriod: DatePeriod): TimelineLabel;
|
3046 | }
|
3047 | class QuarterGranularity extends TimelineGranularity implements Granularity {
|
3048 | |
3049 |
|
3050 |
|
3051 |
|
3052 | private quarterText(date);
|
3053 | getType(): GranularityType;
|
3054 | splitDate(date: Date): (string | number)[];
|
3055 | sameLabel(firstDatePeriod: DatePeriod, secondDatePeriod: DatePeriod): boolean;
|
3056 | generateLabel(datePeriod: DatePeriod): TimelineLabel;
|
3057 | }
|
3058 | class YearGranularity extends TimelineGranularity implements Granularity {
|
3059 | getType(): GranularityType;
|
3060 | splitDate(date: Date): (string | number)[];
|
3061 | sameLabel(firstDatePeriod: DatePeriod, secondDatePeriod: DatePeriod): boolean;
|
3062 | generateLabel(datePeriod: DatePeriod): TimelineLabel;
|
3063 | }
|
3064 | class TimelineGranularityData {
|
3065 | private dates;
|
3066 | private granularities;
|
3067 | private endingDate;
|
3068 | |
3069 |
|
3070 |
|
3071 |
|
3072 | static previousDay(date: Date): Date;
|
3073 | |
3074 |
|
3075 |
|
3076 |
|
3077 | static nextDay(date: Date): Date;
|
3078 | |
3079 |
|
3080 |
|
3081 | private setDatesRange(startDate, endDate);
|
3082 | constructor(startDate: Date, endDate: Date);
|
3083 | /**
|
3084 | * Adds a new granularity to the array of granularities.
|
3085 | * Resets the new granularity, adds all dates to it, and then edits the last date period with the ending date.
|
3086 | * @param granularity The new granularity to be added
|
3087 | */
|
3088 | addGranularity(granularity: Granularity): void;
|
3089 | /**
|
3090 | * Returns a specific granularity from the array of granularities
|
3091 | * @param index The index of the requested granularity
|
3092 | */
|
3093 | getGranularity(index: number): Granularity;
|
3094 | createGranularities(): void;
|
3095 | createLabels(): void;
|
3096 | }
|
3097 | class Utils {
|
3098 | |
3099 |
|
3100 |
|
3101 |
|
3102 | static getStartSelectionDate(timelineData: TimelineData): Date;
|
3103 | |
3104 |
|
3105 |
|
3106 |
|
3107 | static getEndSelectionDate(timelineData: TimelineData): Date;
|
3108 | |
3109 |
|
3110 |
|
3111 |
|
3112 | static getEndSelectionPeriod(timelineData: TimelineData): DatePeriod;
|
3113 | |
3114 |
|
3115 |
|
3116 |
|
3117 |
|
3118 |
|
3119 |
|
3120 | static getCellColor(d: TimelineDatapoint, timelineData: TimelineData, cellFormat: CellFormat): string;
|
3121 | |
3122 |
|
3123 |
|
3124 |
|
3125 | static getGranularityType(granularityName: string): GranularityType;
|
3126 | |
3127 |
|
3128 |
|
3129 |
|
3130 | static getGranularityName(granularity: GranularityType): string;
|
3131 | |
3132 |
|
3133 |
|
3134 |
|
3135 |
|
3136 |
|
3137 |
|
3138 | static separateSelection(timelineData: TimelineData, startDate: Date, endDate: Date): void;
|
3139 | |
3140 |
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 |
|
3146 |
|
3147 |
|
3148 | static getDateRatio(datePeriod: DatePeriod, date: Date, fromStart: boolean): number;
|
3149 | |
3150 |
|
3151 |
|
3152 | static timeRangeText(timelineData: TimelineData): string;
|
3153 | static dateRangeText(datePeriod: DatePeriod): string;
|
3154 | |
3155 |
|
3156 |
|
3157 |
|
3158 |
|
3159 |
|
3160 | static unseparateSelection(datePeriods: DatePeriod[]): boolean;
|
3161 | }
|
3162 | interface TimelineProperties {
|
3163 | leftMargin: number;
|
3164 | rightMargin: number;
|
3165 | topMargin: number;
|
3166 | bottomMargin: number;
|
3167 | textYPosition: number;
|
3168 | startXpoint: number;
|
3169 | startYpoint: number;
|
3170 | elementWidth: number;
|
3171 | element: any;
|
3172 | cellWidth: number;
|
3173 | cellHeight: number;
|
3174 | cellsYPosition: number;
|
3175 | }
|
3176 | interface TimelineFormat {
|
3177 | cellFormat?: CellFormat;
|
3178 | rangeTextFormat?: LabelFormat;
|
3179 | labelFormat?: LabelFormat;
|
3180 | calendarFormat?: CalendarFormat;
|
3181 | granularityFormat?: GranularityFormat;
|
3182 | }
|
3183 | interface LabelFormat {
|
3184 | showProperty: boolean;
|
3185 | sizeProperty: number;
|
3186 | colorProperty: string;
|
3187 | }
|
3188 | interface CalendarFormat {
|
3189 | firstMonthProperty: number;
|
3190 | firstDayProperty: number;
|
3191 | weekDayProperty: number;
|
3192 | }
|
3193 | interface CellFormat {
|
3194 | colorInProperty: string;
|
3195 | colorOutProperty: string;
|
3196 | }
|
3197 | interface GranularityFormat {
|
3198 | scaleColorProperty: string;
|
3199 | sliderColorProperty: string;
|
3200 | }
|
3201 | interface TimelineData {
|
3202 | dragging?: boolean;
|
3203 | categorySourceName?: string;
|
3204 | columnIdentity?: powerbi.data.SQColumnRefExpr;
|
3205 | timelineDatapoints?: TimelineDatapoint[];
|
3206 | elementsCount?: number;
|
3207 | selectionStartIndex?: number;
|
3208 | selectionEndIndex?: number;
|
3209 | cursorDataPoints?: CursorDatapoint[];
|
3210 | currentGranularity?: Granularity;
|
3211 | }
|
3212 | interface CursorDatapoint {
|
3213 | x: number;
|
3214 | cursorIndex: number;
|
3215 | selectionIndex: number;
|
3216 | }
|
3217 | interface TimelineDatapoint {
|
3218 | index: number;
|
3219 | datePeriod: DatePeriod;
|
3220 | }
|
3221 | interface DateDictionary {
|
3222 | [year: number]: Date;
|
3223 | }
|
3224 | class Calendar {
|
3225 | private firstDayOfWeek;
|
3226 | private firstMonthOfYear;
|
3227 | private firstDayOfYear;
|
3228 | private dateOfFirstWeek;
|
3229 | private quarterFirstMonths;
|
3230 | getFirstDayOfWeek(): number;
|
3231 | getFirstMonthOfYear(): number;
|
3232 | getFirstDayOfYear(): number;
|
3233 | getQuarterStartDate(year: number, quarterIndex: number): Date;
|
3234 | isChanged(calendarFormat: CalendarFormat): boolean;
|
3235 | constructor(calendarFormat: CalendarFormat);
|
3236 | private calculateDateOfFirstWeek(year);
|
3237 | getDateOfFirstWeek(year: number): Date;
|
3238 | }
|
3239 | class Timeline implements IVisual {
|
3240 | private requiresNoUpdate;
|
3241 | private datasetsChangedState;
|
3242 | private timelineProperties;
|
3243 | private timelineFormat;
|
3244 | private timelineData;
|
3245 | private timelineGranularityData;
|
3246 | private hostServices;
|
3247 | private svg;
|
3248 | private timelineDiv;
|
3249 | private body;
|
3250 | private rangeText;
|
3251 | private mainGroupElement;
|
3252 | private yearLabelsElement;
|
3253 | private quarterLabelsElement;
|
3254 | private monthLabelsElement;
|
3255 | private weekLabelsElement;
|
3256 | private dayLabelsElement;
|
3257 | private cellsElement;
|
3258 | private cursorGroupElement;
|
3259 | private selectorContainer;
|
3260 | private options;
|
3261 | private periodSlicerRect;
|
3262 | private selectedText;
|
3263 | private vertLine;
|
3264 | private horizLine;
|
3265 | private textLabels;
|
3266 | private selector;
|
3267 | private initialized;
|
3268 | private selectionManager;
|
3269 | private clearCatcher;
|
3270 | private dataView;
|
3271 | private valueType;
|
3272 | private values;
|
3273 | private svgWidth;
|
3274 | private newGranularity;
|
3275 | static calendar: Calendar;
|
3276 | static capabilities: VisualCapabilities;
|
3277 | private timelineMargins;
|
3278 | private defaultTimelineProperties;
|
3279 | private timelineSelectors;
|
3280 | |
3281 |
|
3282 |
|
3283 |
|
3284 |
|
3285 |
|
3286 | changeGranularity(granularity: GranularityType, startDate: Date, endDate: Date): void;
|
3287 | init(options: VisualInitOptions): void;
|
3288 | private addWrappElements();
|
3289 | private clear();
|
3290 | private drawGranular(timelineProperties);
|
3291 | fillColorGranularity(granularityFormat: GranularityFormat): void;
|
3292 | redrawPeriod(granularity: GranularityType): void;
|
3293 | private static setMeasures(labelFormat, granularityType, datePeriodsCount, viewport, timelineProperties, timelineMargins);
|
3294 | private visualChangeOnly(options);
|
3295 | |
3296 |
|
3297 |
|
3298 | datasetsChanged(options: VisualUpdateOptions): boolean;
|
3299 | private unavailableType(dataViewCategorical);
|
3300 | private unavailableChildIdentityField(dataViewTree);
|
3301 | private createTimelineOptions(dataView);
|
3302 | prepareValues(values: any): any;
|
3303 | private createTimelineData();
|
3304 | update(options: VisualUpdateOptions): void;
|
3305 | selectPeriod(periodNameIndex: any): void;
|
3306 | private static isDataNotMatch(dataView);
|
3307 | static converter(timelineData: TimelineData, timelineProperties: TimelineProperties, defaultTimelineProperties: DefaultTimelineProperties, timelineGranularityData: TimelineGranularityData, dataView: DataView, initialized: boolean, granularityType: GranularityType, viewport: IViewport, timelineMargins: TimelineMargins): TimelineFormat;
|
3308 | private render(timelineData, timelineFormat, timelineProperties, options);
|
3309 | private renderLabels(labels, labelsElement, index, isLast);
|
3310 | private clearData();
|
3311 | private static updateCursors(timelineData, cellWidth);
|
3312 | private static fillTimelineFormat(objects, timelineProperties);
|
3313 | fillCells(cellFormat: CellFormat): void;
|
3314 | renderCells(timelineData: TimelineData, timelineFormat: TimelineFormat, timelineProperties: TimelineProperties, suppressAnimations: any): void;
|
3315 | dragstarted(): void;
|
3316 | dragged(currentCursor: CursorDatapoint): void;
|
3317 | |
3318 |
|
3319 |
|
3320 | findCursorOverElement(x: number): TimelineCursorOverElement;
|
3321 | dragended(): void;
|
3322 | private drag;
|
3323 | renderCursors(timelineData: TimelineData, timelineFormat: TimelineFormat, cellHeight: number, cellsYPosition: number): D3.UpdateSelection;
|
3324 | renderTimeRangeText(timelineData: TimelineData, timeRangeFormat: LabelFormat): void;
|
3325 | setSelection(timelineData: TimelineData): void;
|
3326 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
3327 | enumerateRangeHeader(enumeration: ObjectEnumerationBuilder, dataview: DataView): void;
|
3328 | enumerateCells(enumeration: ObjectEnumerationBuilder, dataview: DataView): void;
|
3329 | enumerateGranularity(enumeration: ObjectEnumerationBuilder, dataview: DataView): void;
|
3330 | enumerateLabels(enumeration: ObjectEnumerationBuilder, dataview: DataView): void;
|
3331 | enumerateCalendar(enumeration: ObjectEnumerationBuilder, dataview: DataView): void;
|
3332 | enumerateWeekDay(enumeration: ObjectEnumerationBuilder, dataview: DataView): void;
|
3333 | }
|
3334 | }
|
3335 |
|
3336 | declare module powerbi.visuals.samples {
|
3337 | interface StreamData {
|
3338 | series: StreamGraphSeries[];
|
3339 | legendData: LegendData;
|
3340 | valueFormatter: IValueFormatter;
|
3341 | categoryFormatter: IValueFormatter;
|
3342 | streamGraphSettings: StreamGraphSettings;
|
3343 | categoriesText: string[];
|
3344 | }
|
3345 | interface StreamDataPoint {
|
3346 | x: number;
|
3347 | y: number;
|
3348 | y0?: number;
|
3349 | text: string;
|
3350 | labelFontSize: string;
|
3351 | }
|
3352 | interface StreamGraphSeries extends SelectableDataPoint {
|
3353 | dataPoints: StreamDataPoint[];
|
3354 | tooltipInfo?: TooltipDataItem[];
|
3355 | highlight?: boolean;
|
3356 | }
|
3357 | interface StreamGraphSettings {
|
3358 | legendSettings: StreamGraphLegendSettings;
|
3359 | categoryAxisSettings: StreamGraphAxisSettings;
|
3360 | valueAxisSettings: StreamGraphAxisSettings;
|
3361 | dataLabelsSettings: VisualDataLabelsSettings;
|
3362 | }
|
3363 | interface StreamGraphLegendSettings {
|
3364 | show: boolean;
|
3365 | showTitle: boolean;
|
3366 | labelColor: string;
|
3367 | titleText: string;
|
3368 | fontSize: number;
|
3369 | }
|
3370 | interface StreamGraphAxisSettings {
|
3371 | show: boolean;
|
3372 | labelColor: string;
|
3373 | showAxisTitle: boolean;
|
3374 | }
|
3375 | interface StreamProperty {
|
3376 | [propertyName: string]: DataViewObjectPropertyIdentifier;
|
3377 | }
|
3378 | interface StreamGraphBehaviorOptions {
|
3379 | selection: D3.Selection;
|
3380 | clearCatcher: D3.Selection;
|
3381 | interactivityService: IInteractivityService;
|
3382 | }
|
3383 | class StreamGraph implements IVisual {
|
3384 | private static VisualClassName;
|
3385 | private static Properties;
|
3386 | private static Layer;
|
3387 | private static XAxisLabel;
|
3388 | private static YAxisLabel;
|
3389 | private static MaxNumberOfAxisXValues;
|
3390 | static capabilities: VisualCapabilities;
|
3391 | private margin;
|
3392 | private viewport;
|
3393 | private svg;
|
3394 | private dataPointsContainer;
|
3395 | private axisGraphicsContext;
|
3396 | private xAxis;
|
3397 | private yAxis;
|
3398 | private clearCatcher;
|
3399 | private interactivityService;
|
3400 | private behavior;
|
3401 | private colors;
|
3402 | private dataView;
|
3403 | private legend;
|
3404 | private data;
|
3405 | converter(dataView: DataView, colors: IDataColorPalette, interactivityService: IInteractivityService): StreamData;
|
3406 | private parseSettings(dataView);
|
3407 | init(options: VisualInitOptions): void;
|
3408 | update(options: VisualUpdateOptions): void;
|
3409 | private getStreamGraphLabelLayout(xScale, yScale);
|
3410 | private renderChart(series, duration);
|
3411 | private drawAxis(data, xScale, yScale);
|
3412 | private renderYAxisLabels();
|
3413 | private getYAxisTitleFromValues(values);
|
3414 | private renderXAxisLabels();
|
3415 | private renderLegend(streamGraphData);
|
3416 | private updateViewPort();
|
3417 | private setMaxTicks(axis, maxSize, maxValue?);
|
3418 | private getFittedTickLength(axis, maxSize, maxTicks);
|
3419 | private getFittedTickValues(axis, maxSize, maxTicks);
|
3420 | private measureTicks(ticks, measureTickFunction);
|
3421 | private getTicksByAxis(axis);
|
3422 | private getMeasureTickFunction(axis, ticks);
|
3423 | private getTextPropertiesFunction(text);
|
3424 | private getWiggle(dataView);
|
3425 | private enumerateValueAxisValues(enumeration);
|
3426 | private enumerateCategoryAxisValues(enumeration);
|
3427 | private enumerateLegend(enumeration);
|
3428 | private clearData();
|
3429 | onClearSelection(): void;
|
3430 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
3431 | }
|
3432 | }
|
3433 |
|
3434 | declare module powerbi.visuals.samples {
|
3435 | interface PulseChartConstructorOptions {
|
3436 | animator?: IGenericAnimator;
|
3437 | svg?: D3.Selection;
|
3438 | behavior?: IInteractiveBehavior;
|
3439 | }
|
3440 | interface PulseBehaviorOptions {
|
3441 | layerOptions?: any[];
|
3442 | clearCatcher: D3.Selection;
|
3443 | }
|
3444 | interface TooltipSettings {
|
3445 | dataPointColor: string;
|
3446 | marginTop: number;
|
3447 | timeHeight: number;
|
3448 | }
|
3449 | interface PulseChartChartDataLabelsSettings extends PointDataLabelsSettings {
|
3450 | labelDensity: string;
|
3451 | }
|
3452 | interface PulseChartSeries extends SelectableDataPoint {
|
3453 | name?: string;
|
3454 | displayName: string;
|
3455 | key: string;
|
3456 | lineIndex: number;
|
3457 | xCol: DataViewMetadataColumn;
|
3458 | yCol: DataViewMetadataColumn;
|
3459 | labelSettings: PulseChartChartDataLabelsSettings;
|
3460 | data: PulseChartDataPoint[];
|
3461 | color: string;
|
3462 | identity: SelectionId;
|
3463 | width: number;
|
3464 | xAxisProperties?: PulseChartXAxisProperties;
|
3465 | widthOfGap: number;
|
3466 | }
|
3467 | interface PulseChartTooltipData {
|
3468 | value: string;
|
3469 | title: string;
|
3470 | description: string;
|
3471 | offsetX?: number;
|
3472 | }
|
3473 | interface PulseChartAnimationPosition {
|
3474 | series: number;
|
3475 | index: number;
|
3476 | }
|
3477 | interface PulseChartPointXY {
|
3478 | x: number;
|
3479 | y: number;
|
3480 | }
|
3481 | interface PulseChartPrimitiveDataPoint extends TooltipEnabledDataPoint, SelectableDataPoint, LabelEnabledDataPoint {
|
3482 | categoryValue: any;
|
3483 | value: number;
|
3484 | categoryIndex: number;
|
3485 | seriesIndex: number;
|
3486 | highlight?: boolean;
|
3487 | key: string;
|
3488 | labelSettings: PulseChartChartDataLabelsSettings;
|
3489 | pointColor?: string;
|
3490 | }
|
3491 | interface PulseChartDataPoint extends PulseChartPrimitiveDataPoint, PulseChartPointXY {
|
3492 | groupIndex: number;
|
3493 | popupInfo?: PulseChartTooltipData;
|
3494 | eventSize: number;
|
3495 | runnerCounterValue: any;
|
3496 | runnerCounterFormatString: any;
|
3497 | }
|
3498 | interface PulseChartLegend extends DataViewObject {
|
3499 | show?: boolean;
|
3500 | showTitle?: boolean;
|
3501 | titleText?: string;
|
3502 | position?: LegendPosition;
|
3503 | }
|
3504 | interface PulseChartPopupSettings {
|
3505 | show: boolean;
|
3506 | alwaysOnTop: boolean;
|
3507 | width: number;
|
3508 | height: number;
|
3509 | color: string;
|
3510 | fontSize: number;
|
3511 | fontColor: string;
|
3512 | showTime: boolean;
|
3513 | showTitle: boolean;
|
3514 | timeColor: string;
|
3515 | timeFill: string;
|
3516 | }
|
3517 | interface PulseChartDotsSettings {
|
3518 | color: string;
|
3519 | size: number;
|
3520 | minSize: number;
|
3521 | maxSize: number;
|
3522 | transparency: number;
|
3523 | }
|
3524 | function createEnumTypeFromEnum(type: any): IEnumType;
|
3525 | enum PulseChartXAxisDateFormat {
|
3526 | DateOnly,
|
3527 | TimeOnly,
|
3528 | }
|
3529 | enum XAxisPosition {
|
3530 | Center,
|
3531 | Bottom,
|
3532 | }
|
3533 | enum RunnerCounterPosition {
|
3534 | TopLeft,
|
3535 | TopRight,
|
3536 | }
|
3537 | interface PulseChartGapsSettings {
|
3538 | show: boolean;
|
3539 | visibleGapsPercentage: number;
|
3540 | }
|
3541 | interface PulseChartSeriesSetting {
|
3542 | fill: string;
|
3543 | width: number;
|
3544 | }
|
3545 | interface PulseChartPlaybackSettings {
|
3546 | pauseDuration: number;
|
3547 | playSpeed: number;
|
3548 | autoplay: boolean;
|
3549 | autoplayPauseDuration: number;
|
3550 | color: string;
|
3551 | position: PulseChartAnimationPosition;
|
3552 | }
|
3553 | interface PulseChartRunnerCounterSettings {
|
3554 | show: boolean;
|
3555 | label: string;
|
3556 | position: RunnerCounterPosition;
|
3557 | fontSize: number;
|
3558 | fontColor: string;
|
3559 | }
|
3560 | interface PulseChartAxisSettings {
|
3561 | formatterOptions?: ValueFormatterOptions;
|
3562 | fontColor: string;
|
3563 | color: string;
|
3564 | show: boolean;
|
3565 | }
|
3566 | interface PulseChartXAxisSettings extends PulseChartAxisSettings {
|
3567 | position: XAxisPosition;
|
3568 | dateFormat?: PulseChartXAxisDateFormat;
|
3569 | backgroundColor: string;
|
3570 | }
|
3571 | interface PulseChartYAxisSettings extends PulseChartAxisSettings {
|
3572 | }
|
3573 | interface PulseChartSettings {
|
3574 | formatStringProperty: DataViewObjectPropertyIdentifier;
|
3575 | displayName?: string;
|
3576 | dots: PulseChartDotsSettings;
|
3577 | fillColor?: string;
|
3578 | precision: number;
|
3579 | legend?: PulseChartLegend;
|
3580 | colors?: IColorPalette;
|
3581 | series: PulseChartSeriesSetting;
|
3582 | popup: PulseChartPopupSettings;
|
3583 | gaps: PulseChartGapsSettings;
|
3584 | xAxis: PulseChartXAxisSettings;
|
3585 | yAxis: PulseChartYAxisSettings;
|
3586 | runnerCounter: PulseChartRunnerCounterSettings;
|
3587 | playback: PulseChartPlaybackSettings;
|
3588 | }
|
3589 | interface PulseChartAxesLabels {
|
3590 | x: string;
|
3591 | y: string;
|
3592 | y2?: string;
|
3593 | }
|
3594 | interface PulseChartData {
|
3595 | settings: PulseChartSettings;
|
3596 | columns: PulseChartDataRoles<DataViewCategoricalColumn>;
|
3597 | categoryMetadata: DataViewMetadataColumn;
|
3598 | hasHighlights: boolean;
|
3599 | series: PulseChartSeries[];
|
3600 | isScalar?: boolean;
|
3601 | dataLabelsSettings: PointDataLabelsSettings;
|
3602 | axesLabels: PulseChartAxesLabels;
|
3603 | hasDynamicSeries?: boolean;
|
3604 | defaultSeriesColor?: string;
|
3605 | categoryData?: PulseChartPrimitiveDataPoint[];
|
3606 | categories: any[];
|
3607 | legendData?: LegendData;
|
3608 | grouped: DataViewValueColumnGroup[];
|
3609 | xScale?: D3.Scale.TimeScale | D3.Scale.LinearScale;
|
3610 | commonYScale?: D3.Scale.LinearScale;
|
3611 | yScales?: D3.Scale.LinearScale[];
|
3612 | yAxis?: D3.Svg.Axis;
|
3613 | widthOfXAxisLabel: number;
|
3614 | widthOfTooltipValueLabel: number;
|
3615 | heightOfTooltipDescriptionTextLine: number;
|
3616 | runnerCounterHeight: number;
|
3617 | }
|
3618 | interface PulseChartProperty {
|
3619 | [propertyName: string]: DataViewObjectPropertyIdentifier;
|
3620 | }
|
3621 | interface PulseChartProperties {
|
3622 | [objectName: string]: PulseChartProperty;
|
3623 | }
|
3624 | interface PulseChartXAxisProperties {
|
3625 | values: (Date | number)[];
|
3626 | scale: D3.Scale.TimeScale;
|
3627 | axis: D3.Svg.Axis;
|
3628 | rotate: boolean;
|
3629 | }
|
3630 | interface PulseChartPoint {
|
3631 | x: number;
|
3632 | value: Date | number;
|
3633 | }
|
3634 | interface PulseChartDataRoles<T> {
|
3635 | Timestamp?: T;
|
3636 | Category?: T;
|
3637 | Value?: T;
|
3638 | EventTitle?: T;
|
3639 | EventDescription?: T;
|
3640 | EventSize?: T;
|
3641 | RunnerCounter?: T;
|
3642 | }
|
3643 | interface PulseChartElementDimensions {
|
3644 | x: number;
|
3645 | y: number;
|
3646 | width: number;
|
3647 | height: number;
|
3648 | }
|
3649 | class PulseChart implements IVisual {
|
3650 | static RoleDisplayNames: PulseChartDataRoles<string>;
|
3651 | static RoleNames: PulseChartDataRoles<string>;
|
3652 | static capabilities: VisualCapabilities;
|
3653 | private static Properties;
|
3654 | static getProperties(capabilities: VisualCapabilities): any;
|
3655 | private static DefaultMargin;
|
3656 | private static DefaultViewport;
|
3657 | private static PlaybackButtonsHeight;
|
3658 | private static PopupMinHeight;
|
3659 | private static PopupMinWidth;
|
3660 | private static PopupMaxHeight;
|
3661 | private static PopupMaxWidth;
|
3662 | private static MaxWidthOfYAxis;
|
3663 | private static PopupTextPadding;
|
3664 | private static XAxisTickSpace;
|
3665 | private static XAxisTickHeight;
|
3666 | private static MinimumTicksToRotate;
|
3667 | private static AxisTickRotateAngle;
|
3668 | private static GetPopupValueTextProperties(text?, fontSizeValue?);
|
3669 | private static GetPopupTitleTextProperties(text?, fontSizeValue?);
|
3670 | private static GetPopupDescriptionTextProperties(text?, fontSizeValue?);
|
3671 | static GetRunnerCounterTextProperties(text?: string, fontSizeValue?: number): TextProperties;
|
3672 | static ConvertTextPropertiesToStyle(textProperties: TextProperties): Object;
|
3673 | private static GetDateTimeFormatString(dateFormatType, dateFormat);
|
3674 | private static GetFullWidthOfDateFormat(dateFormat, textProperties);
|
3675 | static AddOnTouchClick(selection: D3.Selection, callback: (data: any, index: number) => any): D3.Selection;
|
3676 | private static DefaultSettings;
|
3677 | private static DefaultTooltipSettings;
|
3678 | private static MaxGapCount;
|
3679 | private static MinGapWidth;
|
3680 | private static Chart;
|
3681 | private static Line;
|
3682 | private static LineContainer;
|
3683 | private static LineNode;
|
3684 | private static XAxisNode;
|
3685 | private static Dot;
|
3686 | private static DotsContainer;
|
3687 | private static Tooltip;
|
3688 | private static TooltipRect;
|
3689 | private static TooltipTriangle;
|
3690 | private static Gaps;
|
3691 | private static Gap;
|
3692 | private static GapNode;
|
3693 | private static TooltipLine;
|
3694 | private static TooltipTime;
|
3695 | private static TooltipTimeRect;
|
3696 | private static TooltipTitle;
|
3697 | private static TooltipDescription;
|
3698 | private static TooltipContainer;
|
3699 | private static AnimationDot;
|
3700 | private static getCategoricalColumnOfRole(dataView, roleName);
|
3701 | static converter(dataView: DataView, colors: IDataColorPalette, interactivityService?: IInteractivityService): PulseChartData;
|
3702 | private static createAxisY(commonYScale, height, formatterOptions, show?);
|
3703 | private static createAxisX(isScalar, series, originalScale, formatterOptions, dateFormat, position, widthOfXAxisLabel);
|
3704 | private static getXAxisScales(series, isScalar, originalScale);
|
3705 | private static getXAxisValuesToDisplay(scale, rotate, isScalar, dateFormat, widthOfXAxisLabel);
|
3706 | private static getGroupIndex(index, grouped);
|
3707 | private static getGapWidths(values);
|
3708 | private static createScale(isScalar, domain, minX, maxX);
|
3709 | data: PulseChartData;
|
3710 | margin: IMargin;
|
3711 | viewport: IViewport;
|
3712 | size: IViewport;
|
3713 | handleSelectionTimeout: number;
|
3714 | host: IVisualHostServices;
|
3715 | private svg;
|
3716 | private chart;
|
3717 | private dots;
|
3718 | private yAxis;
|
3719 | private gaps;
|
3720 | private animationDot;
|
3721 | private lineX;
|
3722 | private selectionManager;
|
3723 | private animator;
|
3724 | private animationHandler;
|
3725 | private colors;
|
3726 | private rootSelection;
|
3727 | private animationSelection;
|
3728 | private lastSelectedPoint;
|
3729 | runnerCounterPlaybackButtonsHeight: number;
|
3730 | popupHeight: number;
|
3731 | constructor(options?: PulseChartConstructorOptions);
|
3732 | init(options: VisualInitOptions): void;
|
3733 | update(options: VisualUpdateOptions): void;
|
3734 | private updateData(data);
|
3735 | private getDataArrayToCompare(data);
|
3736 | private validateData(data);
|
3737 | private getChartWidth();
|
3738 | private getChartHeight(xAxisRotated);
|
3739 | private updateElements();
|
3740 | calculateXAxisProperties(width: number): void;
|
3741 | calculateYAxisProperties(height: number): void;
|
3742 | private getYAxisScales(height);
|
3743 | autoplayPauseDuration: number;
|
3744 | isAutoPlay: boolean;
|
3745 | render(suppressAnimations: boolean): void;
|
3746 | private renderAxes(data, duration);
|
3747 | private renderXAxis(data, duration);
|
3748 | private renderYAxis(data, duration);
|
3749 | renderChart(): void;
|
3750 | private drawLinesStatic(limit, isAnimated);
|
3751 | private drawLinesStaticBeforeAnimation(limit);
|
3752 | private moveAnimationDot(d);
|
3753 | playAnimation(delay?: number): void;
|
3754 | pauseAnimation(): void;
|
3755 | stopAnimation(): void;
|
3756 | findNextPoint(position: PulseChartAnimationPosition): PulseChartAnimationPosition;
|
3757 | findPrevPoint(position: PulseChartAnimationPosition): PulseChartAnimationPosition;
|
3758 | isAnimationSeriesAndIndexLast(position: PulseChartAnimationPosition): boolean;
|
3759 | isAnimationSeriesLast(position: PulseChartAnimationPosition): boolean;
|
3760 | isAnimationIndexLast(position: PulseChartAnimationPosition): boolean;
|
3761 | private drawLines(data);
|
3762 | private showAnimationDot();
|
3763 | private hideAnimationDot();
|
3764 | private getInterpolation(data, start);
|
3765 | clearSelection(): void;
|
3766 | private handleSelection(position);
|
3767 | private animationDuration;
|
3768 | private pauseDuration;
|
3769 | private dotOpacity;
|
3770 | private drawDots(data);
|
3771 | private renderGaps(data, duration);
|
3772 | private setSelection(selectionIds?);
|
3773 | private isPopupShow(d, selectionIds?);
|
3774 | private drawTooltips(data, selectionIds?);
|
3775 | private isHigherMiddle(value, groupIndex);
|
3776 | private static getObjectsFromDataView(dataView);
|
3777 | private static parseSettings(dataView, colors, columns);
|
3778 | private static getPopupSettings(objects, colors);
|
3779 | private static getDotsSettings(objects, colors);
|
3780 | private static getSeriesSettings(objects, colors);
|
3781 | private static getGapsSettings(objects);
|
3782 | private static getAxisXSettings(objects, colors);
|
3783 | private static getAxisYSettings(objects, colors);
|
3784 | private static getPlaybackSettings(objects, colors);
|
3785 | private static getRunnerCounterSettings(objects, colors, columns);
|
3786 | private clearAll(hide);
|
3787 | clearChart(): void;
|
3788 | clearRedundant(position: PulseChartAnimationPosition): void;
|
3789 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstanceEnumeration;
|
3790 | private getSettings(name);
|
3791 | private readGeneralInstance(enumeration);
|
3792 | private readPopupInstance(enumeration);
|
3793 | private readDotsInstance(enumeration);
|
3794 | private xAxisInstance(enumeration);
|
3795 | private yAxisInstance(enumeration);
|
3796 | private readSeriesInstance(enumeration);
|
3797 | private readGapsInstance(enumeration);
|
3798 | private readPlaybackInstance(enumeration);
|
3799 | private readRunnerCounterInstance(enumeration);
|
3800 | destroy(): void;
|
3801 | }
|
3802 | class PulseAnimator {
|
3803 | private chart;
|
3804 | private svg;
|
3805 | private animationPlay;
|
3806 | private animationPause;
|
3807 | private animationReset;
|
3808 | private animationToEnd;
|
3809 | private animationPrev;
|
3810 | private animationNext;
|
3811 | private runnerCounter;
|
3812 | private runnerCounterText;
|
3813 | private static AnimationPlay;
|
3814 | private static AnimationPause;
|
3815 | private static AnimationReset;
|
3816 | private static AnimationToEnd;
|
3817 | private static AnimationPrev;
|
3818 | private static AnimationNext;
|
3819 | private static RunnerCounter;
|
3820 | private animatorState;
|
3821 | static AnimationMinPosition: PulseChartAnimationPosition;
|
3822 | private static DimmedOpacity;
|
3823 | private static DefaultOpacity;
|
3824 | private static DefaultControlsColor;
|
3825 | private container;
|
3826 | animationPlayingIndex: number;
|
3827 | private runnerCounterValue;
|
3828 | private runnerCounterTopLeftPosition;
|
3829 | private runnerCounterPosition;
|
3830 | private maxTextWidthOfRunnerCounterValue;
|
3831 | private color;
|
3832 | private isAutoPlayed;
|
3833 | isAnimated: boolean;
|
3834 | isPlaying: boolean;
|
3835 | isPaused: boolean;
|
3836 | isStopped: boolean;
|
3837 | constructor(chart: PulseChart, svg: D3.Selection);
|
3838 | private setDefaultValues();
|
3839 | render(): void;
|
3840 | setControlsColor(color: string): void;
|
3841 | private renderControls();
|
3842 | private static setControlVisiblity(element, isVisible, isDisabled?);
|
3843 | private disableControls();
|
3844 | show(): void;
|
3845 | setRunnerCounterValue(index?: number): void;
|
3846 | private drawCounterValue();
|
3847 | play(delay?: number, renderDuringPlaying?: boolean): void;
|
3848 | playNext(): void;
|
3849 | pause(): void;
|
3850 | reset(): void;
|
3851 | private next();
|
3852 | private prev();
|
3853 | toEnd(): void;
|
3854 | stop(): void;
|
3855 | private positionValue;
|
3856 | position: PulseChartAnimationPosition;
|
3857 | flooredPosition: PulseChartAnimationPosition;
|
3858 | private isPositionWasSaved;
|
3859 | private autoPlayPosition;
|
3860 | savedPosition: PulseChartAnimationPosition;
|
3861 | clear(): void;
|
3862 | clearTimeouts(): void;
|
3863 | }
|
3864 | module PulseChartDataLabelUtils {
|
3865 | function getDefaultPulseChartLabelSettings(): PulseChartChartDataLabelsSettings;
|
3866 | }
|
3867 | module PulseChartAxisPropertiesHelper {
|
3868 | function getCategoryAxisProperties(dataViewMetadata: DataViewMetadata, axisTitleOnByDefault?: boolean): DataViewObject;
|
3869 | function getValueAxisProperties(dataViewMetadata: DataViewMetadata, axisTitleOnByDefault?: boolean): DataViewObject;
|
3870 | }
|
3871 | }
|
3872 |
|
3873 | declare module powerbi.visuals.samples {
|
3874 | interface LineDotPoint {
|
3875 | time: number | Date;
|
3876 | value: number;
|
3877 | dot: number;
|
3878 | sum: number;
|
3879 | selector: SelectionId;
|
3880 | }
|
3881 | interface Legend {
|
3882 | text: string;
|
3883 | transform?: string;
|
3884 | dx?: string;
|
3885 | dy?: string;
|
3886 | }
|
3887 | interface LineDotChartViewModel {
|
3888 | points: LineDotPoint[];
|
3889 | settings: LineDotChartSettings;
|
3890 | xAxis: IAxisProperties;
|
3891 | yAxis: IAxisProperties;
|
3892 | yAxis2: IAxisProperties;
|
3893 | legends: Legend[];
|
3894 | }
|
3895 | interface LineDotChartSettings {
|
3896 | lineFill: string;
|
3897 | lineThickness: number;
|
3898 | dotFill: string;
|
3899 | dotSizeMin: number;
|
3900 | dotSizeMax: number;
|
3901 | counterTitle: string;
|
3902 | xAxisTitle: string;
|
3903 | yAxisTitle: string;
|
3904 | duration: number;
|
3905 | isanimated: boolean;
|
3906 | isstopped: boolean;
|
3907 | }
|
3908 | class LineDotChart implements IVisual {
|
3909 | private selectionManager;
|
3910 | private hostServices;
|
3911 | private isDateTime;
|
3912 | private static DefaultSettings;
|
3913 | |
3914 |
|
3915 |
|
3916 |
|
3917 | static capabilities: VisualCapabilities;
|
3918 | private static Identity;
|
3919 | private static Axes;
|
3920 | private static Axis;
|
3921 | private static Legends;
|
3922 | private static Legend;
|
3923 | private static Values;
|
3924 | private static Properties;
|
3925 | private model;
|
3926 | private root;
|
3927 | private main;
|
3928 | private axes;
|
3929 | private axisX;
|
3930 | private axisY;
|
3931 | private axisY2;
|
3932 | private legends;
|
3933 | private line;
|
3934 | private colors;
|
3935 | private margin;
|
3936 | private LegendSize;
|
3937 | private AxisSize;
|
3938 | init(options: VisualInitOptions): void;
|
3939 | update(options: VisualUpdateOptions): void;
|
3940 | destroy(): void;
|
3941 | setIsStopped(isstopped: Boolean): void;
|
3942 | enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[];
|
3943 | private selectDot(dotelement, selector);
|
3944 | private clearSelection();
|
3945 | private converter(dataView, viewport);
|
3946 | private parseSettings(dataView);
|
3947 | private generateAxisLabels(viewport, settings);
|
3948 | private resize(viewport);
|
3949 | private draw(model);
|
3950 | private pointDelay(points, num, animation_duration);
|
3951 | private showDataPoint(data, index);
|
3952 | private hideDataPoint(data, index);
|
3953 | private addTooltip(model, element);
|
3954 | private renderLegends(model);
|
3955 | }
|
3956 | }
|
3957 |
|
3958 | declare module powerbi.visuals.samples {
|
3959 | interface SunburstSlice {
|
3960 | children?: SunburstSlice[];
|
3961 | value?: any;
|
3962 | color?: string;
|
3963 | name?: string;
|
3964 | parent?: SunburstSlice;
|
3965 | selector: SelectionId;
|
3966 | total: number;
|
3967 | tooltipInfo?: TooltipDataItem[];
|
3968 | }
|
3969 | interface SunburstViewModel {
|
3970 | root: SunburstSlice;
|
3971 | }
|
3972 | var sunburstRoleNames: {
|
3973 | nodes: string;
|
3974 | values: string;
|
3975 | };
|
3976 | class Sunburst implements IVisual {
|
3977 | private static minOpacity;
|
3978 | private svg;
|
3979 | private g;
|
3980 | private arc;
|
3981 | private total;
|
3982 | private viewport;
|
3983 | private colors;
|
3984 | private selectionManager;
|
3985 | private static roleNames;
|
3986 | static capabilities: VisualCapabilities;
|
3987 | init(options: VisualInitOptions): void;
|
3988 | private static setAllUnhide(selection);
|
3989 | update(options: VisualUpdateOptions): void;
|
3990 | private updateInternal(dataRootNode);
|
3991 | private static getTreePath(node);
|
3992 | private onResize();
|
3993 | private highlightPath(d, sunBurst, setUnhide);
|
3994 | private renderTooltip(selection);
|
3995 | private static getTooltipData(displayName, value);
|
3996 | private covertTreeNodeToSunBurstNode(originParentNode, sunburstParentNode, colors, pathIdentity, color);
|
3997 | converter(dataView: DataView, colors: IDataColorPalette): SunburstSlice;
|
3998 | }
|
3999 | }
|
4000 |
|
4001 | declare module powerbi.visuals.plugins {
|
4002 | let sunburstCustom: IVisualPlugin;
|
4003 | let asterPlot: IVisualPlugin;
|
4004 | var tornadoChart: IVisualPlugin;
|
4005 | var sankeyDiagram: IVisualPlugin;
|
4006 | let mekkoChart: IVisualPlugin;
|
4007 | var bulletChart: IVisualPlugin;
|
4008 | var wordCloud: IVisualPlugin;
|
4009 | var chicletSlicer: IVisualPlugin;
|
4010 | var chordChart: IVisualPlugin;
|
4011 | var enhancedScatterChart: IVisualPlugin;
|
4012 | var radarChart: IVisualPlugin;
|
4013 | var dotPlot: IVisualPlugin;
|
4014 | var histogram: IVisualPlugin;
|
4015 | var timeline: IVisualPlugin;
|
4016 | var forceGraph: IVisualPlugin;
|
4017 | let gantt: IVisualPlugin;
|
4018 | let streamGraph: IVisualPlugin;
|
4019 | let pulseChart: IVisualPlugin;
|
4020 | var lineDotChart: IVisualPlugin;
|
4021 | }
|