UNPKG

3.16 kBTypeScriptView Raw
1import { EventEmitter } from '@angular/core';
2export declare class CalendarHeatmap {
3 element: any;
4 data: Array<object>;
5 color: string;
6 overview: string;
7 handler: EventEmitter<object>;
8 private gutter;
9 private item_gutter;
10 private width;
11 private height;
12 private item_size;
13 private label_padding;
14 private max_block_height;
15 private transition_duration;
16 private in_transition;
17 private tooltip_width;
18 private tooltip_padding;
19 private history;
20 private selected;
21 private svg;
22 private items;
23 private labels;
24 private buttons;
25 private tooltip;
26 /**
27 * Check if data is available
28 */
29 ngOnChanges(): void;
30 /**
31 * Get hold of the root element and append our svg
32 */
33 ngAfterViewInit(): void;
34 /**
35 * Utility function to get number of complete weeks in a year
36 */
37 getNumberOfWeeks(): number;
38 /**
39 * Utility funciton to calculate chart dimensions
40 */
41 calculateDimensions(): void;
42 /**
43 * Recalculate dimensions on window resize events
44 */
45 onResize(event: any): void;
46 /**
47 * Helper function to check for data summary
48 */
49 updateDataSummary(): void;
50 /**
51 * Draw the chart based on the current overview type
52 */
53 drawChart(): void;
54 /**
55 * Draw global overview (multiple years)
56 */
57 drawGlobalOverview(): void;
58 /**
59 * Draw year overview
60 */
61 drawYearOverview(): void;
62 /**
63 * Draw month overview
64 */
65 drawMonthOverview(): void;
66 /**
67 * Draw week overview
68 */
69 drawWeekOverview(): void;
70 /**
71 * Draw day overview
72 */
73 drawDayOverview(): void;
74 /**
75 * Helper function to calculate item position on the x-axis
76 * @param d object
77 */
78 calcItemX(d: any, start_of_year: any): number;
79 /**
80 * Helper function to calculate item position on the y-axis
81 * @param d object
82 */
83 calcItemY(d: any): number;
84 /**
85 * Helper function to calculate item size
86 * @param d object
87 * @param max number
88 */
89 calcItemSize(d: any, max: number): number;
90 /**
91 * Draw the button for navigation purposes
92 */
93 drawButton(): void;
94 /**
95 * Transition and remove items and labels related to global overview
96 */
97 removeGlobalOverview(): void;
98 /**
99 * Transition and remove items and labels related to year overview
100 */
101 removeYearOverview(): void;
102 /**
103 * Transition and remove items and labels related to month overview
104 */
105 removeMonthOverview(): void;
106 /**
107 * Transition and remove items and labels related to week overview
108 */
109 removeWeekOverview(): void;
110 /**
111 * Transition and remove items and labels related to daily overview
112 */
113 removeDayOverview(): void;
114 /**
115 * Helper function to hide the tooltip
116 */
117 hideTooltip(): void;
118 /**
119 * Helper function to hide the back button
120 */
121 hideBackButton(): void;
122 /**
123 * Helper function to convert seconds to a human readable format
124 * @param seconds Integer
125 */
126 formatTime(seconds: number): string;
127}