igniteui-angular-extras 15.1.2 → 16.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/{esm2020 → esm2022}/lib/context-menu/chart-dialog/chart-dialog.component.mjs +4 -4
  2. package/{esm2020 → esm2022}/lib/context-menu/context-menu.component.mjs +4 -4
  3. package/{esm2020 → esm2022}/lib/context-menu/igx-context-menu.directive.mjs +4 -4
  4. package/{esm2020 → esm2022}/lib/directives/chart-integration/chart-integration.directive.mjs +4 -4
  5. package/{esm2020 → esm2022}/lib/directives/conditional-formatting/conditional-formatting.directive.mjs +4 -4
  6. package/esm2022/lib/igniteui-angular-extras.module.mjs +108 -0
  7. package/{esm2020 → esm2022}/lib/pipes/svg.pipe.mjs +4 -4
  8. package/{fesm2020 → fesm2022}/igniteui-angular-extras.mjs +72 -68
  9. package/fesm2022/igniteui-angular-extras.mjs.map +1 -0
  10. package/lib/directives/chart-integration/chart-integration.directive.d.ts +1 -1
  11. package/lib/directives/conditional-formatting/conditional-formatting.directive.d.ts +1 -1
  12. package/lib/igniteui-angular-extras.module.d.ts +2 -1
  13. package/package.json +5 -11
  14. package/esm2020/lib/igniteui-angular-extras.module.mjs +0 -104
  15. package/fesm2015/igniteui-angular-extras.mjs +0 -1784
  16. package/fesm2015/igniteui-angular-extras.mjs.map +0 -1
  17. package/fesm2020/igniteui-angular-extras.mjs.map +0 -1
  18. /package/{esm2020 → esm2022}/igniteui-angular-extras.mjs +0 -0
  19. /package/{esm2020 → esm2022}/images/charts.mjs +0 -0
  20. /package/{esm2020 → esm2022}/images/conditions.mjs +0 -0
  21. /package/{esm2020 → esm2022}/lib/directives/chart-integration/chart-types.mjs +0 -0
  22. /package/{esm2020 → esm2022}/lib/directives/chart-integration/initializers.mjs +0 -0
  23. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
@@ -1,1784 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Pipe, EventEmitter, ViewContainerRef, Component, ViewEncapsulation, ViewChild, Output, HostBinding, Directive, Input, Optional, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
- import * as i1$1 from 'igniteui-angular';
4
- import { CloseScrollStrategy, AutoPositionStrategy, HorizontalAlignment, VerticalAlignment, IgxToggleDirective, IgxTabsComponent, AbsoluteScrollStrategy, IgxButtonModule, IgxDividerModule, IgxGridModule, IgxTabsModule, IgxToggleModule, IgxIconModule } from 'igniteui-angular';
5
- import { IgxCategoryXAxisComponent, IgxNumericYAxisComponent, IgxScatterLineSeriesComponent, IgxNumericXAxisComponent, IgxBubbleSeriesComponent, IgxScatterSeriesComponent, IgxBarSeriesComponent, IgxCategoryYAxisComponent, IgxStackedBarSeriesComponent, IgxStacked100BarSeriesComponent, IgxStackedFragmentSeriesComponent, IgxSizeScaleComponent, IgxColumnSeriesComponent, IgxAreaSeriesComponent, IgxLineSeriesComponent, IgxStackedColumnSeriesComponent, IgxStackedAreaSeriesComponent, IgxStackedLineSeriesComponent, IgxStacked100ColumnSeriesComponent, IgxStacked100AreaSeriesComponent, IgxStacked100LineSeriesComponent, IgxPieChartComponent, IgxDataChartComponent, IgxItemLegendComponent, IgxLegendComponent, IgxDataChartCategoryModule, IgxDataChartCoreModule, IgxLegendModule, IgxDataChartInteractivityModule, IgxNumericXAxisModule, IgxNumericYAxisModule, IgxCategoryXAxisModule, IgxItemLegendModule, IgxPieChartModule, IgxDataChartStackedModule, IgxDataChartScatterModule, IgxBarSeriesModule, IgxCategoryChartModule } from 'igniteui-angular-charts';
6
- import { Subject } from 'rxjs';
7
- import { ResizeObserver } from '@juggle/resize-observer';
8
- import * as i2 from '@angular/common';
9
- import * as i1 from '@angular/platform-browser';
10
- import { takeUntil, merge, debounceTime, filter } from 'rxjs/operators';
11
- import 'igniteui-trial-watermark';
12
-
13
- // tslint:disable: max-line-length
14
- const Area100Stacked = `
15
- <svg id="Layer_1" data-name="Layer 1"
16
- xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
17
- <defs>
18
- <style>.cls-Area100Stacked-1{fill:#ab4191;}.cls-Area100Stacked-2{fill:#f05951;}.cls-Area100Stacked-2,.cls-Area100Stacked-3,.cls-Area100Stacked-4{fill-rule:evenodd;}.cls-Area100Stacked-3{fill:#fa8d3d;}.cls-Area100Stacked-4{fill:#0f6860;}</style>
19
- </defs>
20
- <rect class="cls-Area100Stacked-1" width="96" height="95.7"/>
21
- <polygon class="cls-Area100Stacked-2" points="0 11.1 3.78 11.99 11.33 25.27 20.15 13.04 30.53 15.31 43.12 26.54 50.13 28.07 65.78 24.5 72.08 16.84 82.15 17.61 88.45 11.99 91.91 9.57 96 6.13 96 95.7 0 95.7 0 11.1"/>
22
- <path class="cls-Area100Stacked-3" d="M0,54V95.7H96V18.37l-3.79,6.51-3.79,18-3.16,6.51-5.68,3.06-2.84,3.45s-3.42,6-3.48,6.12-7.58,4.6-7.58,4.6L60,67l-2.21.77-7.9-4.6-3.78,1.15-7.58-3.44L34.42,62.4l-3.79-1.15-4.1,3.44-3.48-.76L15.16,53.21,7.26,54,3.47,49Z"/>
23
- <polygon class="cls-Area100Stacked-4" points="0 78.75 4.72 77.11 7.87 78.2 15.42 76.56 19.52 80.39 26.44 83.67 36.2 83.67 45.33 85.31 50.05 78.75 58.23 84.22 68.3 85.86 87.82 90.23 96 83.12 96 95.7 0 95.7 0 78.75"/>
24
- </svg>
25
- `;
26
- const AreaGrouped = `
27
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
28
- <defs>
29
- <style>.cls-AreaGrouped-1{fill:#ab4191;}.cls-AreaGrouped-1,.cls-AreaGrouped-2,.cls-AreaGrouped-3,.cls-AreaGrouped-4{fill-rule:evenodd;}.cls-AreaGrouped-2{fill:#f05951;}.cls-AreaGrouped-3{fill:#fa8d3d;}.cls-AreaGrouped-4{fill:#0f6860;}</style>
30
- </defs>
31
- <g id="ChartNames">
32
- <polygon class="cls-AreaGrouped-1" points="96 69.18 96 13.76 80.22 37.03 64.11 42.35 48.34 63.44 32.56 72.38 16.45 70.78 0 86.13 0 96 96 96 96 69.18"/>
33
- <polygon class="cls-AreaGrouped-2" points="96 84.43 96 38.72 80.22 48.72 64.11 72.86 48.34 72.62 32.56 81.54 16.78 79.11 0 90.25 0 96 96 96 96 84.43"/>
34
- <path class="cls-AreaGrouped-3" d="M96,91V62.08L80.22,66.71l-16.11,15-15.77.9L32.56,88s-16.12-.84-16.11-.76S0,92.65,0,92.65V96H96Z"/>
35
- <polygon class="cls-AreaGrouped-4" points="96 93.77 96 77.49 80.22 81.31 64.11 91.54 48.34 93.13 32.56 94.09 0 95.37 0 96 96 96 96 93.77"/>
36
- </g>
37
- </svg>
38
- `;
39
- const AreaStacked = `
40
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
41
- <defs>
42
- <style>.cls-AreaStacked-1{fill:#ab4191;}.cls-AreaStacked-1,.cls-AreaStacked-2,.cls-AreaStacked-3,.cls-AreaStacked-4{fill-rule:evenodd;}.cls-AreaStacked-2{fill:#f05951;}.cls-AreaStacked-3{fill:#fa8d3d;}.cls-AreaStacked-4{fill:#0f6860;}</style>
43
- </defs>
44
- <g id="ChartNames">
45
- <path class="cls-AreaStacked-1" d="M0,17.24,3.73,4.7l7.56,19.2,4.09-.78,7.87,11.75,3.46,1.57,3.78-3.13,4.41,2,3.46-2.75,4.72,2.35L45.91,38s4-.26,4.09-.39,7.45,4.57,7.56,4.7a35.11,35.11,0,0,0,3.77-1.57h4.41L72,43.49,82.11,28.21,88.4,10.32,91.86,0,96,12.15V96H0Z"/>
46
- <path class="cls-AreaStacked-2" d="M0,53.29V96H96V16.85l-3.79,6.66L88.38,41.93l-3.16,6.66-5.68,3.13-2.85,3.53s-3.42,6.14-3.47,6.27-7.58,4.7-7.58,4.7L60,66.61l-2.21.79-7.9-4.71-3.79,1.18-7.58-3.53-4.1,1.57-3.79-1.18-4.11,3.53L23,63.48l-7.89-11-7.9.78L3.43,48.2Z"/>
47
- <polygon class="cls-AreaStacked-3" points="0.14 78.65 4.85 76.97 7.99 78.09 15.54 76.41 19.62 80.33 26.53 83.69 36.27 83.69 45.38 85.37 50.09 78.65 58.26 84.25 68.31 85.93 87.79 90.4 95.96 83.12 95.96 96 0.14 96 0.14 78.65"/>
48
- <polygon class="cls-AreaStacked-4" points="0.14 96 95.96 96 95.96 74.45 92.19 79.15 80.56 83.07 69.25 91.3 58.57 91.69 54.17 92.08 49.78 90.12 45.38 91.3 38.47 91.3 28.73 91.69 23.7 91.3 18.99 92.86 13.96 92.08 0.14 93.65 0.14 96"/>
49
- </g>
50
- </svg>
51
- `;
52
- const Bar100Stacked = `
53
- <svg id="Layer_1" data-name="Layer 1"
54
- xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
55
- <defs>
56
- <style>.cls-Bar100Stacked-1{fill:#ab4191;}.cls-Bar100Stacked-1,.cls-Bar100Stacked-2,.cls-Bar100Stacked-3,.cls-Bar100Stacked-4{fill-rule:evenodd;}.cls-Bar100Stacked-2{fill:#f05951;}.cls-Bar100Stacked-3{fill:#fa8d3d;}.cls-Bar100Stacked-4,.cls-Bar100Stacked-5{fill:#0f6860;}</style>
57
- </defs>
58
- <path class="cls-Bar100Stacked-1" d="M96,7.84H45.71v11.1H96Zm0,13.38H47.67V32.33H96Zm0,13.39H42.45V46H96Zm0,13.72H48.33v11.1H96Zm0,13.38H43.43V72.82H96ZM96,75.1H42.12V86.2H96Z"/>
59
- <path class="cls-Bar100Stacked-2" d="M75.76,21.22H29.71V32.33H75.76ZM66,61.71H27.1V72.82H66Zm4.24-27.1h-48V46h48ZM56.82,48.33H30v11.1H56.82ZM73.47,75.1H25.8V86.2H73.47ZM60.73,7.84h-33v11.1h33Z"/>
60
- <path class="cls-Bar100Stacked-3" d="M47.67,21.22H8.16V32.33H47.67ZM39.51,61.71H5.88V72.82H39.51Zm3.59-27.1H1.63V46H43.1ZM31.35,48.33H8.16v11.1H31.35ZM45.71,75.1H4.57V86.2H45.71ZM34.61,7.84H6.2v11.1H34.61Z"/>
61
- <path class="cls-Bar100Stacked-4" d="M14,34.61H0V46H14Zm4.25,13.72H0v11.1H18.29ZM15,75.1H0V86.2H15ZM22.2,21.22H0V32.33H22.2ZM11.43,61.71H0V72.82H11.43Z"/>
62
- <rect class="cls-Bar100Stacked-5" y="7.84" width="10.78" height="11.1"/>
63
- </svg>
64
- `;
65
- const BarGrouped = `
66
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
67
- <defs>
68
- <style>.cls-BarGrouped-1{fill:#f05951;}.cls-BarGrouped-2{fill:#ab4191;}.cls-BarGrouped-3{fill:#0f6860;}.cls-BarGrouped-4{fill:#fa8d3d;}</style>
69
- </defs>
70
- <g id="ChartNames">
71
- <rect class="cls-BarGrouped-1" y="77.13" width="21.19" height="6.29"/>
72
- <rect class="cls-BarGrouped-1" y="49.66" width="48.99" height="6.29"/>
73
- <rect class="cls-BarGrouped-1" y="22.18" width="72.5" height="6.29"/>
74
- <rect class="cls-BarGrouped-2" y="70.84" width="81.43" height="6.29"/>
75
- <rect class="cls-BarGrouped-3" y="89.71" width="60.25" height="6.29"/>
76
- <rect class="cls-BarGrouped-2" y="43.37" width="96" height="6.29"/>
77
- <rect class="cls-BarGrouped-3" y="62.23" width="33.43" height="6.29"/>
78
- <rect class="cls-BarGrouped-2" y="15.89" width="55.61" height="6.29"/>
79
- <rect class="cls-BarGrouped-3" y="34.76" width="45.35" height="6.29"/>
80
- <rect class="cls-BarGrouped-4" y="83.42" width="89.38" height="6.29"/>
81
- <rect class="cls-BarGrouped-4" y="55.94" width="70.84" height="6.29"/>
82
- <rect class="cls-BarGrouped-4" y="28.47" width="33.43" height="6.29"/>
83
- </g>
84
- </svg>
85
- `;
86
- const BarStacked = `
87
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
88
- <defs>
89
- <style>.cls-BarStacked-1{fill:#ab4191;}.cls-BarStacked-1,.cls-BarStacked-2,.cls-BarStacked-3,.cls-BarStacked-4{fill-rule:evenodd;}.cls-BarStacked-2{fill:#f05951;}.cls-BarStacked-3{fill:#fa8d3d;}.cls-BarStacked-4{fill:#0f6860;}</style>
90
- </defs>
91
- <g id="ChartNames">
92
- <path class="cls-BarStacked-1" d="M53.9,8.85H14.58V19.66H53.9ZM86.33,22.28H21.46V33.09H86.33ZM71.26,35.71H14.91V46.85H71.26ZM53.57,49.47H11.63V60.29H53.57ZM95.84,62.91H21.46V73.72H95.84Zm-36,13.43H14.91V87.15H59.8Z"/>
93
- <path class="cls-BarStacked-2" d="M41.12,8.85H14.58V19.66H41.12ZM61.76,22.28H21.46V33.09h40.3ZM46.69,35.71H14.91V46.85H46.69ZM41.77,49.47H11.63V60.29H41.77ZM62.09,62.91H21.46V73.72H62.09ZM42.76,76.34H14.91V87.15H42.76Z"/>
94
- <path class="cls-BarStacked-3" d="M31.62,8.85h-17V19.66h17ZM45.38,22.28H21.46V33.09H45.38Zm-9.5,13.43h-21V46.85h21Zm-2.3,13.76H11.63V60.29H33.58Zm8.85,13.44h-21V73.72h21ZM31,76.34h-16V87.15H31Z"/>
95
- <path class="cls-BarStacked-4" d="M14.91,8.85H.16V19.66H14.91ZM27.36,22.28H.16V33.09h27.2ZM19.17,35.71H.16V46.85h19ZM15.56,49.47H.16V60.29h15.4ZM27.69,62.91H.16V73.72H27.69ZM16.22,76.34H.16V87.15H16.22Z"/>
96
- </g>
97
- </svg>
98
- `;
99
- const Column100Stacked = `
100
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
101
- <defs>
102
- <style>.cls-Column100Stacked-1{fill:#ab4191;}.cls-Column100Stacked-1,.cls-Column100Stacked-2,.cls-Column100Stacked-3,.cls-Column100Stacked-4{fill-rule:evenodd;}.cls-Column100Stacked-2{fill:#f05951;}.cls-Column100Stacked-3{fill:#fa8d3d;}.cls-Column100Stacked-4{fill:#0f6860;}</style>
103
- </defs>
104
- <g id="ChartNames">
105
- <path class="cls-Column100Stacked-1" d="M0,0V50.28H13.81V0ZM16.44,0V48.44H30.25V0ZM32.88,0V53.51h13.8V0ZM49.32,0V47.78h13.8V0ZM65.75,0V52.68H79.56V0ZM82.19,0V54H96V0Z"/>
106
- <path class="cls-Column100Stacked-2" d="M16.44,20.35V66.43H30.25V20.35ZM65.75,30V68.74H79.56V30ZM32.88,25.73v48h13.8v-48ZM49.32,39.17V66.05h13.8V39.17ZM82.19,22.66V70.27H96V22.66ZM0,35.33v33H13.81v-33Z"/>
107
- <path class="cls-Column100Stacked-3" d="M16.44,48.38V87.94H30.25V48.38Zm49.31,8.07V90.24H79.56V56.45ZM32.88,53V94.46h13.8V53ZM49.32,64.51V87.94h13.8V64.51ZM82.19,50.3V91.39H96V50.3ZM0,61.44V89.86H13.81V61.44Z"/>
108
- <path class="cls-Column100Stacked-4" d="M32.88,82.11V96h13.8V82.11Zm16.44-4.45V96h13.8V77.66Zm32.87,3.41V96H96V81.07ZM16.44,73.73V96H30.25V73.73ZM65.75,84.47V96H79.56V84.47ZM0,85.08V96H13.81V85.08Z"/>
109
- </g>
110
- </svg>
111
- `;
112
- const ColumnGrouped = `
113
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
114
- <defs>
115
- <style>.cls-ColumnGrouped-1{fill:#fa8d3d;}.cls-ColumnGrouped-2{fill:#f05951;}.cls-ColumnGrouped-3{fill:#0f6860;}.cls-ColumnGrouped-4{fill:#ab4191;}</style>
116
- </defs>
117
- <g id="ChartNames">
118
- <rect class="cls-ColumnGrouped-1" x="14.87" y="30.42" width="7.44" height="65.58"/>
119
- <rect class="cls-ColumnGrouped-1" x="48" y="8.11" width="7.44" height="87.89"/>
120
- <rect class="cls-ColumnGrouped-1" x="81.13" y="38.2" width="7.44" height="57.8"/>
121
- <rect class="cls-ColumnGrouped-2" x="7.44" y="43.61" width="7.44" height="52.39"/>
122
- <rect class="cls-ColumnGrouped-3" x="22.31" y="52.06" width="7.44" height="43.94"/>
123
- <rect class="cls-ColumnGrouped-2" x="40.56" y="34.48" width="7.44" height="61.52"/>
124
- <rect class="cls-ColumnGrouped-3" x="55.44" y="19.27" width="7.44" height="76.73"/>
125
- <rect class="cls-ColumnGrouped-2" x="73.69" y="12.17" width="7.44" height="83.83"/>
126
- <rect class="cls-ColumnGrouped-4" y="20.28" width="7.44" height="75.72"/>
127
- <rect class="cls-ColumnGrouped-4" x="33.13" y="71.32" width="7.44" height="24.68"/>
128
- <rect class="cls-ColumnGrouped-4" x="66.25" y="51.04" width="7.44" height="44.96"/>
129
- <rect class="cls-ColumnGrouped-3" x="88.56" y="63.21" width="7.44" height="32.79"/>
130
- </g>
131
- </svg>
132
- `;
133
- const ColumnStacked = `
134
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
135
- <defs>
136
- <style>.cls-ColumnStacked-1{fill:#ab4191;}.cls-ColumnStacked-1,.cls-ColumnStacked-2,.cls-ColumnStacked-3,.cls-ColumnStacked-4{fill-rule:evenodd;}.cls-ColumnStacked-2{fill:#f05951;}.cls-ColumnStacked-3{fill:#fa8d3d;}.cls-ColumnStacked-4{fill:#0f6860;}</style>
137
- </defs>
138
- <g id="ChartNames">
139
- <path class="cls-ColumnStacked-1" d="M0,44.4V78.55H13.81V44.4ZM16.44,9.87V78.55H30.25V9.87ZM32.88,25.8V78.55h13.8V25.8Zm16.44,19V82.34h13.8V44.77ZM65.75,0V78.55H79.56V0ZM82.19,37.94V86.13H96V37.94Z"/>
140
- <path class="cls-ColumnStacked-2" d="M16.44,36.05v42.5H30.25V36.05Zm49.31-.38V78.55H79.56V35.67ZM32.88,52V78.55h13.8V52ZM49.32,57.3v25h13.8v-25Zm32.87-1.14v30H96v-30ZM0,57.68V78.55H13.81V57.68Z"/>
141
- <path class="cls-ColumnStacked-3" d="M32.88,63.37V78.55h13.8V63.37Zm16.44,2.27v16.7h13.8V65.64Zm32.87,3V86.13H96V68.68ZM16.44,53.5v25H30.25v-25Zm49.31,3v22H79.56v-22ZM0,67.54v14H13.81v-14Z"/>
142
- <path class="cls-ColumnStacked-4" d="M16.44,71.72V96H30.25V71.72Zm49.31,1.51V96H79.56V73.23ZM32.88,77V96h13.8V77Zm16.44,3.79V96h13.8V80.82Zm32.87,3V96H96V83.86ZM0,81.2V96H13.81V81.2Z"/>
143
- </g>
144
- </svg>
145
- `;
146
- const Line100Stacked = `
147
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
148
- <defs>
149
- <style>.cls-Line100Stacked-1,.cls-Line100Stacked-2,.cls-Line100Stacked-3,.cls-Line100Stacked-4{fill:none;stroke-miterlimit:10;stroke-width:2px;fill-rule:evenodd;}.cls-Line100Stacked-1{stroke:#ab4191;}.cls-Line100Stacked-2{stroke:#f05951;}.cls-Line100Stacked-3{stroke:#fa8d3d;}.cls-Line100Stacked-4{stroke:#0f6860;}</style>
150
- </defs>
151
- <g id="ChartNames">
152
- <polyline class="cls-Line100Stacked-1" points="0 29.37 17.34 19.88 38.74 29.52 58.65 32.18 80.42 28.87 96 24.56"/>
153
- <polyline class="cls-Line100Stacked-2" points="0 42.5 17.34 37.81 38.37 41.12 59.02 42.11 80.42 37.81 96 41.85"/>
154
- <polyline class="cls-Line100Stacked-3" points="0 66.68 17.34 59.32 38.37 72.9 59.76 55.35 96 65.16"/>
155
- <polyline class="cls-Line100Stacked-4" points="0 85.81 17.34 78.52 59.39 88.12 80.78 76.87 96 82.48"/>
156
- </g>
157
- </svg>
158
- `;
159
- const LineGrouped = `
160
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
161
- <defs>
162
- <style>.cls-LineGrouped-1,.cls-LineGrouped-2,.cls-LineGrouped-3,.cls-LineGrouped-4{fill:none;stroke-miterlimit:10;stroke-width:2px;}.cls-LineGrouped-1{stroke:#ab4191;}.cls-LineGrouped-2{stroke:#f05951;}.cls-LineGrouped-3{stroke:#fa8d3d;}.cls-LineGrouped-4{stroke:#0f6860;}</style>
163
- </defs>
164
- <g id="ChartNames">
165
- <polyline class="cls-LineGrouped-1" points="0 31.14 4.12 20.49 11.66 36.91 16.09 36.66 24.41 46.48 27.96 47.14 32.04 44.59 36.46 46.81 40.19 44.59 45.04 45.82 47.99 49.2 51.98 48.87 59.96 52.84 63.95 51.52 68.28 51.52 74.78 53.74 85.36 41.04 96 17.86 96 18.27"/>
166
- <polyline class="cls-LineGrouped-2" points="0 61.42 3.9 56.96 7.98 61.25 15.61 60.59 24.28 69.75 27.57 71.15 31.99 67.52 35.81 69.17 40.06 67.19 48.04 70.08 51.76 69.17 59.07 73.36 68.06 72.06 75.87 68.01 79.25 63.06 82.37 59.93 88.01 57.37 91.99 52.01 96 36.5 96 35.45"/>
167
- <polyline class="cls-LineGrouped-3" points="0 79.47 5.11 77.91 8.5 78.81 16.13 77.41 20.72 80.71 27.4 84.17 37.8 83.52 46.91 85.58 52.02 79.31 60.35 84.59 90.95 89.87 96 85.5"/>
168
- <polyline class="cls-LineGrouped-4" points="0 92.26 14.7 90.69 19.9 92.1 24.93 90.03 30.13 91.1 47.13 90.78 51.72 89.12 56.75 90.69 71.06 90.11 83.63 83.1 96 79.33"/>
169
- </g>
170
- </svg>
171
- `;
172
- const LineStacked = `
173
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
174
- <defs>
175
- <style>.cls-LineStacked-1,.cls-LineStacked-2,.cls-LineStacked-3,.cls-LineStacked-4{fill:none;stroke-miterlimit:10;stroke-width:2px;fill-rule:evenodd;}.cls-LineStacked-1{stroke:#ab4191;}.cls-LineStacked-2{stroke:#f05951;}.cls-LineStacked-3{stroke:#fa8d3d;}.cls-LineStacked-4{stroke:#0f6860;}</style>
176
- </defs>
177
- <g id="ChartNames">
178
- <polyline class="cls-LineStacked-1" points="0 80.39 14.23 67.93 31.11 68.6 47.9 59.83 65.4 39.39 81.92 33.46 96 14.25"/>
179
- <polyline class="cls-LineStacked-2" points="0 85.07 14.32 75.65 31.47 78.74 48.25 68.72 64.86 68.97 82.1 43.77 96 36.04"/>
180
- <polyline class="cls-LineStacked-3" points="0 90.45 14.14 83.91 30.93 84.66 48.17 79.07 64.86 78.07 82.28 62.38 96 59.21"/>
181
- <polyline class="cls-LineStacked-4" points="0 96 31.16 90.78 64.95 88.38 82.19 77.78 96 74.53"/>
182
- </g>
183
- </svg>
184
- `;
185
- const Pie = `
186
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
187
- <defs>
188
- <style>.cls-Pie-1{fill:#f05951;}.cls-Pie-1,.cls-Pie-2,.cls-Pie-3,.cls-Pie-4{fill-rule:evenodd;}.cls-Pie-2{fill:#fa8d3d;}.cls-Pie-3{fill:#0f6860;}.cls-Pie-4{fill:#ab4191;}</style>
189
- </defs>
190
- <g id="ChartNames">
191
- <path class="cls-Pie-1" d="M44.19,48V3.79A43.27,43.27,0,0,0,3,32.3,43.45,43.45,0,0,0,15,81Z"/>
192
- <path class="cls-Pie-2" d="M44.19,48,15,81a42.63,42.63,0,0,0,37.7,10.28,42.72,42.72,0,0,0,31-23.78Z"/>
193
- <path class="cls-Pie-3" d="M51.77,48,91.29,67.53a42.87,42.87,0,0,0,.53-38Z"/>
194
- <path class="cls-Pie-4" d="M44.19,48,84.24,29.52a43.13,43.13,0,0,0-40-25.73Z"/>
195
- </g>
196
- </svg>
197
- `;
198
- const ScatterBubble = `
199
- <svg id="Layer_1" data-name="Layer 1"
200
- xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
201
- <defs>
202
- <style>.cls-ScatterBubble-1{fill:#f05951;}.cls-ScatterBubble-1,.cls-ScatterBubble-2{stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.5px;}.cls-ScatterBubble-2{fill:#ab4191;}</style>
203
- </defs>
204
- <circle class="cls-ScatterBubble-1" cx="6.06" cy="85.05" r="2.33"/>
205
- <circle class="cls-ScatterBubble-1" cx="16.57" cy="83.89" r="2.33"/>
206
- <circle class="cls-ScatterBubble-1" cx="13.07" cy="78.83" r="2.33"/>
207
- <circle class="cls-ScatterBubble-1" cx="39.52" cy="59.38" r="2.33"/>
208
- <circle class="cls-ScatterBubble-1" cx="35.63" cy="53.94" r="2.33"/>
209
- <circle class="cls-ScatterBubble-1" cx="7.62" cy="70.27" r="2.33"/>
210
- <circle class="cls-ScatterBubble-1" cx="20.85" cy="71.44" r="2.33"/>
211
- <circle class="cls-ScatterBubble-2" cx="8.79" cy="84.28" r="3.11"/>
212
- <circle class="cls-ScatterBubble-1" cx="18.9" cy="67.16" r="3.11"/>
213
- <circle class="cls-ScatterBubble-1" cx="36.4" cy="59.77" r="3.11"/>
214
- <circle class="cls-ScatterBubble-1" cx="63.24" cy="21.26" r="3.11"/>
215
- <circle class="cls-ScatterBubble-1" cx="25.12" cy="70.27" r="3.11"/>
216
- <circle class="cls-ScatterBubble-2" cx="9.18" cy="71.83" r="3.11"/>
217
- <circle class="cls-ScatterBubble-2" cx="13.07" cy="47.32" r="3.11"/>
218
- <circle class="cls-ScatterBubble-1" cx="8.01" cy="60.94" r="4.28"/>
219
- <circle class="cls-ScatterBubble-2" cx="22.4" cy="74.94" r="4.28"/>
220
- <circle class="cls-ScatterBubble-1" cx="29.79" cy="54.33" r="4.28"/>
221
- <circle class="cls-ScatterBubble-1" cx="73.75" cy="30.99" r="4.28"/>
222
- <circle class="cls-ScatterBubble-1" cx="62.47" cy="34.88" r="4.28"/>
223
- <circle class="cls-ScatterBubble-1" cx="16.57" cy="48.88" r="4.28"/>
224
- <circle class="cls-ScatterBubble-1" cx="44.18" cy="28.26" r="4.28"/>
225
- <circle class="cls-ScatterBubble-1" cx="16.57" cy="61.33" r="4.28"/>
226
- <circle class="cls-ScatterBubble-2" cx="29.79" cy="49.66" r="5.06"/>
227
- <circle class="cls-ScatterBubble-1" cx="47.68" cy="53.94" r="5.83"/>
228
- <circle class="cls-ScatterBubble-1" cx="62.08" cy="26.32" r="5.06"/>
229
- <circle class="cls-ScatterBubble-2" cx="86.58" cy="39.93" r="5.06"/>
230
- <circle class="cls-ScatterBubble-2" cx="70.63" cy="33.32" r="5.06"/>
231
- <circle class="cls-ScatterBubble-2" cx="64.8" cy="33.32" r="6.22"/>
232
- <circle class="cls-ScatterBubble-1" cx="25.9" cy="32.15" r="6.22"/>
233
- <circle class="cls-ScatterBubble-2" cx="39.52" cy="74.16" r="6.61"/>
234
- <circle class="cls-ScatterBubble-2" cx="56.23" cy="81.54" r="6.22"/>
235
- <circle class="cls-ScatterBubble-1" cx="51.19" cy="74.16" r="8.17"/>
236
- <circle class="cls-ScatterBubble-2" cx="42.24" cy="38.77" r="8.17"/>
237
- <circle class="cls-ScatterBubble-1" cx="50.8" cy="60.94" r="8.17"/>
238
- <circle class="cls-ScatterBubble-1" cx="41.85" cy="34.88" r="9.34"/>
239
- <circle class="cls-ScatterBubble-1" cx="52.35" cy="31.76" r="11.28"/>
240
- <circle class="cls-ScatterBubble-2" cx="58.97" cy="53.55" r="12.84"/>
241
- <circle class="cls-ScatterBubble-1" cx="37.57" cy="81.55" r="9.72"/>
242
- <circle class="cls-ScatterBubble-1" cx="58.58" cy="50.44" r="6.22"/>
243
- <circle class="cls-ScatterBubble-1" cx="51.57" cy="53.55" r="7"/>
244
- <circle class="cls-ScatterBubble-1" cx="53.52" cy="34.49" r="7"/>
245
- <circle class="cls-ScatterBubble-1" cx="57.41" cy="11.93" r="7"/>
246
- <circle class="cls-ScatterBubble-1" cx="86.19" cy="57.83" r="5.45"/>
247
- <circle class="cls-ScatterBubble-1" cx="20.85" cy="66.38" r="5.45"/>
248
- <circle class="cls-ScatterBubble-2" cx="38.35" cy="58.6" r="5.06"/>
249
- <circle class="cls-ScatterBubble-2" cx="15.79" cy="64.05" r="5.06"/>
250
- <circle class="cls-ScatterBubble-1" cx="28.24" cy="74.55" r="5.06"/>
251
- <circle class="cls-ScatterBubble-2" cx="57.02" cy="22.04" r="4.28"/>
252
- </svg>
253
- `;
254
- const ScatterLine = `
255
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
256
- <defs>
257
- <style>.cls-ScatterLine-1,.cls-ScatterLine-2,.cls-ScatterLine-3,.cls-ScatterLine-4{fill:none;stroke-miterlimit:10;stroke-width:2px;}.cls-ScatterLine-1{stroke:#0f6860;}.cls-ScatterLine-1,.cls-ScatterLine-2,.cls-ScatterLine-3,.cls-ScatterLine-4,.cls-ScatterLine-5,.cls-ScatterLine-7,.cls-ScatterLine-8,.cls-ScatterLine-9{fill-rule:evenodd;}.cls-ScatterLine-2{stroke:#fa8d3d;}.cls-ScatterLine-3{stroke:#f05951;}.cls-ScatterLine-4{stroke:#ab4191;}.cls-ScatterLine-5{fill:#ab4191;}.cls-ScatterLine-6{fill:#fff;}.cls-ScatterLine-7{fill:#f05951;}.cls-ScatterLine-8{fill:#0f6860;}.cls-ScatterLine-9{fill:#fa8d3d;}</style>
258
- </defs>
259
- <g id="ChartNames">
260
- <polyline class="cls-ScatterLine-1" points="26.86 87.32 37.71 81.09 60.66 85.34 75.57 71.13 82.69 60.02 88.09 48.86"/>
261
- <polyline class="cls-ScatterLine-2" points="10.6 85.36 16.86 76.38 32.22 58.89 55.26 41.45 60.02 31.09 69.79 23.41 88.32 6.3"/>
262
- <polyline class="cls-ScatterLine-3" points="60.19 7.22 47.42 10.06 35.31 14.73 18.95 32.1 17.53 50.04 10.44 58.56"/>
263
- <polyline class="cls-ScatterLine-4" points="23.58 4.76 10.97 12.44 8.47 29.72"/>
264
- <path class="cls-ScatterLine-5" d="M8.69,12.61a2.51,2.51,0,1,0,2.5-2.51A2.5,2.5,0,0,0,8.69,12.61Zm1,0a1.5,1.5,0,1,1,1.5,1.5A1.5,1.5,0,0,1,9.69,12.61Z"/>
265
- <circle class="cls-ScatterLine-6" cx="11.19" cy="12.61" r="1.5"/>
266
- <path class="cls-ScatterLine-5" d="M21,4.59a2.51,2.51,0,1,0,2.51-2.5A2.51,2.51,0,0,0,21,4.59Zm1,0A1.51,1.51,0,1,1,23.55,6.1,1.5,1.5,0,0,1,22,4.59Z"/>
267
- <circle class="cls-ScatterLine-6" cx="23.55" cy="4.59" r="1.5"/>
268
- <path class="cls-ScatterLine-5" d="M6,29.64a2.5,2.5,0,1,0,2.5-2.51A2.5,2.5,0,0,0,6,29.64Zm1,0a1.5,1.5,0,1,1,1.5,1.5A1.5,1.5,0,0,1,7,29.64Z"/>
269
- <circle class="cls-ScatterLine-6" cx="8.52" cy="29.64" r="1.5"/>
270
- <path class="cls-ScatterLine-7" d="M57.43,7.26a2.51,2.51,0,1,0,2.51-2.5A2.51,2.51,0,0,0,57.43,7.26Zm1,0a1.51,1.51,0,1,1,1.51,1.51A1.51,1.51,0,0,1,58.43,7.26Z"/>
271
- <circle class="cls-ScatterLine-6" cx="59.94" cy="7.26" r="1.5"/>
272
- <path class="cls-ScatterLine-7" d="M44.74,10.24a2.51,2.51,0,1,0,2.51-2.51A2.51,2.51,0,0,0,44.74,10.24Zm1,0a1.5,1.5,0,1,1,1.5,1.5A1.5,1.5,0,0,1,45.75,10.24Z"/>
273
- <circle class="cls-ScatterLine-6" cx="47.25" cy="10.24" r="1.5"/>
274
- <path class="cls-ScatterLine-7" d="M33.06,14.94a2.51,2.51,0,1,0,2.5-2.5A2.5,2.5,0,0,0,33.06,14.94Zm1,0a1.5,1.5,0,1,1,1.5,1.51A1.5,1.5,0,0,1,34.06,14.94Z"/>
275
- <circle class="cls-ScatterLine-6" cx="35.56" cy="14.94" r="1.5"/>
276
- <path class="cls-ScatterLine-7" d="M16.36,32.08a2.51,2.51,0,1,0,2.51-2.5A2.51,2.51,0,0,0,16.36,32.08Zm1,0a1.51,1.51,0,1,1,1.51,1.5A1.5,1.5,0,0,1,17.36,32.08Z"/>
277
- <circle class="cls-ScatterLine-6" cx="18.87" cy="32.08" r="1.5"/>
278
- <path class="cls-ScatterLine-7" d="M14.69,50.34a2.51,2.51,0,1,0,2.51-2.51A2.5,2.5,0,0,0,14.69,50.34Zm1,0a1.51,1.51,0,1,1,3,0,1.51,1.51,0,0,1-3,0Z"/>
279
- <circle class="cls-ScatterLine-6" cx="17.2" cy="50.34" r="1.5"/>
280
- <path class="cls-ScatterLine-7" d="M8,58.24a2.51,2.51,0,1,0,2.5-2.51A2.5,2.5,0,0,0,8,58.24Zm1,0a1.5,1.5,0,1,1,1.5,1.5A1.5,1.5,0,0,1,9,58.24Z"/>
281
- <circle class="cls-ScatterLine-6" cx="10.48" cy="58.24" r="1.5"/>
282
- <path class="cls-ScatterLine-8" d="M80.54,60a2.5,2.5,0,1,0,2.5-2.5A2.51,2.51,0,0,0,80.54,60Zm1,0a1.5,1.5,0,1,1,1.5,1.5A1.5,1.5,0,0,1,81.54,60Z"/>
283
- <circle class="cls-ScatterLine-6" cx="83.04" cy="60.02" r="1.5"/>
284
- <path class="cls-ScatterLine-8" d="M85.58,49a2.51,2.51,0,1,0,2.51-2.5A2.51,2.51,0,0,0,85.58,49Zm1,0a1.51,1.51,0,1,1,1.51,1.5A1.51,1.51,0,0,1,86.58,49Z"/>
285
- <circle class="cls-ScatterLine-6" cx="88.09" cy="49" r="1.5"/>
286
- <path class="cls-ScatterLine-8" d="M73.27,71.18a2.51,2.51,0,1,0,2.5-2.5A2.51,2.51,0,0,0,73.27,71.18Zm1,0a1.5,1.5,0,1,1,1.5,1.51A1.5,1.5,0,0,1,74.27,71.18Z"/>
287
- <circle class="cls-ScatterLine-6" cx="75.77" cy="71.18" r="1.5"/>
288
- <path class="cls-ScatterLine-8" d="M58.16,85.65a2.5,2.5,0,1,0,2.5-2.51A2.5,2.5,0,0,0,58.16,85.65Zm1,0a1.5,1.5,0,1,1,1.5,1.5A1.51,1.51,0,0,1,59.16,85.65Z"/>
289
- <circle class="cls-ScatterLine-6" cx="60.66" cy="85.65" r="1.5"/>
290
- <path class="cls-ScatterLine-8" d="M35.2,81.53A2.51,2.51,0,1,0,37.71,79,2.52,2.52,0,0,0,35.2,81.53Zm1,0A1.51,1.51,0,1,1,37.71,83,1.51,1.51,0,0,1,36.2,81.53Z"/>
291
- <circle class="cls-ScatterLine-6" cx="37.71" cy="81.53" r="1.5"/>
292
- <path class="cls-ScatterLine-8" d="M24.35,87.32a2.51,2.51,0,1,0,2.51-2.51A2.5,2.5,0,0,0,24.35,87.32Zm1,0a1.51,1.51,0,1,1,1.51,1.5A1.51,1.51,0,0,1,25.35,87.32Z"/>
293
- <circle class="cls-ScatterLine-6" cx="26.86" cy="87.32" r="1.5"/>
294
- <path class="cls-ScatterLine-9" d="M8,85.73a2.51,2.51,0,1,0,2.51-2.5A2.52,2.52,0,0,0,8,85.73Zm1,0a1.5,1.5,0,1,1,1.5,1.5A1.5,1.5,0,0,1,9,85.73Z"/>
295
- <circle class="cls-ScatterLine-6" cx="10.48" cy="85.73" r="1.5"/>
296
- <path class="cls-ScatterLine-9" d="M13.36,77.38a2.51,2.51,0,1,0,2.5-2.5A2.5,2.5,0,0,0,13.36,77.38Zm1,0a1.51,1.51,0,1,1,1.5,1.51A1.5,1.5,0,0,1,14.36,77.38Z"/>
297
- <circle class="cls-ScatterLine-6" cx="15.86" cy="77.38" r="1.5"/>
298
- <path class="cls-ScatterLine-9" d="M19,70.71a2.51,2.51,0,1,0,2.51-2.51A2.5,2.5,0,0,0,19,70.71Zm1,0a1.51,1.51,0,1,1,1.51,1.5A1.51,1.51,0,0,1,20,70.71Z"/>
299
- <circle class="cls-ScatterLine-6" cx="21.54" cy="70.71" r="1.5"/>
300
- <path class="cls-ScatterLine-9" d="M29.44,58.91a2.51,2.51,0,1,0,2.5-2.51A2.5,2.5,0,0,0,29.44,58.91Zm1,0a1.5,1.5,0,1,1,1.5,1.5A1.51,1.51,0,0,1,30.44,58.91Z"/>
301
- <circle class="cls-ScatterLine-6" cx="31.94" cy="58.91" r="1.5"/>
302
- <path class="cls-ScatterLine-9" d="M41.41,49.67a2.5,2.5,0,1,0,2.5-2.5A2.5,2.5,0,0,0,41.41,49.67Zm1,0a1.5,1.5,0,1,1,1.5,1.5A1.5,1.5,0,0,1,42.41,49.67Z"/>
303
- <circle class="cls-ScatterLine-6" cx="43.91" cy="49.67" r="1.5"/>
304
- <path class="cls-ScatterLine-9" d="M52.76,41.66a2.51,2.51,0,1,0,2.5-2.51A2.5,2.5,0,0,0,52.76,41.66Zm1,0a1.51,1.51,0,1,1,1.5,1.5A1.5,1.5,0,0,1,53.76,41.66Z"/>
305
- <circle class="cls-ScatterLine-6" cx="55.26" cy="41.66" r="1.5"/>
306
- <path class="cls-ScatterLine-9" d="M57.77,31.3a2.51,2.51,0,1,0,2.5-2.5A2.5,2.5,0,0,0,57.77,31.3Zm1,0a1.5,1.5,0,1,1,1.5,1.51A1.5,1.5,0,0,1,58.77,31.3Z"/>
307
- <circle class="cls-ScatterLine-6" cx="60.27" cy="31.3" r="1.5"/>
308
- <path class="cls-ScatterLine-9" d="M67.45,23.62a2.51,2.51,0,1,0,2.5-2.5A2.5,2.5,0,0,0,67.45,23.62Zm1,0A1.51,1.51,0,1,1,70,25.13,1.5,1.5,0,0,1,68.45,23.62Z"/>
309
- <circle class="cls-ScatterLine-6" cx="69.95" cy="23.62" r="1.5"/>
310
- <path class="cls-ScatterLine-9" d="M85.82,6.59a2.5,2.5,0,1,0,2.5-2.5A2.5,2.5,0,0,0,85.82,6.59Zm1,0a1.5,1.5,0,1,1,1.5,1.51A1.5,1.5,0,0,1,86.82,6.59Z"/>
311
- <circle class="cls-ScatterLine-6" cx="88.32" cy="6.59" r="1.5"/>
312
- </g>
313
- </svg>
314
- `;
315
- const ScatterPoint = `
316
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96">
317
- <defs>
318
- <style>.cls-ScatterPoint-1{fill:#ab4191;}.cls-ScatterPoint-1,.cls-ScatterPoint-3,.cls-ScatterPoint-4{fill-rule:evenodd;}.cls-ScatterPoint-2{fill:#fff;}.cls-ScatterPoint-3{fill:#f05951;}.cls-ScatterPoint-4{fill:#fa8d3d;}</style>
319
- </defs>
320
- <g id="ChartNames">
321
- <path class="cls-ScatterPoint-1" d="M6.42,7.64A2.37,2.37,0,1,0,8.79,5.28,2.37,2.37,0,0,0,6.42,7.64Zm1,0A1.42,1.42,0,1,1,8.79,9.06,1.41,1.41,0,0,1,7.37,7.64Z"/>
322
- <circle class="cls-ScatterPoint-2" cx="8.79" cy="7.64" r="1.42"/>
323
- <path class="cls-ScatterPoint-1" d="M12.09,10a2.37,2.37,0,1,0,2.37-2.37A2.37,2.37,0,0,0,12.09,10ZM13,10a1.42,1.42,0,1,1,1.42,1.41A1.41,1.41,0,0,1,13,10Z"/>
324
- <circle class="cls-ScatterPoint-2" cx="14.46" cy="10.01" r="1.42"/>
325
- <path class="cls-ScatterPoint-1" d="M22,8.59a2.37,2.37,0,1,0,2.37-2.36A2.37,2.37,0,0,0,22,8.59Zm.95,0A1.42,1.42,0,1,1,24.38,10,1.41,1.41,0,0,1,23,8.59Z"/>
326
- <circle class="cls-ScatterPoint-2" cx="24.38" cy="8.59" r="1.42"/>
327
- <path class="cls-ScatterPoint-1" d="M14.46,14.73a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,14.46,14.73Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.42,1.42,0,0,1,15.4,14.73Z"/>
328
- <circle class="cls-ScatterPoint-2" cx="16.82" cy="14.73" r="1.42"/>
329
- <path class="cls-ScatterPoint-1" d="M11.62,31.27A2.37,2.37,0,1,0,14,28.9,2.36,2.36,0,0,0,11.62,31.27Zm1,0A1.42,1.42,0,1,1,14,32.68,1.41,1.41,0,0,1,12.57,31.27Z"/>
330
- <circle class="cls-ScatterPoint-2" cx="13.98" cy="31.27" r="1.42"/>
331
- <path class="cls-ScatterPoint-1" d="M3.12,28.9a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,3.12,28.9Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.41,1.41,0,0,1,4.06,28.9Z"/>
332
- <circle class="cls-ScatterPoint-2" cx="5.48" cy="28.9" r="1.42"/>
333
- <path class="cls-ScatterPoint-1" d="M2.64,34.57A2.37,2.37,0,1,0,5,32.21,2.37,2.37,0,0,0,2.64,34.57Zm.95,0A1.42,1.42,0,1,1,5,36,1.41,1.41,0,0,1,3.59,34.57Z"/>
334
- <circle class="cls-ScatterPoint-2" cx="5.01" cy="34.57" r="1.42"/>
335
- <path class="cls-ScatterPoint-1" d="M.75,37.88a2.37,2.37,0,1,0,2.37-2.36A2.36,2.36,0,0,0,.75,37.88Zm1,0A1.42,1.42,0,1,1,3.12,39.3,1.42,1.42,0,0,1,1.7,37.88Z"/>
336
- <circle class="cls-ScatterPoint-2" cx="3.12" cy="37.88" r="1.42"/>
337
- <path class="cls-ScatterPoint-1" d="M1.23,44.5a2.36,2.36,0,1,0,2.36-2.37A2.36,2.36,0,0,0,1.23,44.5Zm.94,0a1.42,1.42,0,1,1,1.42,1.41A1.41,1.41,0,0,1,2.17,44.5Z"/>
338
- <circle class="cls-ScatterPoint-2" cx="3.59" cy="44.5" r="1.42"/>
339
- <path class="cls-ScatterPoint-1" d="M2.64,66.23A2.37,2.37,0,1,0,5,63.87,2.37,2.37,0,0,0,2.64,66.23Zm.95,0A1.42,1.42,0,1,1,5,67.65,1.41,1.41,0,0,1,3.59,66.23Z"/>
340
- <circle class="cls-ScatterPoint-2" cx="5.01" cy="66.23" r="1.42"/>
341
- <path class="cls-ScatterPoint-1" d="M26.27,75.21a2.36,2.36,0,1,0,2.36-2.37A2.36,2.36,0,0,0,26.27,75.21Zm.94,0a1.42,1.42,0,1,1,1.42,1.41A1.41,1.41,0,0,1,27.21,75.21Z"/>
342
- <circle class="cls-ScatterPoint-2" cx="28.63" cy="75.21" r="1.42"/>
343
- <path class="cls-ScatterPoint-1" d="M9.73,52.06a2.37,2.37,0,1,0,2.36-2.37A2.36,2.36,0,0,0,9.73,52.06Zm.95,0a1.42,1.42,0,1,1,1.41,1.41A1.41,1.41,0,0,1,10.68,52.06Z"/>
344
- <circle class="cls-ScatterPoint-2" cx="12.09" cy="52.06" r="1.42"/>
345
- <path class="cls-ScatterPoint-1" d="M14.46,48.75a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,14.46,48.75Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.41,1.41,0,0,1,15.4,48.75Z"/>
346
- <circle class="cls-ScatterPoint-2" cx="16.82" cy="48.75" r="1.42"/>
347
- <path class="cls-ScatterPoint-1" d="M14.46,41.66a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,14.46,41.66Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.42,1.42,0,0,1,15.4,41.66Z"/>
348
- <circle class="cls-ScatterPoint-2" cx="16.82" cy="41.66" r="1.42"/>
349
- <path class="cls-ScatterPoint-1" d="M22.49,44.5a2.36,2.36,0,1,0,2.36-2.37A2.36,2.36,0,0,0,22.49,44.5Zm.94,0a1.42,1.42,0,1,1,1.42,1.41A1.42,1.42,0,0,1,23.43,44.5Z"/>
350
- <circle class="cls-ScatterPoint-2" cx="24.85" cy="44.5" r="1.42"/>
351
- <path class="cls-ScatterPoint-1" d="M30.52,44a2.36,2.36,0,1,0,2.36-2.36A2.37,2.37,0,0,0,30.52,44Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.42,1.42,0,0,1,31.46,44Z"/>
352
- <circle class="cls-ScatterPoint-2" cx="32.88" cy="44.02" r="1.42"/>
353
- <path class="cls-ScatterPoint-3" d="M19.18,87.88a2.36,2.36,0,1,0,2.36-2.36A2.37,2.37,0,0,0,19.18,87.88Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.42,1.42,0,0,1,20.12,87.88Z"/>
354
- <circle class="cls-ScatterPoint-2" cx="21.54" cy="87.88" r="1.42"/>
355
- <path class="cls-ScatterPoint-3" d="M30.52,67.65a2.36,2.36,0,1,0,2.36-2.37A2.36,2.36,0,0,0,30.52,67.65Zm.94,0a1.42,1.42,0,1,1,1.42,1.41A1.42,1.42,0,0,1,31.46,67.65Z"/>
356
- <circle class="cls-ScatterPoint-2" cx="32.88" cy="67.65" r="1.42"/>
357
- <path class="cls-ScatterPoint-3" d="M41.86,51.58a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,41.86,51.58Zm.94,0A1.42,1.42,0,1,1,44.22,53,1.42,1.42,0,0,1,42.8,51.58Z"/>
358
- <circle class="cls-ScatterPoint-2" cx="44.22" cy="51.58" r="1.42"/>
359
- <path class="cls-ScatterPoint-3" d="M41.86,53.94a2.36,2.36,0,1,0,2.36-2.36A2.37,2.37,0,0,0,41.86,53.94Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.42,1.42,0,0,1,42.8,53.94Z"/>
360
- <circle class="cls-ScatterPoint-2" cx="44.22" cy="53.94" r="1.42"/>
361
- <path class="cls-ScatterPoint-3" d="M41.86,63.39A2.36,2.36,0,1,0,44.22,61,2.37,2.37,0,0,0,41.86,63.39Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.42,1.42,0,0,1,42.8,63.39Z"/>
362
- <circle class="cls-ScatterPoint-2" cx="44.22" cy="63.39" r="1.42"/>
363
- <path class="cls-ScatterPoint-3" d="M41.86,71.43a2.36,2.36,0,1,0,2.36-2.37A2.36,2.36,0,0,0,41.86,71.43Zm.94,0a1.42,1.42,0,1,1,1.42,1.41A1.42,1.42,0,0,1,42.8,71.43Z"/>
364
- <circle class="cls-ScatterPoint-2" cx="44.22" cy="71.43" r="1.42"/>
365
- <path class="cls-ScatterPoint-3" d="M53.2,83.24a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,53.2,83.24Zm.94,0a1.42,1.42,0,1,1,1.42,1.41A1.42,1.42,0,0,1,54.14,83.24Z"/>
366
- <circle class="cls-ScatterPoint-2" cx="55.56" cy="83.24" r="1.42"/>
367
- <path class="cls-ScatterPoint-3" d="M64.06,75.21a2.37,2.37,0,1,0,2.37-2.37A2.37,2.37,0,0,0,64.06,75.21Zm1,0a1.42,1.42,0,1,1,1.42,1.41A1.41,1.41,0,0,1,65,75.21Z"/>
368
- <circle class="cls-ScatterPoint-2" cx="66.43" cy="75.21" r="1.42"/>
369
- <path class="cls-ScatterPoint-3" d="M64.06,63.39A2.37,2.37,0,1,0,66.43,61,2.37,2.37,0,0,0,64.06,63.39Zm1,0a1.42,1.42,0,1,1,1.42,1.42A1.41,1.41,0,0,1,65,63.39Z"/>
370
- <circle class="cls-ScatterPoint-2" cx="66.43" cy="63.39" r="1.42"/>
371
- <path class="cls-ScatterPoint-3" d="M75.4,71.43a2.37,2.37,0,1,0,2.36-2.37A2.36,2.36,0,0,0,75.4,71.43Zm.95,0a1.42,1.42,0,1,1,1.41,1.41A1.41,1.41,0,0,1,76.35,71.43Z"/>
372
- <circle class="cls-ScatterPoint-2" cx="77.76" cy="71.43" r="1.42"/>
373
- <path class="cls-ScatterPoint-3" d="M75.4,55.83a2.37,2.37,0,1,0,2.36-2.36A2.37,2.37,0,0,0,75.4,55.83Zm.95,0a1.42,1.42,0,1,1,1.41,1.42A1.41,1.41,0,0,1,76.35,55.83Z"/>
374
- <circle class="cls-ScatterPoint-2" cx="77.76" cy="55.83" r="1.42"/>
375
- <path class="cls-ScatterPoint-3" d="M75.4,24.81a2.37,2.37,0,1,0,2.36-2.36A2.36,2.36,0,0,0,75.4,24.81Zm.95,0a1.42,1.42,0,1,1,1.41,1.42A1.41,1.41,0,0,1,76.35,24.81Z"/>
376
- <circle class="cls-ScatterPoint-2" cx="77.76" cy="24.81" r="1.42"/>
377
- <path class="cls-ScatterPoint-3" d="M75.4,22a2.37,2.37,0,1,0,2.36-2.36A2.37,2.37,0,0,0,75.4,22Zm.95,0a1.42,1.42,0,1,1,1.41,1.42A1.41,1.41,0,0,1,76.35,22Z"/>
378
- <circle class="cls-ScatterPoint-2" cx="77.76" cy="21.97" r="1.42"/>
379
- <path class="cls-ScatterPoint-3" d="M86.74,84.1a2.37,2.37,0,1,0,2.36-2.36A2.37,2.37,0,0,0,86.74,84.1Zm1,0a1.42,1.42,0,1,1,1.41,1.42A1.41,1.41,0,0,1,87.69,84.1Z"/>
380
- <circle class="cls-ScatterPoint-2" cx="89.1" cy="84.1" r="1.42"/>
381
- <path class="cls-ScatterPoint-3" d="M86.74,71a2.37,2.37,0,1,0,2.36-2.36A2.37,2.37,0,0,0,86.74,71Zm1,0a1.42,1.42,0,1,1,1.41,1.42A1.41,1.41,0,0,1,87.69,71Z"/>
382
- <circle class="cls-ScatterPoint-2" cx="89.1" cy="70.95" r="1.42"/>
383
- <path class="cls-ScatterPoint-3" d="M41.86,88.36A2.36,2.36,0,1,0,44.22,86,2.36,2.36,0,0,0,41.86,88.36Zm.94,0a1.42,1.42,0,1,1,1.42,1.41A1.42,1.42,0,0,1,42.8,88.36Z"/>
384
- <circle class="cls-ScatterPoint-2" cx="44.22" cy="88.36" r="1.42"/>
385
- <path class="cls-ScatterPoint-3" d="M30.52,71.43a2.36,2.36,0,1,0,2.36-2.37A2.36,2.36,0,0,0,30.52,71.43Zm.94,0a1.42,1.42,0,1,1,1.42,1.41A1.42,1.42,0,0,1,31.46,71.43Z"/>
386
- <circle class="cls-ScatterPoint-2" cx="32.88" cy="71.43" r="1.42"/>
387
- <path class="cls-ScatterPoint-4" d="M19.65,64.34A2.37,2.37,0,1,0,22,62,2.36,2.36,0,0,0,19.65,64.34Zm1,0A1.42,1.42,0,1,1,22,65.76,1.41,1.41,0,0,1,20.6,64.34Z"/>
388
- <circle class="cls-ScatterPoint-2" cx="22.01" cy="64.34" r="1.42"/>
389
- <path class="cls-ScatterPoint-4" d="M30.52,50.64a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,30.52,50.64Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.42,1.42,0,0,1,31.46,50.64Z"/>
390
- <circle class="cls-ScatterPoint-2" cx="32.88" cy="50.64" r="1.42"/>
391
- <path class="cls-ScatterPoint-4" d="M30.52,62.92a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,30.52,62.92Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.43,1.43,0,0,1,31.46,62.92Z"/>
392
- <circle class="cls-ScatterPoint-2" cx="32.88" cy="62.92" r="1.42"/>
393
- <path class="cls-ScatterPoint-4" d="M30.52,79a2.36,2.36,0,1,0,2.36-2.37A2.36,2.36,0,0,0,30.52,79Zm.94,0a1.42,1.42,0,1,1,1.42,1.41A1.42,1.42,0,0,1,31.46,79Z"/>
394
- <circle class="cls-ScatterPoint-2" cx="32.88" cy="78.99" r="1.42"/>
395
- <path class="cls-ScatterPoint-4" d="M41.86,68.12a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,41.86,68.12Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.42,1.42,0,0,1,42.8,68.12Z"/>
396
- <circle class="cls-ScatterPoint-2" cx="44.22" cy="68.12" r="1.42"/>
397
- <path class="cls-ScatterPoint-4" d="M53.2,56.78a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,53.2,56.78Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.43,1.43,0,0,1,54.14,56.78Z"/>
398
- <circle class="cls-ScatterPoint-2" cx="55.56" cy="56.78" r="1.42"/>
399
- <path class="cls-ScatterPoint-4" d="M53.2,76.15a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,53.2,76.15Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.43,1.43,0,0,1,54.14,76.15Z"/>
400
- <circle class="cls-ScatterPoint-2" cx="55.56" cy="76.15" r="1.42"/>
401
- <path class="cls-ScatterPoint-4" d="M41.86,85.52a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,41.86,85.52Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.43,1.43,0,0,1,42.8,85.52Z"/>
402
- <circle class="cls-ScatterPoint-2" cx="44.22" cy="85.52" r="1.42"/>
403
- <path class="cls-ScatterPoint-4" d="M64.06,83.24a2.37,2.37,0,1,0,2.37-2.36A2.37,2.37,0,0,0,64.06,83.24Zm1,0a1.42,1.42,0,1,1,1.42,1.41A1.41,1.41,0,0,1,65,83.24Z"/>
404
- <circle class="cls-ScatterPoint-2" cx="66.43" cy="83.24" r="1.42"/>
405
- <path class="cls-ScatterPoint-4" d="M75.4,75.68a2.37,2.37,0,1,0,2.36-2.36A2.36,2.36,0,0,0,75.4,75.68Zm.95,0a1.42,1.42,0,1,1,1.41,1.42A1.41,1.41,0,0,1,76.35,75.68Z"/>
406
- <circle class="cls-ScatterPoint-2" cx="77.76" cy="75.68" r="1.42"/>
407
- <path class="cls-ScatterPoint-4" d="M77.76,75.21a2.37,2.37,0,1,0,2.37-2.37A2.37,2.37,0,0,0,77.76,75.21Zm.95,0a1.42,1.42,0,1,1,1.42,1.41A1.41,1.41,0,0,1,78.71,75.21Z"/>
408
- <circle class="cls-ScatterPoint-2" cx="80.13" cy="75.21" r="1.42"/>
409
- <path class="cls-ScatterPoint-4" d="M86.27,54.89a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,86.27,54.89Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.43,1.43,0,0,1,87.21,54.89Z"/>
410
- <circle class="cls-ScatterPoint-2" cx="88.63" cy="54.89" r="1.42"/>
411
- <path class="cls-ScatterPoint-4" d="M90.52,71a2.37,2.37,0,1,0,2.36-2.36A2.37,2.37,0,0,0,90.52,71Zm1,0a1.42,1.42,0,1,1,1.41,1.42A1.41,1.41,0,0,1,91.47,71Z"/>
412
- <circle class="cls-ScatterPoint-2" cx="92.88" cy="70.95" r="1.42"/>
413
- <path class="cls-ScatterPoint-4" d="M86.74,88.36A2.37,2.37,0,1,0,89.1,86,2.36,2.36,0,0,0,86.74,88.36Zm1,0a1.42,1.42,0,1,1,1.41,1.41A1.41,1.41,0,0,1,87.69,88.36Z"/>
414
- <circle class="cls-ScatterPoint-2" cx="89.1" cy="88.36" r="1.42"/>
415
- <path class="cls-ScatterPoint-4" d="M30.52,83.71a2.36,2.36,0,1,0,2.36-2.36A2.36,2.36,0,0,0,30.52,83.71Zm.94,0a1.42,1.42,0,1,1,1.42,1.42A1.43,1.43,0,0,1,31.46,83.71Z"/>
416
- <circle class="cls-ScatterPoint-2" cx="32.88" cy="83.71" r="1.42"/>
417
- </g>
418
- </svg>
419
- `;
420
-
421
- var charts = /*#__PURE__*/Object.freeze({
422
- __proto__: null,
423
- Area100Stacked: Area100Stacked,
424
- AreaGrouped: AreaGrouped,
425
- AreaStacked: AreaStacked,
426
- Bar100Stacked: Bar100Stacked,
427
- BarGrouped: BarGrouped,
428
- BarStacked: BarStacked,
429
- Column100Stacked: Column100Stacked,
430
- ColumnGrouped: ColumnGrouped,
431
- ColumnStacked: ColumnStacked,
432
- Line100Stacked: Line100Stacked,
433
- LineGrouped: LineGrouped,
434
- LineStacked: LineStacked,
435
- Pie: Pie,
436
- ScatterBubble: ScatterBubble,
437
- ScatterLine: ScatterLine,
438
- ScatterPoint: ScatterPoint
439
- });
440
-
441
- class SvgPipe {
442
- constructor(sanitizer) {
443
- this.sanitizer = sanitizer;
444
- }
445
- transform(markup) {
446
- return this.sanitizer.bypassSecurityTrustHtml(markup);
447
- }
448
- }
449
- SvgPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: SvgPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
450
- SvgPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: SvgPipe, name: "svg" });
451
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: SvgPipe, decorators: [{
452
- type: Pipe,
453
- args: [{
454
- name: 'svg'
455
- }]
456
- }], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
457
-
458
- class IgxChartMenuComponent {
459
- get width() {
460
- return this.fullScreen ? this._width : 0.7 * this._width;
461
- }
462
- set width(value) {
463
- this._width = value;
464
- }
465
- get height() {
466
- return this.fullScreen ? this._height : 0.7 * this._height;
467
- }
468
- set height(value) {
469
- this._height = value;
470
- }
471
- constructor(element) {
472
- this.element = element;
473
- this.onClose = new EventEmitter();
474
- this.chartDialogResizeNotify = new Subject();
475
- this.allCharts = [];
476
- this.fullScreen = false;
477
- this.isConfigAreaExpanded = false;
478
- this.mainChartTypes = ['Column', 'Area', 'Bar', 'Line', 'Scatter', 'Pie'];
479
- this.images = charts;
480
- }
481
- ngAfterViewInit() {
482
- this.contentObserver = new ResizeObserver((args) => this.chartDialogResizeNotify.next(args));
483
- this.contentObserver.observe(this.element.nativeElement);
484
- this.createChart(this.currentChartType);
485
- }
486
- toggleFullScreen() {
487
- this.fullScreen = !this.fullScreen;
488
- }
489
- hasAvailableChart(chartType) {
490
- return this.allCharts.some(c => c.includes(chartType));
491
- }
492
- createChart(chartType) {
493
- this.currentChartType = chartType;
494
- this.title = chartType.split(/(?=[A-Z])/).toString().replace(',', ' ');
495
- this.chartArea.clear();
496
- this.chartDirective.chartFactory(chartType, this.chartArea);
497
- }
498
- }
499
- IgxChartMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxChartMenuComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
500
- IgxChartMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: IgxChartMenuComponent, selector: "igx-chart-menu", outputs: { onClose: "onClose" }, host: { properties: { "style.width.px": "this.width", "style.height.px": "this.height" } }, viewQueries: [{ propertyName: "chartArea", first: true, predicate: ["chartArea"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"header\">\r\n <span class=\"header-text\">\r\n {{ title }} Chart\r\n </span>\r\n <span class=\"action-buttons-wrapper\">\r\n <button igxButton=\"icon\" (click)=\"toggleFullScreen()\">\r\n <igx-icon class=\"material\">fullscreen{{fullScreen ? '_exit' : ''}}</igx-icon>\r\n </button>\r\n <button igxButton=\"icon\" (click)=\"onClose.emit()\">\r\n <igx-icon class=\"material\">close</igx-icon>\r\n </button>\r\n </span>\r\n</div>\r\n<div class=\"selection-area ig-scrollbar\">\r\n <igc-trial-watermark></igc-trial-watermark>\r\n <div class=\"chart-area\" [ngClass]=\"{'expanded': isConfigAreaExpanded}\">\r\n <ng-template #chartArea ></ng-template>\r\n </div>\r\n <div>\r\n <button igxButton=\"icon\" igxRipple (click)=\"isConfigAreaExpanded = !isConfigAreaExpanded\">\r\n <igx-icon family=\"material\">chevron_{{ isConfigAreaExpanded ? 'left': 'right'}}</igx-icon>\r\n </button>\r\n </div>\r\n <div #configArea [ngClass]=\"{'chart-config-area': true, 'opened': !isConfigAreaExpanded, 'closed': isConfigAreaExpanded }\">\r\n <div class=\"config-area-header\">\r\n <span>Chart Types</span>\r\n </div>\r\n <igx-divider class=\"divider\"></igx-divider>\r\n <div class=\"wrapper\" *ngFor=\"let chartType of mainChartTypes\">\r\n <ng-container *ngIf=\"hasAvailableChart(chartType)\">\r\n <div>{{chartType | titlecase}} Chart</div>\r\n <div class=\"types-section\">\r\n <ng-container *ngFor=\"let chart of allCharts\">\r\n <span *ngIf=\"chart.startsWith(chartType)\" class=\"types-section-btn\" title=\"{{chart}}\"\r\n [ngClass]=\"{'selected': chart === currentChartType}\" (click)=\"createChart(chart)\">\r\n <div [innerHTML]=\"images[chart] | svg\">\r\n </div>\r\n </span>\r\n </ng-container>\r\n </div>\r\n <igx-divider></igx-divider>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".ig-chart-legend-items-list{height:20%;display:inline-flex;flex-wrap:wrap;margin-bottom:1rem}igx-chart-menu{display:flex;flex-flow:column;overflow:hidden;background-color:#fff;transition:width .2s ease-in-out,height .3s ease-in-out}.header{height:10%;background-color:#e0e0e0;display:flex;font-size:1.8rem}.header .action-buttons-wrapper{margin-left:auto;margin-right:10px;align-self:center}.header .header-text{margin-right:auto;align-self:center;margin-left:3rem}.selection-area{width:100%;height:90%;display:inline-flex;flex-flow:row}.selection-area,.selection-area .ig-scrollbar{--scrollbar-size: var(--ig-scrollbar-scrollbar-size, 8px);--thumb-background: var(--ig-scrollbar-thumb-background, hsla(var(--ig-gray-400), var(--ig-gray-a)));--track-background: var(--ig-scrollbar-track-background, hsla(var(--ig-gray-100), var(--ig-gray-a)))}.selection-area .chart-area{margin-top:1rem;overflow-y:hidden;overflow-x:hidden;width:100%}.selection-area .chart-config-area{transition:all;transition-duration:.3s;transition-timing-function:ease-in-out}.selection-area .chart-config-area.opened{width:25%;overflow-y:auto;overflow-x:hidden}.selection-area .chart-config-area.closed{width:0;transform:translate(100%)}.selection-area .chart-config-area .config-area-header{margin-bottom:3px;font-size:1rem;font-weight:700;text-align:center}.selection-area .chart-config-area .types-section-btn{width:40%;margin-right:5px;cursor:pointer}.selection-area .chart-config-area .types-section-btn.selected{opacity:.5}.selection-area .wrapper{padding:3px}.selection-area .wrapper .types-section{display:flex;flex-wrap:wrap}.selection-area .wrapper .igx-divider{margin:5px!important;background:black!important}\n"], dependencies: [{ kind: "directive", type: i1$1.IgxButtonDirective, selector: "[igxButton]", inputs: ["selected", "igxButton", "igxButtonColor", "igxButtonBackground", "igxLabel", "disabled"], outputs: ["buttonClick", "buttonSelected"] }, { kind: "directive", type: i1$1.IgxDividerDirective, selector: "igx-divider", inputs: ["id", "role", "type", "middle", "vertical", "inset"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.IgxIconComponent, selector: "igx-icon", inputs: ["family", "active", "name"] }, { kind: "directive", type: i1$1.IgxRippleDirective, selector: "[igxRipple]", inputs: ["igxRippleTarget", "igxRipple", "igxRippleDuration", "igxRippleCentered", "igxRippleDisabled"] }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: SvgPipe, name: "svg" }], encapsulation: i0.ViewEncapsulation.None });
501
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxChartMenuComponent, decorators: [{
502
- type: Component,
503
- args: [{ selector: 'igx-chart-menu', encapsulation: ViewEncapsulation.None, template: "<div class=\"header\">\r\n <span class=\"header-text\">\r\n {{ title }} Chart\r\n </span>\r\n <span class=\"action-buttons-wrapper\">\r\n <button igxButton=\"icon\" (click)=\"toggleFullScreen()\">\r\n <igx-icon class=\"material\">fullscreen{{fullScreen ? '_exit' : ''}}</igx-icon>\r\n </button>\r\n <button igxButton=\"icon\" (click)=\"onClose.emit()\">\r\n <igx-icon class=\"material\">close</igx-icon>\r\n </button>\r\n </span>\r\n</div>\r\n<div class=\"selection-area ig-scrollbar\">\r\n <igc-trial-watermark></igc-trial-watermark>\r\n <div class=\"chart-area\" [ngClass]=\"{'expanded': isConfigAreaExpanded}\">\r\n <ng-template #chartArea ></ng-template>\r\n </div>\r\n <div>\r\n <button igxButton=\"icon\" igxRipple (click)=\"isConfigAreaExpanded = !isConfigAreaExpanded\">\r\n <igx-icon family=\"material\">chevron_{{ isConfigAreaExpanded ? 'left': 'right'}}</igx-icon>\r\n </button>\r\n </div>\r\n <div #configArea [ngClass]=\"{'chart-config-area': true, 'opened': !isConfigAreaExpanded, 'closed': isConfigAreaExpanded }\">\r\n <div class=\"config-area-header\">\r\n <span>Chart Types</span>\r\n </div>\r\n <igx-divider class=\"divider\"></igx-divider>\r\n <div class=\"wrapper\" *ngFor=\"let chartType of mainChartTypes\">\r\n <ng-container *ngIf=\"hasAvailableChart(chartType)\">\r\n <div>{{chartType | titlecase}} Chart</div>\r\n <div class=\"types-section\">\r\n <ng-container *ngFor=\"let chart of allCharts\">\r\n <span *ngIf=\"chart.startsWith(chartType)\" class=\"types-section-btn\" title=\"{{chart}}\"\r\n [ngClass]=\"{'selected': chart === currentChartType}\" (click)=\"createChart(chart)\">\r\n <div [innerHTML]=\"images[chart] | svg\">\r\n </div>\r\n </span>\r\n </ng-container>\r\n </div>\r\n <igx-divider></igx-divider>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".ig-chart-legend-items-list{height:20%;display:inline-flex;flex-wrap:wrap;margin-bottom:1rem}igx-chart-menu{display:flex;flex-flow:column;overflow:hidden;background-color:#fff;transition:width .2s ease-in-out,height .3s ease-in-out}.header{height:10%;background-color:#e0e0e0;display:flex;font-size:1.8rem}.header .action-buttons-wrapper{margin-left:auto;margin-right:10px;align-self:center}.header .header-text{margin-right:auto;align-self:center;margin-left:3rem}.selection-area{width:100%;height:90%;display:inline-flex;flex-flow:row}.selection-area,.selection-area .ig-scrollbar{--scrollbar-size: var(--ig-scrollbar-scrollbar-size, 8px);--thumb-background: var(--ig-scrollbar-thumb-background, hsla(var(--ig-gray-400), var(--ig-gray-a)));--track-background: var(--ig-scrollbar-track-background, hsla(var(--ig-gray-100), var(--ig-gray-a)))}.selection-area .chart-area{margin-top:1rem;overflow-y:hidden;overflow-x:hidden;width:100%}.selection-area .chart-config-area{transition:all;transition-duration:.3s;transition-timing-function:ease-in-out}.selection-area .chart-config-area.opened{width:25%;overflow-y:auto;overflow-x:hidden}.selection-area .chart-config-area.closed{width:0;transform:translate(100%)}.selection-area .chart-config-area .config-area-header{margin-bottom:3px;font-size:1rem;font-weight:700;text-align:center}.selection-area .chart-config-area .types-section-btn{width:40%;margin-right:5px;cursor:pointer}.selection-area .chart-config-area .types-section-btn.selected{opacity:.5}.selection-area .wrapper{padding:3px}.selection-area .wrapper .types-section{display:flex;flex-wrap:wrap}.selection-area .wrapper .igx-divider{margin:5px!important;background:black!important}\n"] }]
504
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { chartArea: [{
505
- type: ViewChild,
506
- args: ['chartArea', { read: ViewContainerRef }]
507
- }], onClose: [{
508
- type: Output
509
- }], width: [{
510
- type: HostBinding,
511
- args: ['style.width.px']
512
- }], height: [{
513
- type: HostBinding,
514
- args: ['style.height.px']
515
- }] } });
516
-
517
- // tslint:disable: max-line-length
518
- const Clear = `
519
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
520
- <defs>
521
- <style>.cls-Clear-1{fill-rule:evenodd;}.cls-Clear-2{fill:none;}</style>
522
- </defs>
523
- <g id="Layer_2" data-name="Layer 2">
524
- <g id="Layer_1-2" data-name="Layer 1">
525
- <g id="Conditional-formating">
526
- <g id="Artboard">
527
- <g id="refresh-24px">
528
- <path id="Path" class="cls-Clear-1" d="M17.65,6.35A8,8,0,1,0,19.73,14H17.65A6,6,0,1,1,12,6a5.91,5.91,0,0,1,4.22,1.78L13,11h7V4Z"/>
529
- <polygon class="cls-Clear-2" points="0 0 24 0 24 24 0 24 0 0"/>
530
- </g>
531
- </g>
532
- </g>
533
- </g>
534
- </g>
535
- </svg>
536
- `;
537
- const ColorScale = `
538
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
539
- <path d="M13 13.65h5a5.63 5.63 0 00-.09-1H13zM13 10.65h4.19a6.29 6.29 0 00-.74-1H13zM13 19.58a5.87 5.87 0 002.34-.93H13zM13 6.18v1.48h1.48l-1-1-.48-.48zM13 15.65v1h4.2a5.68 5.68 0 00.46-1zM11 6.18L7.76 9.43A6 6 0 0011 19.58z" fill="none"/>
540
- <path d="M16.45 9.65H13v1h4.19a6.29 6.29 0 00-.74-1zM13.48 6.66L13 6.18v1.48h1.48l-1-1zM6 13.66a6 6 0 005 5.92V6.18L7.76 9.42A6 6 0 006 13.66zM13 19.58a5.87 5.87 0 002.34-.93H13zM13 16.65h4.2a5.68 5.68 0 00.46-1H13zM13 12.65v1h5a5.63 5.63 0 00-.09-1z" fill="none"/>
541
- <path d="M19.93 12.66a7.84 7.84 0 00-.51-2 8.48 8.48 0 00-.5-1A7.8 7.8 0 0017.66 8l-.35-.36-.31-.26-.73-.73-2-2-.85-.84L12 2.34 6.34 8A8 8 0 0011 21.58h.21a7 7 0 00.79 0 7.14 7.14 0 00.8 0h.2a7.94 7.94 0 006.93-8.92zM11 19.58A6 6 0 017.76 9.42L11 6.18zm2-12.93v-.47l.48.47 1 1H13zm0 3h3.45a6.29 6.29 0 01.74 1H13zm0 9.93v-.93h2.34a5.87 5.87 0 01-2.34.93zm4.2-2.93H13v-1h4.66a5.68 5.68 0 01-.46 1zm-4.2-3v-1h4.91a5.63 5.63 0 01.09 1z"/>
542
- <path d="M0 0h24v24H0z" fill="none"/>
543
- </svg>
544
-
545
- `;
546
- const DataBars = `
547
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
548
- <path d="M3 7h12v2H3zM3 15h12v2H3zM3 19h18v2H3zM3 11h18v2H3zM3 3h18v2H3z"/>
549
- <path d="M0 0h24v24H0z" fill="none"/>
550
- </svg>
551
-
552
- `;
553
- const DuplicateValues = `
554
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
555
- <path d="M4.94 10.56a1 1 0 00-.38.79.79.79 0 00.25.63 1.06 1.06 0 00.74.24 1.9 1.9 0 001.06-.3 1.48 1.48 0 00.63-.67v-1H6a1.58 1.58 0 00-1.06.31zM16.94 14.69a1 1 0 00-.38.79.82.82 0 00.25.63 1.11 1.11 0 00.74.23 2 2 0 001.06-.29 1.5 1.5 0 00.63-.68v-1H18a1.54 1.54 0 00-1.06.32z" fill="none"/>
556
- <path d="M4.94 10.56a1 1 0 00-.38.79.79.79 0 00.25.63 1.06 1.06 0 00.74.24 1.9 1.9 0 001.06-.3 1.48 1.48 0 00.63-.67v-1H6a1.58 1.58 0 00-1.06.31zM16.94 14.69a1 1 0 00-.38.79.82.82 0 00.25.63 1.11 1.11 0 00.74.23 2 2 0 001.06-.29 1.5 1.5 0 00.63-.68v-1H18a1.54 1.54 0 00-1.06.32z" fill="none"/>
557
- <path d="M20.76 15.87v-3.06a2.17 2.17 0 00-.76-1.76 3 3 0 00-1.94-.61 3.06 3.06 0 00-2 .63 1.7 1.7 0 00-.73 1.45h1.49a.83.83 0 01.31-.66 1.29 1.29 0 01.84-.25 1.26 1.26 0 01.91.3 1.09 1.09 0 01.32.85v.6H18a3.81 3.81 0 00-2.22.56 1.78 1.78 0 00-.78 1.59 2 2 0 00.58 1.49 2.31 2.31 0 001.65.55 2.12 2.12 0 001.16-.33 2.79 2.79 0 00.83-.81 4.33 4.33 0 00.08.5c0 .16.08.33.13.51H21a4.29 4.29 0 01-.18-.77 5.46 5.46 0 01-.06-.78zm-1.52-.5a1.5 1.5 0 01-.63.68 2 2 0 01-1.06.29 1.11 1.11 0 01-.74-.23.82.82 0 01-.25-.63 1 1 0 01.38-.79 1.54 1.54 0 011.06-.34h1.24zM8.76 11.75V8.69A2.16 2.16 0 008 6.93a2.93 2.93 0 00-1.94-.61 3.06 3.06 0 00-2 .63 1.69 1.69 0 00-.73 1.44h1.5a.83.83 0 01.31-.65A1.3 1.3 0 016 7.52a1.23 1.23 0 01.91.31 1.07 1.07 0 01.32.84v.61H6a3.74 3.74 0 00-2.22.56A1.78 1.78 0 003 11.39a2 2 0 00.58 1.52 2.27 2.27 0 001.65.56 2.12 2.12 0 001.16-.33 2.79 2.79 0 00.83-.81 4.17 4.17 0 00.08.49 4.77 4.77 0 00.13.51H9a4 4 0 01-.18-.76 5.55 5.55 0 01-.06-.82zm-1.52-.5a1.48 1.48 0 01-.63.67 1.9 1.9 0 01-1.06.3 1.06 1.06 0 01-.74-.22.79.79 0 01-.25-.63 1 1 0 01.38-.79A1.58 1.58 0 016 10.23h1.24zM7 19h2v2H7zM7 15h2v2H7zM3 15h2v2H3zM15 7h2v2h-2zM15 3h2v2h-2zM3 19h2v2H3zM19 19h2v2h-2zM19 7h2v2h-2zM15 19h2v2h-2zM19 3h2v2h-2zM11 11h2v2h-2zM11 19h2v2h-2zM11 15h2v2h-2zM11 7h2v2h-2zM11 3h2v2h-2zM7 3h2v2H7zM3 3h2v2H3z"/>
558
- <path d="M0 0h24v24H0z" fill="none"/>
559
- </svg>
560
-
561
- `;
562
- const Empty = `
563
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
564
- <path d="M0 0h24v24H0z" fill="none"/>
565
- <path d="M5 17h2v2H5zM13 17h2v2h-2zM5 13h2v2H5zM17 17h2v2h-2zM13 5h2v2h-2zM9 17h2v2H9zM17 9h2v2h-2zM17 13h2v2h-2zM17 5h2v2h-2zM5 9h2v2H5zM5 5h2v2H5zM9 5h2v2H9z"/>
566
- <path d="M0 0h24v24H0z" fill="none"/>
567
- </svg>
568
-
569
- `;
570
- const Equal = `
571
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
572
- <path d="M5 13.5h14v2H5zM5 8.5h14v2H5z"/>
573
- </svg>
574
-
575
- `;
576
- const GreaterThan = `
577
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
578
- <path d="M6 7.11L15.09 12 6 16.89V19l12-6.46v-1.08L6 5v2.11z"/>
579
- </svg>
580
-
581
- `;
582
- const TextContains = `
583
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
584
- <path d="M10.79 12.77a1.16 1.16 0 00-.44.9.92.92 0 00.3.72 1.18 1.18 0 00.84.27 2.27 2.27 0 001.21-.34 1.61 1.61 0 00.71-.77v-1.17H12a1.76 1.76 0 00-1.21.39z" fill="none"/>
585
- <path d="M5 19h14V5H5zm8-9.36a1.45 1.45 0 00-1-.35 1.5 1.5 0 00-1 .29.93.93 0 00-.35.75H9a1.93 1.93 0 01.83-1.65 3.54 3.54 0 012.3-.72 3.34 3.34 0 012.22.7 2.44 2.44 0 01.84 2v3.5a5.57 5.57 0 00.07.93 4.51 4.51 0 00.21.88h-1.83c-.06-.2-.12-.39-.16-.58a3.72 3.72 0 01-.08-.57 3.05 3.05 0 01-1 .93 2.39 2.39 0 01-1.32.37 2.63 2.63 0 01-1.89-.63 2.29 2.29 0 01-.66-1.74 2.07 2.07 0 01.9-1.78A4.39 4.39 0 0112 11.3h1.38v-.69a1.3 1.3 0 00-.38-.97z" fill="none"/>
586
- <path d="M3 3v18h18V3zm16 16H5V5h14z"/>
587
- <path d="M12 11.3a4.39 4.39 0 00-2.54.63 2.07 2.07 0 00-.9 1.78 2.29 2.29 0 00.66 1.74 2.63 2.63 0 001.89.63 2.39 2.39 0 001.32-.37 3.05 3.05 0 001-.93 3.72 3.72 0 00.08.57c0 .19.1.38.16.58h1.79a4.51 4.51 0 01-.21-.88 5.57 5.57 0 01-.07-.93v-3.5a2.44 2.44 0 00-.84-2 3.34 3.34 0 00-2.22-.7 3.54 3.54 0 00-2.3.72A1.93 1.93 0 009 10.29h1.71a.93.93 0 01.29-.71 1.5 1.5 0 011-.29 1.45 1.45 0 011 .35 1.3 1.3 0 01.37 1v.69zm1.4 1.08v1.17a1.61 1.61 0 01-.71.77 2.27 2.27 0 01-1.21.34 1.18 1.18 0 01-.84-.27.92.92 0 01-.3-.72 1.16 1.16 0 01.44-.9 1.76 1.76 0 011.22-.39z"/>
588
- <path d="M0 0h24v24H0z" fill="none"/>
589
- </svg>
590
-
591
- `;
592
- const Top10 = `
593
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
594
- <path d="M17.34 7.14a.5.5 0 00-.13.33v.33a.48.48 0 00.13.33.41.41 0 00.31.14.37.37 0 00.42-.37v-.41a.49.49 0 00-.07-.34.45.45 0 00-.62 0zM10.84 8a.54.54 0 00.51-.3 2.05 2.05 0 00.17-.92V5.3a2 2 0 00-.17-.94.6.6 0 00-1 0 2.13 2.13 0 00-.17.88V6.7a2.14 2.14 0 00.17 1 .55.55 0 00.49.3zM14.88 5c.28 0 .42-.18.42-.53v-.26a.53.53 0 00-.11-.34.4.4 0 00-.32-.14.42.42 0 00-.31.13.52.52 0 00-.12.36v.29a.49.49 0 00.12.34.39.39 0 00.32.15z" fill="none"/>
595
- <path d="M9 18h2v3h2v-3h2l-3-3-3 3zM4 11h16v2H4zM6.38 8.92h1.36V3.08h-.12l-2.57.89V5l1.33-.39v4.31zM10.84 9a1.85 1.85 0 001.5-.64 2.82 2.82 0 00.53-1.82V5.47a2.76 2.76 0 00-.54-1.82 1.83 1.83 0 00-1.5-.65 1.83 1.83 0 00-1.5.65 2.78 2.78 0 00-.53 1.82v1.07a2.79 2.79 0 00.53 1.81 1.86 1.86 0 001.51.65zm-.69-3.79a2.13 2.13 0 01.17-.88.6.6 0 011 0 2 2 0 01.17.94v1.47a2.05 2.05 0 01-.17.92.59.59 0 01-1 0 2.14 2.14 0 01-.17-1zM14.88 5.71a1.31 1.31 0 00.94-.33 1.11 1.11 0 00.35-.86v-.29a1.19 1.19 0 00-.35-.9 1.32 1.32 0 00-1-.33 1.34 1.34 0 00-.95.33 1.17 1.17 0 00-.35.88v.28a1.16 1.16 0 00.36.9 1.4 1.4 0 001 .32zm-.44-1.49a.52.52 0 01.12-.36.42.42 0 01.31-.13.4.4 0 01.32.14.53.53 0 01.11.34v.24c0 .35-.14.53-.42.53a.39.39 0 01-.32-.13.49.49 0 01-.12-.34zM15.13 8.48l2.85-4.56-.62-.32-2.85 4.57.62.31zM16.7 6.62a1.1 1.1 0 00-.35.87v.29a1.12 1.12 0 00.35.89 1.36 1.36 0 00.95.33 1.32 1.32 0 001-.33A1.15 1.15 0 0019 7.8v-.28a1.17 1.17 0 00-.36-.91 1.54 1.54 0 00-1.89 0zm1.38.87v.41a.37.37 0 01-.42.37.41.41 0 01-.31-.14.48.48 0 01-.13-.33v-.33a.5.5 0 01.13-.33.45.45 0 01.62 0 .49.49 0 01.11.35z"/>
596
- <path d="M0 0h24v24H0z" fill="none"/>
597
- </svg>
598
-
599
- `;
600
- const UniqueValues = `
601
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
602
- <path d="M0 0h24v24H0z" fill="none"/>
603
- <path d="M8.94 10.56a1 1 0 00-.38.79.79.79 0 00.25.63 1.06 1.06 0 00.74.24 1.9 1.9 0 001.06-.3 1.48 1.48 0 00.63-.67v-1H10a1.58 1.58 0 00-1.06.31z" fill="none"/>
604
- <path d="M8.94 10.56a1 1 0 00-.38.79.79.79 0 00.25.63 1.06 1.06 0 00.74.24 1.9 1.9 0 001.06-.3 1.48 1.48 0 00.63-.67v-1H10a1.58 1.58 0 00-1.06.31z" fill="none"/>
605
- <path d="M12.76 11.75V8.69A2.16 2.16 0 0012 6.93a2.93 2.93 0 00-1.94-.61 3.06 3.06 0 00-2 .63 1.69 1.69 0 00-.73 1.44h1.5a.83.83 0 01.31-.65 1.3 1.3 0 01.86-.22 1.23 1.23 0 01.91.31 1.07 1.07 0 01.32.84v.61H10a3.74 3.74 0 00-2.22.56A1.78 1.78 0 007 11.39a2 2 0 00.58 1.52 2.27 2.27 0 001.65.56 2.12 2.12 0 001.16-.33 2.79 2.79 0 00.83-.81 4.17 4.17 0 00.08.49 4.77 4.77 0 00.13.51H13a4 4 0 01-.18-.76 5.55 5.55 0 01-.06-.82zm-1.52-.5a1.48 1.48 0 01-.63.67 1.9 1.9 0 01-1.06.3 1.06 1.06 0 01-.74-.22.79.79 0 01-.25-.63 1 1 0 01.38-.79 1.58 1.58 0 011.06-.35h1.24zM7 19h2v2H7zM7 15h2v2H7zM3 15h2v2H3zM15 7h2v2h-2zM15 3h2v2h-2zM3 19h2v2H3zM19 19h2v2h-2zM19 7h2v2h-2zM15 19h2v2h-2zM19 3h2v2h-2zM15 11h2v2h-2zM19 11h2v2h-2zM15 15h2v2h-2zM19 15h2v2h-2zM11 19h2v2h-2zM11 15h2v2h-2zM11 3h2v2h-2zM7 3h2v2H7zM3 3h2v2H3zM3 7h2v2H3zM3 11h2v2H3z"/>
606
- <path d="M0 0h24v24H0z" fill="none"/>
607
- <path d="M0 0h24v24H0z" fill="none"/>
608
- </svg>
609
-
610
- `;
611
-
612
- var conditions = /*#__PURE__*/Object.freeze({
613
- __proto__: null,
614
- Clear: Clear,
615
- ColorScale: ColorScale,
616
- DataBars: DataBars,
617
- DuplicateValues: DuplicateValues,
618
- Empty: Empty,
619
- Equal: Equal,
620
- GreaterThan: GreaterThan,
621
- TextContains: TextContains,
622
- Top10: Top10,
623
- UniqueValues: UniqueValues
624
- });
625
-
626
- var CHART_TYPE;
627
- (function (CHART_TYPE) {
628
- CHART_TYPE["PIE"] = "Pie";
629
- CHART_TYPE["COLUMN_GROUPED"] = "ColumnGrouped";
630
- CHART_TYPE["AREA_GROUPED"] = "AreaGrouped";
631
- CHART_TYPE["LINE_GROUPED"] = "LineGrouped";
632
- CHART_TYPE["BAR_GROUPED"] = "BarGrouped";
633
- CHART_TYPE["COLUMN_STACKED"] = "ColumnStacked";
634
- CHART_TYPE["AREA_STACKED"] = "AreaStacked";
635
- CHART_TYPE["LINE_STACKED"] = "LineStacked";
636
- CHART_TYPE["BAR_STACKED"] = "BarStacked";
637
- CHART_TYPE["COLUMN_100_STACKED"] = "Column100Stacked";
638
- CHART_TYPE["AREA_100_STACKED"] = "Area100Stacked";
639
- CHART_TYPE["LINE_100_STACKED"] = "Line100Stacked";
640
- CHART_TYPE["BAR_100_STACKED"] = "Bar100Stacked";
641
- CHART_TYPE["SCATTER_POINT"] = "ScatterPoint";
642
- CHART_TYPE["SCATTER_BUBBLE"] = "ScatterBubble";
643
- CHART_TYPE["SCATTER_LINE"] = "ScatterLine";
644
- })(CHART_TYPE || (CHART_TYPE = {}));
645
- var OPTIONS_TYPE;
646
- (function (OPTIONS_TYPE) {
647
- OPTIONS_TYPE["CHART"] = "chartOptions";
648
- OPTIONS_TYPE["SERIES"] = "seriesModel";
649
- OPTIONS_TYPE["X_AXIS"] = "xAxisOptions";
650
- OPTIONS_TYPE["Y_AXIS"] = "yAxisOptions";
651
- OPTIONS_TYPE["STACKED_SERIES"] = "stackedFragmentOptions";
652
- })(OPTIONS_TYPE || (OPTIONS_TYPE = {}));
653
-
654
- class IgxContextMenuComponent {
655
- constructor(overlayService) {
656
- this.overlayService = overlayService;
657
- this.chartTypes = [];
658
- this.textFormatters = [];
659
- this.destroy$ = new Subject();
660
- this._chartDialogOS = { closeOnOutsideClick: false };
661
- this._tabsMenuOverlaySettings = {
662
- closeOnOutsideClick: false,
663
- modal: false,
664
- outlet: null,
665
- scrollStrategy: new CloseScrollStrategy(),
666
- positionStrategy: new AutoPositionStrategy({
667
- horizontalDirection: HorizontalAlignment.Center,
668
- horizontalStartPoint: HorizontalAlignment.Center,
669
- verticalStartPoint: VerticalAlignment.Bottom,
670
- verticalDirection: VerticalAlignment.Bottom,
671
- openAnimation: null,
672
- closeAnimation: null
673
- })
674
- };
675
- this._chartPreviewDialogOverlaySettings = {
676
- closeOnOutsideClick: false,
677
- modal: false,
678
- outlet: null,
679
- scrollStrategy: new CloseScrollStrategy(),
680
- positionStrategy: new AutoPositionStrategy({
681
- horizontalDirection: HorizontalAlignment.Center,
682
- horizontalStartPoint: HorizontalAlignment.Center,
683
- verticalStartPoint: VerticalAlignment.Top,
684
- verticalDirection: VerticalAlignment.Top,
685
- openAnimation: null,
686
- closeAnimation: null
687
- })
688
- };
689
- this.chartImages = charts;
690
- this.conditionImages = conditions;
691
- }
692
- ngAfterViewInit() {
693
- this.chartTypes = this.contextDirective.charts;
694
- this.textFormatters = this.contextDirective.formatters;
695
- if (this.contextDirective.chartsDirective) {
696
- this.contextDirective.chartsDirective.onChartTypesDetermined.pipe(takeUntil(this.destroy$))
697
- .subscribe((args) => this.chartTypes = args.chartsForCreation);
698
- }
699
- if (this.contextDirective.textFormatter) {
700
- this.contextDirective.textFormatter.onFormattersReady.pipe(takeUntil(this.destroy$))
701
- .subscribe(names => this.textFormatters = names);
702
- }
703
- this.contextDirective.onButtonClose.pipe(takeUntil(this.destroy$))
704
- .subscribe(() => {
705
- if (this.tabsMenu && !this.tabsMenu.collapsed) {
706
- this.tabsMenu.close();
707
- }
708
- });
709
- this.contextDirective.gridResizeNotify.pipe(takeUntil(this.destroy$))
710
- .subscribe(() => {
711
- if (!this.tabsMenu.collapsed) {
712
- this.tabsMenu.close();
713
- }
714
- });
715
- this.tabsMenu.opening.pipe(takeUntil(this.destroy$))
716
- .subscribe(() => {
717
- if (this.tabs.selectedItem.disabled) {
718
- debugger;
719
- // const i = this.tabs.items.find(tab => !tab.disabled)?.index || 0;
720
- // this.tabs.selectTab(this.tabs.tabs.toArray()[i], true);
721
- }
722
- });
723
- this.overlayService.opening.pipe(takeUntil(this.destroy$))
724
- .subscribe((args) => {
725
- var _a, _b;
726
- if (args.componentRef) {
727
- const instance = args.componentRef.instance;
728
- instance.width = this.contextDirective.grid.nativeElement.clientWidth;
729
- instance.height = this.contextDirective.grid.nativeElement.clientHeight;
730
- instance.currentChartType = this.currentChartType;
731
- instance.allCharts = this.chartTypes;
732
- instance.chartDirective = this.contextDirective.chartsDirective;
733
- (_a = instance.onClose) === null || _a === void 0 ? void 0 : _a.subscribe(() => {
734
- this.closeDialog();
735
- });
736
- (_b = instance.chartDialogResizeNotify) === null || _b === void 0 ? void 0 : _b.subscribe(resizedContentArgs => {
737
- // This is a temporary fix, which should be removed right after
738
- // the overlay service is capable of notifying the overlay content elements
739
- // that their children has been resized.
740
- if (this.overlayService._overlayElement.children[1]) {
741
- // tslint:disable-next-line: max-line-length
742
- this.overlayService._overlayElement.children[1].children[0].style.width = resizedContentArgs[0].contentRect.width + 'px';
743
- }
744
- });
745
- }
746
- });
747
- this.overlayService.closing.pipe(takeUntil(this.destroy$))
748
- .subscribe((args) => {
749
- if (args.componentRef && args.componentRef.instance instanceof IgxChartMenuComponent) {
750
- if (this._dialogId) {
751
- this.tabsMenu.open(this._tabsMenuOverlaySettings);
752
- }
753
- }
754
- });
755
- }
756
- ngOnDestroy() {
757
- this.destroy$.next(true);
758
- this.destroy$.complete();
759
- }
760
- toggleTabMenu() {
761
- this.currentChartType = this.currentChartType ? this.currentChartType : CHART_TYPE.COLUMN_GROUPED;
762
- this._tabsMenuOverlaySettings.target = this.button.nativeElement;
763
- this.tabsMenu.collapsed ? this.tabsMenu.open(this._tabsMenuOverlaySettings) : this.tabsMenu.close();
764
- }
765
- formatCells(condition) {
766
- this.currentFormatter = condition;
767
- this.contextDirective.textFormatter.formatCells(condition);
768
- }
769
- clearFormat() {
770
- this.contextDirective.textFormatter.clearFormatting();
771
- this.currentFormatter = undefined;
772
- }
773
- previewChart(currentChartType) {
774
- this.currentChartType = currentChartType;
775
- this.chartPreview.clear();
776
- this.contextDirective.chartsDirective.chartFactory(currentChartType, this.chartPreview);
777
- this._chartPreviewDialogOverlaySettings.target = this.tabsMenu.element;
778
- this.chartPreviewDialog.open(this._chartPreviewDialogOverlaySettings);
779
- }
780
- hidePreview() {
781
- this.chartPreviewDialog.close();
782
- }
783
- openDialog(type) {
784
- this.currentChartType = type ? type : this.currentChartType ? this.currentChartType : CHART_TYPE.COLUMN_GROUPED;
785
- this._dialogId = this._dialogId ? this._dialogId :
786
- this.overlayService.attach(IgxChartMenuComponent, this._chartDialogOS);
787
- this.tabsMenu.close();
788
- this.overlayService.show(this._dialogId);
789
- }
790
- closeDialog() {
791
- const info = this.overlayService.getOverlayById(this._dialogId);
792
- if (info) {
793
- this.overlayService.hide(this._dialogId);
794
- this.overlayService.detach(this._dialogId);
795
- this._dialogId = undefined;
796
- }
797
- }
798
- }
799
- IgxContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxContextMenuComponent, deps: [{ token: i1$1.IgxOverlayService }], target: i0.ɵɵFactoryTarget.Component });
800
- IgxContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: IgxContextMenuComponent, selector: "igx-context-menu", viewQueries: [{ propertyName: "button", first: true, predicate: ["analyticsBtn"], descendants: true }, { propertyName: "tabsMenu", first: true, predicate: ["tabsMenu"], descendants: true, read: IgxToggleDirective }, { propertyName: "chartPreview", first: true, predicate: ["chartPreview"], descendants: true, read: ViewContainerRef }, { propertyName: "chartPreviewDialog", first: true, predicate: ["chartPreviewDialog"], descendants: true, read: IgxToggleDirective }, { propertyName: "tabs", first: true, predicate: IgxTabsComponent, descendants: true }], ngImport: i0, template: "<span #analyticsBtn class=\"analytics-btn\">\r\n <button #btn igxButton=\"icon\" (click)=\"toggleTabMenu()\">\r\n <igx-icon #icon class=\"icon\" family=\"material\">insert_chart_outlined</igx-icon>\r\n </button>\r\n</span>\r\n<div #tabsMenu igxToggle class=\"toggle-content ig-scrollbar\">\r\n <!--NOTE: This component has been updated by Infragistics migration: v12.0.0\r\nPlease check your template whether all bindings/event handlers are correct.-->\r\n <igx-tabs tabsType=\"fixed\" [selectedIndex]=\"!this.textFormatters.length && chartTypes.length ? 1 : 0\">\r\n <igx-tab-item [disabled]=\"!textFormatters.length\">\r\n <igx-tab-header>\r\n <span igxTabHeaderLabel>Conditional Formatting</span>\r\n </igx-tab-header>\r\n <igx-tab-content>\r\n <igc-trial-watermark></igc-trial-watermark>\r\n <div class=\"tabs\">\r\n <span class=\"tab-option\">\r\n <span *ngFor=\"let condition of textFormatters\" class=\"action btn condition\"\r\n [ngClass]=\"{'selected--condition': condition === currentFormatter}\"\r\n (click)=\"formatCells(condition)\">\r\n <div class=\"imgSize\" [innerHTML]=\"conditionImages[condition.replace(' ', '')] | svg\">\r\n </div>\r\n <span class=\"name\">{{condition.replace('10', '10%')}}</span>\r\n </span>\r\n </span>\r\n <span class=\"clear action\"\r\n [ngClass]=\"{'disableButton': contextDirective.textFormatter ? !contextDirective.textFormatter.formatter : true }\"\r\n (click)=\"clearFormat()\">\r\n <div class=\"imgSize\" [innerHTML]=\"conditionImages['Clear'] | svg\">\r\n </div>\r\n <span class=\"btn name\">Clear All</span>\r\n </span>\r\n </div>\r\n </igx-tab-content>\r\n </igx-tab-item>\r\n <igx-tab-item [disabled]=\"!chartTypes.length\">\r\n <igx-tab-header>\r\n <span igxTabHeaderLabel>Create Chart</span>\r\n </igx-tab-header>\r\n <igx-tab-content>\r\n <igc-trial-watermark></igc-trial-watermark>\r\n <div class=\"tabs\">\r\n <span class=\"tab-option\">\r\n <span *ngFor=\"let chart of chartTypes | slice:0:4\" class=\"action btn chart\"\r\n [ngClass]=\"{'selected': chart === currentChartType}\" (mouseenter)=\"previewChart(chart)\"\r\n (mouseleave)=\"hidePreview()\" (click)=\"openDialog(chart)\">\r\n <span [innerHTML]=\"chartImages[chart] | svg\" class=\"imgSize\">\r\n </span>\r\n <span class=\"name\">{{chart}}</span>\r\n </span>\r\n </span>\r\n <span class=\"more-action chart\" [ngClass]=\"{'disableButton': !chartTypes.length}\"\r\n (click)=\"openDialog()\">\r\n <button class=\"more-btn more-icon\" igxButton=\"icon\" igxButtonBackground=\"#EBEBEB\"\r\n igxButtonColor=\"black\">\r\n <igx-icon class=\"icon\" family=\"material\">more_horiz</igx-icon>\r\n </button>\r\n <span class=\"name btn\">More...</span>\r\n </span>\r\n </div>\r\n </igx-tab-content>\r\n </igx-tab-item>\r\n </igx-tabs>\r\n</div>\r\n<div igxToggle #chartPreviewDialog class=\"chart-preview\">\r\n <div class=\"chart-preview-title\">\r\n <h5>Preview Chart</h5>\r\n </div>\r\n <div class=\"chart-preview-area\">\r\n <ng-template #chartPreview></ng-template>\r\n </div>\r\n</div>", styles: [".analytics-btn,.analytics-btn [igxButton=flat],.analytics-btn .igx-button--flat{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, transparent);--hover-border-color: var(--igx-button-hover-border-color, transparent);--focus-border-color: var(--igx-button-focus-border-color, transparent);--focus-visible-border-color: var(--igx-button-focus-visible-border-color, transparent);--active-border-color: var(--igx-button-active-border-color, transparent);--disabled-border-color: var(--igx-button-disabled-border-color, transparent);--disabled-background: var(--igx-button-disabled-background, transparent);--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-0));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-0));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-0));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-0));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-secondary-400), .12));--active-foreground: var(--igx-button-active-foreground, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-0));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-0));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-0));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-0))}.analytics-btn,.analytics-btn [igxButton=outlined],.analytics-btn .igx-button--outlined{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--hover-border-color: var(--igx-button-hover-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--focus-border-color: var(--igx-button-focus-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--focus-visible-border-color: var(--igx-button-focus-visible-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--active-border-color: var(--igx-button-active-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--disabled-border-color: var(--igx-button-disabled-border-color, hsla(var(--ig-gray-300), var(--ig-gray-a)));--disabled-background: var(--igx-button-disabled-background, transparent);--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-0));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-0));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-0));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-0));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-secondary-400), .12));--active-foreground: var(--igx-button-active-foreground, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-0));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-0));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-0));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-0))}.analytics-btn,.analytics-btn [igxButton=raised],.analytics-btn .igx-button--raised{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, transparent);--hover-border-color: var(--igx-button-hover-border-color, transparent);--focus-border-color: var(--igx-button-focus-border-color, transparent);--focus-visible-border-color: var(--igx-button-focus-visible-border-color, transparent);--active-border-color: var(--igx-button-active-border-color, transparent);--disabled-border-color: var(--igx-button-disabled-border-color, transparent);--disabled-background: var(--igx-button-disabled-background, hsla(var(--ig-gray-300), var(--ig-gray-a)));--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-2));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-4));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-8));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-8));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-secondary-300), var(--ig-secondary-a)));--active-foreground: var(--igx-button-active-foreground, var(--ig-secondary-300-contrast));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-2));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-4));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-8));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-8))}.analytics-btn,.analytics-btn [igxButton=fab],.analytics-btn .igx-button--fab{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, transparent);--hover-border-color: var(--igx-button-hover-border-color, transparent);--focus-border-color: var(--igx-button-focus-border-color, transparent);--focus-visible-border-color: var(--igx-button-focus-visible-border-color, transparent);--active-border-color: var(--igx-button-active-border-color, transparent);--disabled-border-color: var(--igx-button-disabled-border-color, transparent);--disabled-background: var(--igx-button-disabled-background, hsla(var(--ig-gray-300), var(--ig-gray-a)));--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-6));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-12));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-12));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-12));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-secondary-300), var(--ig-secondary-a)));--active-foreground: var(--igx-button-active-foreground, var(--ig-secondary-300-contrast));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-6));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-12));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-12));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-12))}.analytics-btn,.analytics-btn [igxButton=icon],.analytics-btn .igx-button--icon{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, transparent);--hover-border-color: var(--igx-button-hover-border-color, transparent);--focus-border-color: var(--igx-button-focus-border-color, hsla(var(--ig-gray-400), var(--ig-gray-a)));--focus-visible-border-color: var(--igx-button-focus-visible-border-color, hsla(var(--ig-gray-400), var(--ig-gray-a)));--active-border-color: var(--igx-button-active-border-color, hsla(var(--ig-gray-400), var(--ig-gray-a)));--disabled-border-color: var(--igx-button-disabled-border-color, transparent);--disabled-background: var(--igx-button-disabled-background, transparent);--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-0));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-0));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-0));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-0));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-gray-200), var(--ig-gray-a)));--active-foreground: var(--igx-button-active-foreground, hsla(var(--ig-gray-900), var(--ig-gray-a)));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-0));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-0));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-0));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-0))}.disableButton{opacity:.4;pointer-events:none}.clear,.more-action{display:flex;flex-flow:column;justify-content:center;border-left:1px solid #bdbdbd}.clear .btn,.clear .more-btn,.more-action .btn,.more-action .more-btn{width:68px;margin:0 0 7px;padding:0}.clear .more-btn,.more-action .more-btn{width:36px;height:36px;align-self:center;border-radius:20px}.clear .name,.more-action .name{font-size:.9rem;font-weight:400;text-align:center}.icon{pointer-events:none}.btn{display:inline-flex;flex-flow:column;align-items:center}.btn.condition{padding-right:16px}.btn.chart{padding-right:24px}.btn img,.btn span{pointer-events:none}.chart-preview{width:350px;height:300px;background-color:#fff;overflow:hidden}.chart-preview .chart-preview-title{margin:1rem;justify-content:center}.chart-preview .chart-preview-area{height:270px}::ng-deep .toggle-content{width:354px;max-width:358px;height:148px;background-color:#fff}::ng-deep .toggle-content,::ng-deep .toggle-content .ig-scrollbar{--scrollbar-size: var(--ig-scrollbar-scrollbar-size, 8px);--thumb-background: var(--ig-scrollbar-thumb-background, hsla(var(--ig-gray-400), var(--ig-gray-a)));--track-background: var(--ig-scrollbar-track-background, hsla(var(--ig-gray-100), var(--ig-gray-a)))}::ng-deep .toggle-content .tabs{display:flex!important;border:.2px solid;border-color:#d3d3d3}::ng-deep .toggle-content .tab-option{padding:.9rem;height:100px;width:358px;display:inline-flex;overflow-x:auto;overflow-y:hidden;white-space:nowrap;align-content:center}::ng-deep .toggle-content .tab-option .chartImgButton{width:48px;height:48px}::ng-deep .toggle-content .tab-option .imgSize,::ng-deep .toggle-content .clear.action .imgSize{width:36px;height:36px;align-self:center}::ng-deep .toggle-content .action{cursor:pointer;opacity:1}::ng-deep .toggle-content .action.selected{opacity:.62}::ng-deep .toggle-content .action.selected--condition{pointer-events:none;opacity:.62}\n"], dependencies: [{ kind: "directive", type: i1$1.IgxButtonDirective, selector: "[igxButton]", inputs: ["selected", "igxButton", "igxButtonColor", "igxButtonBackground", "igxLabel", "disabled"], outputs: ["buttonClick", "buttonSelected"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i1$1.IgxIconComponent, selector: "igx-icon", inputs: ["family", "active", "name"] }, { kind: "directive", type: i1$1.IgxToggleDirective, selector: "[igxToggle]", inputs: ["id"], outputs: ["opened", "opening", "closed", "closing", "appended"], exportAs: ["toggle"] }, { kind: "component", type: i1$1.IgxTabsComponent, selector: "igx-tabs", inputs: ["tabAlignment"] }, { kind: "component", type: i1$1.IgxTabItemComponent, selector: "igx-tab-item" }, { kind: "component", type: i1$1.IgxTabHeaderComponent, selector: "igx-tab-header" }, { kind: "component", type: i1$1.IgxTabContentComponent, selector: "igx-tab-content" }, { kind: "directive", type: i1$1.IgxTabHeaderLabelDirective, selector: "igx-tab-header-label,[igxTabHeaderLabel]" }, { kind: "pipe", type: i2.SlicePipe, name: "slice" }, { kind: "pipe", type: SvgPipe, name: "svg" }] });
801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxContextMenuComponent, decorators: [{
802
- type: Component,
803
- args: [{ selector: 'igx-context-menu', template: "<span #analyticsBtn class=\"analytics-btn\">\r\n <button #btn igxButton=\"icon\" (click)=\"toggleTabMenu()\">\r\n <igx-icon #icon class=\"icon\" family=\"material\">insert_chart_outlined</igx-icon>\r\n </button>\r\n</span>\r\n<div #tabsMenu igxToggle class=\"toggle-content ig-scrollbar\">\r\n <!--NOTE: This component has been updated by Infragistics migration: v12.0.0\r\nPlease check your template whether all bindings/event handlers are correct.-->\r\n <igx-tabs tabsType=\"fixed\" [selectedIndex]=\"!this.textFormatters.length && chartTypes.length ? 1 : 0\">\r\n <igx-tab-item [disabled]=\"!textFormatters.length\">\r\n <igx-tab-header>\r\n <span igxTabHeaderLabel>Conditional Formatting</span>\r\n </igx-tab-header>\r\n <igx-tab-content>\r\n <igc-trial-watermark></igc-trial-watermark>\r\n <div class=\"tabs\">\r\n <span class=\"tab-option\">\r\n <span *ngFor=\"let condition of textFormatters\" class=\"action btn condition\"\r\n [ngClass]=\"{'selected--condition': condition === currentFormatter}\"\r\n (click)=\"formatCells(condition)\">\r\n <div class=\"imgSize\" [innerHTML]=\"conditionImages[condition.replace(' ', '')] | svg\">\r\n </div>\r\n <span class=\"name\">{{condition.replace('10', '10%')}}</span>\r\n </span>\r\n </span>\r\n <span class=\"clear action\"\r\n [ngClass]=\"{'disableButton': contextDirective.textFormatter ? !contextDirective.textFormatter.formatter : true }\"\r\n (click)=\"clearFormat()\">\r\n <div class=\"imgSize\" [innerHTML]=\"conditionImages['Clear'] | svg\">\r\n </div>\r\n <span class=\"btn name\">Clear All</span>\r\n </span>\r\n </div>\r\n </igx-tab-content>\r\n </igx-tab-item>\r\n <igx-tab-item [disabled]=\"!chartTypes.length\">\r\n <igx-tab-header>\r\n <span igxTabHeaderLabel>Create Chart</span>\r\n </igx-tab-header>\r\n <igx-tab-content>\r\n <igc-trial-watermark></igc-trial-watermark>\r\n <div class=\"tabs\">\r\n <span class=\"tab-option\">\r\n <span *ngFor=\"let chart of chartTypes | slice:0:4\" class=\"action btn chart\"\r\n [ngClass]=\"{'selected': chart === currentChartType}\" (mouseenter)=\"previewChart(chart)\"\r\n (mouseleave)=\"hidePreview()\" (click)=\"openDialog(chart)\">\r\n <span [innerHTML]=\"chartImages[chart] | svg\" class=\"imgSize\">\r\n </span>\r\n <span class=\"name\">{{chart}}</span>\r\n </span>\r\n </span>\r\n <span class=\"more-action chart\" [ngClass]=\"{'disableButton': !chartTypes.length}\"\r\n (click)=\"openDialog()\">\r\n <button class=\"more-btn more-icon\" igxButton=\"icon\" igxButtonBackground=\"#EBEBEB\"\r\n igxButtonColor=\"black\">\r\n <igx-icon class=\"icon\" family=\"material\">more_horiz</igx-icon>\r\n </button>\r\n <span class=\"name btn\">More...</span>\r\n </span>\r\n </div>\r\n </igx-tab-content>\r\n </igx-tab-item>\r\n </igx-tabs>\r\n</div>\r\n<div igxToggle #chartPreviewDialog class=\"chart-preview\">\r\n <div class=\"chart-preview-title\">\r\n <h5>Preview Chart</h5>\r\n </div>\r\n <div class=\"chart-preview-area\">\r\n <ng-template #chartPreview></ng-template>\r\n </div>\r\n</div>", styles: [".analytics-btn,.analytics-btn [igxButton=flat],.analytics-btn .igx-button--flat{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, transparent);--hover-border-color: var(--igx-button-hover-border-color, transparent);--focus-border-color: var(--igx-button-focus-border-color, transparent);--focus-visible-border-color: var(--igx-button-focus-visible-border-color, transparent);--active-border-color: var(--igx-button-active-border-color, transparent);--disabled-border-color: var(--igx-button-disabled-border-color, transparent);--disabled-background: var(--igx-button-disabled-background, transparent);--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-0));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-0));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-0));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-0));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-secondary-400), .12));--active-foreground: var(--igx-button-active-foreground, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-0));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-0));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-0));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-0))}.analytics-btn,.analytics-btn [igxButton=outlined],.analytics-btn .igx-button--outlined{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--hover-border-color: var(--igx-button-hover-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--focus-border-color: var(--igx-button-focus-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--focus-visible-border-color: var(--igx-button-focus-visible-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--active-border-color: var(--igx-button-active-border-color, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--disabled-border-color: var(--igx-button-disabled-border-color, hsla(var(--ig-gray-300), var(--ig-gray-a)));--disabled-background: var(--igx-button-disabled-background, transparent);--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-0));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-0));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-0));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-0));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-secondary-400), .12));--active-foreground: var(--igx-button-active-foreground, hsla(var(--ig-secondary-500), var(--ig-secondary-a)));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-0));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-0));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-0));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-0))}.analytics-btn,.analytics-btn [igxButton=raised],.analytics-btn .igx-button--raised{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, transparent);--hover-border-color: var(--igx-button-hover-border-color, transparent);--focus-border-color: var(--igx-button-focus-border-color, transparent);--focus-visible-border-color: var(--igx-button-focus-visible-border-color, transparent);--active-border-color: var(--igx-button-active-border-color, transparent);--disabled-border-color: var(--igx-button-disabled-border-color, transparent);--disabled-background: var(--igx-button-disabled-background, hsla(var(--ig-gray-300), var(--ig-gray-a)));--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-2));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-4));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-8));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-8));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-secondary-300), var(--ig-secondary-a)));--active-foreground: var(--igx-button-active-foreground, var(--ig-secondary-300-contrast));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-2));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-4));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-8));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-8))}.analytics-btn,.analytics-btn [igxButton=fab],.analytics-btn .igx-button--fab{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, transparent);--hover-border-color: var(--igx-button-hover-border-color, transparent);--focus-border-color: var(--igx-button-focus-border-color, transparent);--focus-visible-border-color: var(--igx-button-focus-visible-border-color, transparent);--active-border-color: var(--igx-button-active-border-color, transparent);--disabled-border-color: var(--igx-button-disabled-border-color, transparent);--disabled-background: var(--igx-button-disabled-background, hsla(var(--ig-gray-300), var(--ig-gray-a)));--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-6));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-12));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-12));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-12));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-secondary-300), var(--ig-secondary-a)));--active-foreground: var(--igx-button-active-foreground, var(--ig-secondary-300-contrast));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-6));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-12));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-12));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-12))}.analytics-btn,.analytics-btn [igxButton=icon],.analytics-btn .igx-button--icon{--shadow-color: var(--igx-button-shadow-color, transparent);--border-color: var(--igx-button-border-color, transparent);--hover-border-color: var(--igx-button-hover-border-color, transparent);--focus-border-color: var(--igx-button-focus-border-color, hsla(var(--ig-gray-400), var(--ig-gray-a)));--focus-visible-border-color: var(--igx-button-focus-visible-border-color, hsla(var(--ig-gray-400), var(--ig-gray-a)));--active-border-color: var(--igx-button-active-border-color, hsla(var(--ig-gray-400), var(--ig-gray-a)));--disabled-border-color: var(--igx-button-disabled-border-color, transparent);--disabled-background: var(--igx-button-disabled-background, transparent);--disabled-foreground: var(--igx-button-disabled-foreground, hsla(var(--ig-gray-500), var(--ig-gray-a)));--resting-elevation: var(--igx-button-resting-elevation, var(--ig-elevation-0));--hover-elevation: var(--igx-button-hover-elevation, var(--ig-elevation-0));--focus-elevation: var(--igx-button-focus-elevation, var(--ig-elevation-0));--active-elevation: var(--igx-button-active-elevation, var(--ig-elevation-0));--background: var(--igx-button-background, #335e3b);--foreground: var(--igx-button-foreground, #fff);--hover-background: var(--igx-button-hover-background, #459a55);--hover-foreground: var(--igx-button-hover-foreground, black);--focus-background: var(--igx-button-focus-background, #396a42);--focus-foreground: var(--igx-button-focus-foreground, white);--focus-visible-background: var(--igx-button-focus-visible-background, #396a42);--focus-visible-foreground: var(--igx-button-focus-visible-foreground, white);--active-background: var(--igx-button-active-background, hsla(var(--ig-gray-200), var(--ig-gray-a)));--active-foreground: var(--igx-button-active-foreground, hsla(var(--ig-gray-900), var(--ig-gray-a)));--border-radius: var(--igx-button-border-radius, 0);--resting-shadow: var(--igx-button-resting-shadow, var(--ig-elevation-0));--hover-shadow: var(--igx-button-hover-shadow, var(--ig-elevation-0));--focus-shadow: var(--igx-button-focus-shadow, var(--ig-elevation-0));--active-shadow: var(--igx-button-active-shadow, var(--ig-elevation-0))}.disableButton{opacity:.4;pointer-events:none}.clear,.more-action{display:flex;flex-flow:column;justify-content:center;border-left:1px solid #bdbdbd}.clear .btn,.clear .more-btn,.more-action .btn,.more-action .more-btn{width:68px;margin:0 0 7px;padding:0}.clear .more-btn,.more-action .more-btn{width:36px;height:36px;align-self:center;border-radius:20px}.clear .name,.more-action .name{font-size:.9rem;font-weight:400;text-align:center}.icon{pointer-events:none}.btn{display:inline-flex;flex-flow:column;align-items:center}.btn.condition{padding-right:16px}.btn.chart{padding-right:24px}.btn img,.btn span{pointer-events:none}.chart-preview{width:350px;height:300px;background-color:#fff;overflow:hidden}.chart-preview .chart-preview-title{margin:1rem;justify-content:center}.chart-preview .chart-preview-area{height:270px}::ng-deep .toggle-content{width:354px;max-width:358px;height:148px;background-color:#fff}::ng-deep .toggle-content,::ng-deep .toggle-content .ig-scrollbar{--scrollbar-size: var(--ig-scrollbar-scrollbar-size, 8px);--thumb-background: var(--ig-scrollbar-thumb-background, hsla(var(--ig-gray-400), var(--ig-gray-a)));--track-background: var(--ig-scrollbar-track-background, hsla(var(--ig-gray-100), var(--ig-gray-a)))}::ng-deep .toggle-content .tabs{display:flex!important;border:.2px solid;border-color:#d3d3d3}::ng-deep .toggle-content .tab-option{padding:.9rem;height:100px;width:358px;display:inline-flex;overflow-x:auto;overflow-y:hidden;white-space:nowrap;align-content:center}::ng-deep .toggle-content .tab-option .chartImgButton{width:48px;height:48px}::ng-deep .toggle-content .tab-option .imgSize,::ng-deep .toggle-content .clear.action .imgSize{width:36px;height:36px;align-self:center}::ng-deep .toggle-content .action{cursor:pointer;opacity:1}::ng-deep .toggle-content .action.selected{opacity:.62}::ng-deep .toggle-content .action.selected--condition{pointer-events:none;opacity:.62}\n"] }]
804
- }], ctorParameters: function () { return [{ type: i1$1.IgxOverlayService }]; }, propDecorators: { button: [{
805
- type: ViewChild,
806
- args: ['analyticsBtn']
807
- }], tabsMenu: [{
808
- type: ViewChild,
809
- args: ['tabsMenu', { read: IgxToggleDirective }]
810
- }], chartPreview: [{
811
- type: ViewChild,
812
- args: ['chartPreview', { read: ViewContainerRef }]
813
- }], chartPreviewDialog: [{
814
- type: ViewChild,
815
- args: ['chartPreviewDialog', { read: IgxToggleDirective }]
816
- }], tabs: [{
817
- type: ViewChild,
818
- args: [IgxTabsComponent]
819
- }] } });
820
-
821
- var ConditionalFormattingType;
822
- (function (ConditionalFormattingType) {
823
- ConditionalFormattingType["dataBars"] = "Data Bars";
824
- ConditionalFormattingType["colorScale"] = "Color Scale";
825
- ConditionalFormattingType["top10"] = "Top 10";
826
- ConditionalFormattingType["textContains"] = "Text Contains";
827
- ConditionalFormattingType["single"] = "Duplicate Values";
828
- ConditionalFormattingType["unique"] = "Unique Values";
829
- ConditionalFormattingType["empty"] = "Empty";
830
- })(ConditionalFormattingType || (ConditionalFormattingType = {}));
831
- class IgxConditionalFormattingDirective {
832
- set formatColors(val) {
833
- this._formatColors = val;
834
- }
835
- get formatColors() {
836
- return this._formatColors;
837
- }
838
- get selectedData() {
839
- if (!this._selectedData.length) {
840
- this._selectedData = this.toArray(this.grid.getSelectedData());
841
- }
842
- return this._selectedData;
843
- }
844
- get textData() {
845
- return this.selectedData.filter(val => typeof val === 'string');
846
- }
847
- get numericData() {
848
- return this.selectedData.filter(val => typeof val === 'number');
849
- }
850
- constructor(grid) {
851
- this.grid = grid;
852
- this.onFormattersReady = new EventEmitter();
853
- this.colorScale = {
854
- backgroundColor: (rowData, colname, cellValue, rowIndex) => {
855
- if (!(typeof cellValue === 'number' && this.isWithInFormattedRange(rowIndex, colname))) {
856
- return;
857
- }
858
- return this.lowTresholdValue >= cellValue ? this.formatColors.error :
859
- this.middleTresholdValue >= cellValue ? this.formatColors.warning : this.formatColors.success;
860
- }
861
- };
862
- this.dataBars = {
863
- backgroundImage: (rowData, colname, cellValue, rowIndex) => {
864
- if (!(typeof cellValue === 'number' && this.isWithInFormattedRange(rowIndex, colname))) {
865
- return;
866
- }
867
- const treshold = this.threshold;
868
- let gradientPercents;
869
- if (cellValue < 0) {
870
- const negativeStartingPoint = 100 - treshold;
871
- gradientPercents = this.getNegativePercentage(cellValue);
872
- return `linear-gradient(to left, transparent 0% ${negativeStartingPoint}%,
873
- ${this.formatColors.error} ${negativeStartingPoint}% ${negativeStartingPoint + gradientPercents}%,
874
- transparent ${gradientPercents}% 100%)`;
875
- }
876
- else {
877
- gradientPercents = this.getPositivePercentage(cellValue);
878
- return `linear-gradient(to right, transparent 0% ${treshold}%,
879
- ${this.formatColors.success} ${treshold}% ${treshold + gradientPercents}%,
880
- transparent ${treshold + gradientPercents}% 100%)`;
881
- }
882
- },
883
- backgroundSize: '100% 80%',
884
- backgroundRepeat: 'no-repeat',
885
- backgroundPositionY: 'center'
886
- };
887
- this.top10Percent = {
888
- backgroundColor: (rowData, colname, cellValue, rowIndex) => {
889
- if (typeof cellValue === 'number' && this.isWithInFormattedRange(rowIndex, colname)
890
- && cellValue > this.top10PercentTreshold) {
891
- return this.formatColors.info;
892
- }
893
- },
894
- color: (rowData, colname, cellValue, rowIndex) => {
895
- if (typeof cellValue === 'number' && this.isWithInFormattedRange(rowIndex, colname)
896
- && cellValue > this.top10PercentTreshold) {
897
- return this.formatColors.text;
898
- }
899
- }
900
- };
901
- this.greaterThan = {
902
- backgroundColor: (rowData, colname, cellValue, rowIndex) => {
903
- if (typeof cellValue === 'number' && this.isWithInFormattedRange(rowIndex, colname)
904
- && cellValue > this.avgValue) {
905
- return this.formatColors.info;
906
- }
907
- },
908
- color: (rowData, colname, cellValue, rowIndex) => {
909
- if (typeof cellValue === 'number' && this.isWithInFormattedRange(rowIndex, colname)
910
- && cellValue > this.avgValue) {
911
- return this.formatColors.text;
912
- }
913
- }
914
- };
915
- this.empty = {
916
- backgroundColor: (rowData, colname, cellValue, rowIndex) => {
917
- if (this.isWithInFormattedRange(rowIndex, colname) && cellValue === undefined) {
918
- return this.formatColors.info;
919
- }
920
- },
921
- color: (rowData, colname, cellValue, rowIndex) => {
922
- if (this.isWithInFormattedRange(rowIndex, colname) && cellValue === undefined) {
923
- return this.formatColors.text;
924
- }
925
- }
926
- };
927
- this.duplicates = {
928
- backgroundColor: (rowData, colname, cellValue, rowIndex) => {
929
- if (!this.isWithInFormattedRange(rowIndex, colname)) {
930
- return;
931
- }
932
- const arr = typeof cellValue === 'number' ? this.numericData : this.textData;
933
- return arr.indexOf(cellValue) !== arr.lastIndexOf(cellValue) ? this.formatColors.info : '';
934
- },
935
- color: (rowData, colname, cellValue, rowIndex) => {
936
- if (!this.isWithInFormattedRange(rowIndex, colname)) {
937
- return;
938
- }
939
- const arr = typeof cellValue === 'number' ? this.numericData : this.textData;
940
- return arr.indexOf(cellValue) !== arr.lastIndexOf(cellValue) ? this.formatColors.text : '';
941
- }
942
- };
943
- this.textContains = {
944
- backgroundColor: (rowData, colname, cellValue, rowIndex) => {
945
- if (typeof cellValue === 'string' && this.isWithInFormattedRange(rowIndex, colname) &&
946
- cellValue.toLowerCase().indexOf(this._valueForComparison.toLowerCase()) !== -1) {
947
- return this.formatColors.info;
948
- }
949
- },
950
- color: (rowData, colname, cellValue, rowIndex) => {
951
- if (typeof cellValue === 'string' && this.isWithInFormattedRange(rowIndex, colname) &&
952
- cellValue.toLowerCase().indexOf(this._valueForComparison.toLowerCase()) !== -1) {
953
- return this.formatColors.text;
954
- }
955
- }
956
- };
957
- this.uniques = {
958
- backgroundColor: (rowData, colname, cellValue, rowIndex) => {
959
- if (!this.isWithInFormattedRange(rowIndex, colname)) {
960
- return;
961
- }
962
- const arr = typeof cellValue === 'number' ? this.numericData : this.textData;
963
- return arr.indexOf(cellValue) === arr.lastIndexOf(cellValue) ? this.formatColors.info : '';
964
- },
965
- color: (rowData, colname, cellValue, rowIndex) => {
966
- if (!this.isWithInFormattedRange(rowIndex, colname)) {
967
- return;
968
- }
969
- const arr = typeof cellValue === 'number' ? this.numericData : this.textData;
970
- return arr.indexOf(cellValue) === arr.lastIndexOf(cellValue) ? this.formatColors.text : '';
971
- }
972
- };
973
- this._formatColors = {
974
- success: '#4EB862',
975
- error: '#FF134A',
976
- warning: '#FBB13C',
977
- info: '#1377D5',
978
- text: '#FFF'
979
- };
980
- this._numericFormatters = ['Data Bars', 'Color Scale', 'Top 10', 'Greater Than'];
981
- this._textFormatters = ['Text Contains'];
982
- this._commonFormattersName = ['Duplicate Values', 'Unique Values', 'Empty'];
983
- this._selectedData = [];
984
- this._formattersData = new Map();
985
- this.destroy$ = new Subject();
986
- this.formatedRange = new Map();
987
- this._formattersData.set('Data Bars', this.dataBars);
988
- this._formattersData.set('Color Scale', this.colorScale);
989
- this._formattersData.set('Top 10', this.top10Percent);
990
- this._formattersData.set('Greater Than', this.greaterThan);
991
- this._formattersData.set('Text Contains', this.textContains);
992
- this._formattersData.set('Duplicate Values', this.duplicates);
993
- this._formattersData.set('Unique Values', this.uniques);
994
- this._formattersData.set('Empty', this.empty);
995
- }
996
- ngAfterViewInit() {
997
- this.grid.rangeSelected.pipe(takeUntil(this.destroy$)).subscribe(() => {
998
- this.determineFormatters();
999
- });
1000
- this.grid.cellEdit.pipe(takeUntil(this.destroy$)).subscribe((args) => {
1001
- if ((args.newValue === args.oldValue || !this.formatter)) {
1002
- return;
1003
- }
1004
- if (this.isWithInFormattedRange(args.cellID.rowIndex, args.cellID.columnID - 1)) {
1005
- const value = Number(args.newValue);
1006
- const valueToBeAdded = !Number.isNaN(value) && Number.isFinite(value) ? value : args.newValue;
1007
- this.selectedData.splice(this.selectedData.indexOf(args.oldValue), 1, valueToBeAdded);
1008
- this.recalcCachedValues();
1009
- this.formatCells(this.formatter, undefined, false);
1010
- }
1011
- });
1012
- }
1013
- ngOnDestroy() {
1014
- this.destroy$.next(true);
1015
- this.destroy$.complete();
1016
- }
1017
- formatCells(formatterName, formatRange, reset = true) {
1018
- if (reset) {
1019
- this.resetRange(formatRange);
1020
- }
1021
- this.clearFormatting();
1022
- this.formatter = formatterName;
1023
- this.grid.visibleColumns.forEach(c => {
1024
- if (c.visibleIndex >= this._startColumn && c.visibleIndex <= this._endColumn) {
1025
- c.cellStyles = this._formattersData.get(this.formatter);
1026
- this.grid.notifyChanges();
1027
- }
1028
- });
1029
- }
1030
- clearFormatting() {
1031
- this.formatter = undefined;
1032
- this.grid.visibleColumns.forEach(c => {
1033
- c.cellStyles = undefined;
1034
- this.grid.cdr.detectChanges();
1035
- });
1036
- }
1037
- determineFormatters() {
1038
- const numericData = this.toArray(this.grid.getSelectedData()).some(rec => typeof rec === 'number');
1039
- const textData = this.toArray(this.grid.getSelectedData()).some(rec => typeof rec === 'string');
1040
- const formatters = Array.of(...this._commonFormattersName);
1041
- if (!(numericData) && textData) {
1042
- formatters.splice(0, 0, ...this._textFormatters);
1043
- }
1044
- else if (numericData && !textData) {
1045
- formatters.splice(0, 0, ...this._numericFormatters);
1046
- }
1047
- else {
1048
- formatters.splice(0, 0, ...['Data Bars', 'Color Scale', 'Text Contains']);
1049
- }
1050
- this.onFormattersReady.emit(formatters);
1051
- }
1052
- recalcCachedValues(clearAll = false) {
1053
- if (clearAll) {
1054
- this._startColumn = Math.min(...this.grid.getSelectedRanges().map(r => Number(r.columnStart)));
1055
- this._endColumn = Math.max(...this.grid.getSelectedRanges().map(r => Number(r.columnEnd)));
1056
- this._selectedData = [];
1057
- }
1058
- this._valueForComparison = this.textData[0];
1059
- this._maxValue = Math.max(...this.numericData);
1060
- this._minValue = Math.min(...this.numericData.filter(value => value < 0)) | 0;
1061
- }
1062
- isWithInFormattedRange(rowIndex, colID) {
1063
- const visibleIndex = typeof colID === 'string' ? this.grid.getColumnByName(colID).visibleIndex : colID;
1064
- if (!this.formatedRange.size) {
1065
- return false;
1066
- }
1067
- return this.formatedRange.has(rowIndex) && this.formatedRange.get(rowIndex).has(visibleIndex);
1068
- }
1069
- get middleTresholdValue() { return 0.66 * Math.ceil(this._maxValue); }
1070
- get lowTresholdValue() { return 0.33 * Math.ceil(this._maxValue); }
1071
- get top10PercentTreshold() { return 0.9 * Math.ceil(this._maxValue); }
1072
- get avgValue() {
1073
- return Math.ceil((this.numericData.reduce((a, b) => a + b, 0)) / this.numericData.length);
1074
- }
1075
- get threshold() {
1076
- return Math.ceil(Math.abs(this._minValue) / (this._maxValue + Math.abs(this._minValue)) * 100);
1077
- }
1078
- getPositivePercentage(val) {
1079
- const result = (Math.ceil(val) / (this._maxValue + Math.abs(this._minValue))) * 100;
1080
- return Math.ceil(result);
1081
- }
1082
- getNegativePercentage(val) {
1083
- const result = (Math.abs(val) / (this._maxValue + Math.abs(this._minValue))) * 100;
1084
- return Math.ceil(result);
1085
- }
1086
- resetRange(formatRange) {
1087
- this.formatedRange.clear();
1088
- const customRange = formatRange ? formatRange : this.grid.getSelectedRanges();
1089
- customRange.forEach(range => {
1090
- for (let ri = range.rowStart; ri <= Number(range.rowEnd); ri++) {
1091
- for (let ci = Number(range.columnStart); ci <= Number(range.columnEnd); ci++) {
1092
- this.addToCache(ri, ci);
1093
- }
1094
- }
1095
- });
1096
- this.recalcCachedValues(true);
1097
- }
1098
- addToCache(rowIndex, colIndex, selection = true) {
1099
- this.formatedRange.has(rowIndex) ? this.formatedRange.get(rowIndex).add(colIndex) :
1100
- this.formatedRange.set(rowIndex, new Set()).get(rowIndex).add(colIndex);
1101
- }
1102
- toArray(data) {
1103
- let result = [];
1104
- data.forEach(rec => result = result.concat(Object.values(rec)));
1105
- return result;
1106
- }
1107
- }
1108
- IgxConditionalFormattingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxConditionalFormattingDirective, deps: [{ token: i1$1.IgxGridComponent }], target: i0.ɵɵFactoryTarget.Directive });
1109
- IgxConditionalFormattingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: IgxConditionalFormattingDirective, selector: "[igxConditionalFormatting]", inputs: { formatter: "formatter", formatColors: "formatColors" }, outputs: { onFormattersReady: "onFormattersReady" }, ngImport: i0 });
1110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxConditionalFormattingDirective, decorators: [{
1111
- type: Directive,
1112
- args: [{
1113
- selector: '[igxConditionalFormatting]'
1114
- }]
1115
- }], ctorParameters: function () { return [{ type: i1$1.IgxGridComponent }]; }, propDecorators: { formatter: [{
1116
- type: Input
1117
- }], formatColors: [{
1118
- type: Input
1119
- }], onFormattersReady: [{
1120
- type: Output
1121
- }] } });
1122
-
1123
- // tslint:disable: max-line-length
1124
- class SeriesFactory {
1125
- create(type) {
1126
- return new type();
1127
- }
1128
- }
1129
- class ChartInitializer {
1130
- constructor() {
1131
- this.seriesFactory = new SeriesFactory();
1132
- }
1133
- applyOptions(target, options) {
1134
- if (options) {
1135
- Object.keys(options).forEach(key => {
1136
- if (target[key] instanceof EventEmitter) {
1137
- target[key].subscribe(options[key]);
1138
- }
1139
- else {
1140
- target[key] = options[key];
1141
- }
1142
- });
1143
- }
1144
- }
1145
- }
1146
- class IgxPieChartInitializer extends ChartInitializer {
1147
- constructor() {
1148
- super();
1149
- }
1150
- initChart(chart, options) {
1151
- this.applyOptions(chart, options.chartOptions);
1152
- return chart;
1153
- }
1154
- }
1155
- class IgxDataChartInitializer extends ChartInitializer {
1156
- constructor(seriesType) {
1157
- super();
1158
- switch (seriesType) {
1159
- case IgxBarSeriesComponent:
1160
- this.xAxis = new IgxNumericXAxisComponent();
1161
- this.yAxis = new IgxCategoryYAxisComponent();
1162
- break;
1163
- case IgxScatterSeriesComponent:
1164
- case IgxBubbleSeriesComponent:
1165
- case IgxScatterLineSeriesComponent:
1166
- this.xAxis = new IgxNumericXAxisComponent();
1167
- this.yAxis = new IgxNumericYAxisComponent();
1168
- break;
1169
- default:
1170
- this.xAxis = new IgxCategoryXAxisComponent();
1171
- this.yAxis = new IgxNumericYAxisComponent();
1172
- }
1173
- this.seriesType = seriesType;
1174
- }
1175
- initChart(chart, options) {
1176
- options.seriesOptions.forEach((option) => {
1177
- const series = this.seriesFactory.create(this.seriesType);
1178
- series.xAxis = this.xAxis;
1179
- series.yAxis = this.yAxis;
1180
- this.applyOptions(series, option);
1181
- chart.series.add(series);
1182
- });
1183
- this.applyOptions(chart, options.chartOptions);
1184
- this.applyOptions(this.xAxis, options.xAxisOptions);
1185
- this.applyOptions(this.yAxis, options.yAxisOptions);
1186
- chart.axes.add(this.xAxis);
1187
- chart.axes.add(this.yAxis);
1188
- return chart;
1189
- }
1190
- }
1191
- class IgxStackedDataChartInitializer extends ChartInitializer {
1192
- constructor(seriesType) {
1193
- super();
1194
- if (seriesType === IgxStackedBarSeriesComponent || seriesType === IgxStacked100BarSeriesComponent) {
1195
- this.xAxis = new IgxNumericXAxisComponent();
1196
- this.yAxis = new IgxCategoryYAxisComponent();
1197
- }
1198
- else {
1199
- this.xAxis = new IgxCategoryXAxisComponent();
1200
- this.yAxis = new IgxNumericYAxisComponent();
1201
- }
1202
- this.seriesType = seriesType;
1203
- }
1204
- initChart(chart, options) {
1205
- const series = this.seriesFactory.create(this.seriesType);
1206
- series.xAxis = this.xAxis;
1207
- series.yAxis = this.yAxis;
1208
- options.stackedFragmentOptions.forEach(fragOpt => {
1209
- const frag = new IgxStackedFragmentSeriesComponent();
1210
- this.applyOptions(frag, fragOpt);
1211
- series.series.add(frag);
1212
- });
1213
- this.applyOptions(series, options.seriesOptions);
1214
- this.applyOptions(chart, options.chartOptions);
1215
- this.applyOptions(this.xAxis, options.xAxisOptions);
1216
- this.applyOptions(this.yAxis, options.yAxisOptions);
1217
- chart.series.add(series);
1218
- chart.axes.add(this.xAxis);
1219
- chart.axes.add(this.yAxis);
1220
- return chart;
1221
- }
1222
- }
1223
-
1224
- class IgxChartIntegrationDirective {
1225
- get chartData() {
1226
- return this._chartData;
1227
- }
1228
- set chartData(selectedData) {
1229
- const charts = new Set(this._dataChartTypes);
1230
- const dataModel = selectedData.length ? selectedData[0] : {};
1231
- this._labelMemberPaths = Object.keys(dataModel).filter(key => typeof dataModel[key] === 'string');
1232
- this._valueMemberPaths = Object.keys(dataModel).filter(key => typeof dataModel[key] === 'number');
1233
- this._chartData = selectedData.map((dataRecord, index) => this.addIndexMemberPath(dataRecord, index + 1));
1234
- const args = {
1235
- chartsAvailabilty: new Map(),
1236
- chartsForCreation: []
1237
- };
1238
- if (selectedData.length === 0 || this._valueMemberPaths.length === 0) {
1239
- this.onChartTypesDetermined.emit(args);
1240
- return;
1241
- }
1242
- if (selectedData.length === 1) {
1243
- charts.forEach((chart, _, set) => {
1244
- const isColumnChart = chart.indexOf('Column') !== -1;
1245
- const isBarChart = chart.indexOf('Bar') !== -1;
1246
- const isPieChart = chart.indexOf('Pie') !== -1;
1247
- if (!(isColumnChart || isBarChart || isPieChart)) {
1248
- set.delete(chart);
1249
- }
1250
- });
1251
- }
1252
- // Config pie chart
1253
- const cannotCreatePieChart = selectedData.some(record => record[this._valueMemberPaths[0]] <= 0);
1254
- if (cannotCreatePieChart) {
1255
- charts.delete(CHART_TYPE.PIE);
1256
- }
1257
- // Config scatter chart member paths
1258
- const canCreateScatterChart = this._valueMemberPaths.length >= 2;
1259
- const canCreateBubbleChart = this._valueMemberPaths.length >= 3;
1260
- if (!canCreateScatterChart) {
1261
- charts.delete(CHART_TYPE.SCATTER_BUBBLE);
1262
- charts.delete(CHART_TYPE.SCATTER_LINE);
1263
- charts.delete(CHART_TYPE.SCATTER_POINT);
1264
- }
1265
- if (!canCreateBubbleChart) {
1266
- charts.delete(CHART_TYPE.SCATTER_BUBBLE);
1267
- }
1268
- args.chartsAvailabilty = this.chartTypesAvailability;
1269
- args.chartsForCreation = [...charts];
1270
- this.onChartTypesDetermined.emit(args);
1271
- }
1272
- set scatterChartYAxisValueMemberPath(path) {
1273
- this._scatterChartYAxisValueMemberPath = path;
1274
- }
1275
- get scatterChartYAxisValueMemberPath() {
1276
- return this._scatterChartYAxisValueMemberPath &&
1277
- this._valueMemberPaths.indexOf(this._scatterChartYAxisValueMemberPath) !== -1 ?
1278
- this._scatterChartYAxisValueMemberPath : this._valueMemberPaths[0];
1279
- }
1280
- set bubbleChartRadiusMemberPath(path) {
1281
- this._bubbleChartRadiusMemberPath = path;
1282
- }
1283
- get bubbleChartRadiusMemberPath() {
1284
- return this._bubbleChartRadiusMemberPath &&
1285
- this._valueMemberPaths.indexOf(this._bubbleChartRadiusMemberPath) !== -1 ?
1286
- this._bubbleChartRadiusMemberPath : this._valueMemberPaths[1];
1287
- }
1288
- get _labelMemberPath() {
1289
- return this.defaultLabelMemberPath && this._chartData.some(r => r[this.defaultLabelMemberPath] !== undefined) ?
1290
- this.defaultLabelMemberPath : this._labelMemberPaths.length > 0 ? this._labelMemberPaths[0] : 'Index';
1291
- }
1292
- get pieChartOptions() {
1293
- return {
1294
- width: '85%',
1295
- height: '75%',
1296
- dataSource: this.chartData,
1297
- valueMemberPath: this._valueMemberPaths[0],
1298
- legendLabelMemberPath: this._labelMemberPath,
1299
- labelMemberPath: this._labelMemberPath,
1300
- };
1301
- }
1302
- get dataChartOptions() {
1303
- return {
1304
- width: '100%',
1305
- height: '85%',
1306
- autoMarginWidth: 50,
1307
- isVerticalZoomEnabled: true,
1308
- isHorizontalZoomEnabled: true,
1309
- dataSource: this.chartData
1310
- };
1311
- }
1312
- constructor(factoryResolver) {
1313
- this.factoryResolver = factoryResolver;
1314
- this.onChartTypesDetermined = new EventEmitter();
1315
- this.onChartCreationDone = new EventEmitter();
1316
- this.useLegend = true;
1317
- this.defaultLabelMemberPath = undefined;
1318
- this.chartTypesAvailability = new Map();
1319
- this.customChartComponentOptions = new Map();
1320
- this.dataCharts = new Map();
1321
- this._scatterChartYAxisValueMemberPath = undefined;
1322
- this._bubbleChartRadiusMemberPath = undefined;
1323
- this._valueMemberPaths = [];
1324
- this._labelMemberPaths = [];
1325
- this._sizeScale = new IgxSizeScaleComponent();
1326
- this._dataChartTypes = new Set();
1327
- this.dataChartSeriesOptionsModel = {
1328
- isHighlightingEnabled: true,
1329
- areaFillOpacity: .4,
1330
- markerType: 3,
1331
- showDefaultTooltip: true
1332
- };
1333
- this.scatterChartSeriesOptionsModel = {
1334
- markerType: 3,
1335
- showDefaultTooltip: true
1336
- };
1337
- this.bubbleChartSeriesOptionsModel = {
1338
- radiusScale: this._sizeScale
1339
- };
1340
- this.dataCharts.set(CHART_TYPE.COLUMN_GROUPED, IgxColumnSeriesComponent);
1341
- this.dataCharts.set(CHART_TYPE.AREA_GROUPED, IgxAreaSeriesComponent);
1342
- this.dataCharts.set(CHART_TYPE.LINE_GROUPED, IgxLineSeriesComponent);
1343
- this.dataCharts.set(CHART_TYPE.BAR_GROUPED, IgxBarSeriesComponent);
1344
- this.dataCharts.set(CHART_TYPE.COLUMN_STACKED, IgxStackedColumnSeriesComponent);
1345
- this.dataCharts.set(CHART_TYPE.AREA_STACKED, IgxStackedAreaSeriesComponent);
1346
- this.dataCharts.set(CHART_TYPE.LINE_STACKED, IgxStackedLineSeriesComponent);
1347
- this.dataCharts.set(CHART_TYPE.BAR_STACKED, IgxStackedBarSeriesComponent);
1348
- this.dataCharts.set(CHART_TYPE.COLUMN_100_STACKED, IgxStacked100ColumnSeriesComponent);
1349
- this.dataCharts.set(CHART_TYPE.AREA_100_STACKED, IgxStacked100AreaSeriesComponent);
1350
- this.dataCharts.set(CHART_TYPE.LINE_100_STACKED, IgxStacked100LineSeriesComponent);
1351
- this.dataCharts.set(CHART_TYPE.BAR_100_STACKED, IgxStacked100BarSeriesComponent);
1352
- this.dataCharts.set(CHART_TYPE.SCATTER_POINT, IgxScatterSeriesComponent);
1353
- this.dataCharts.set(CHART_TYPE.SCATTER_BUBBLE, IgxBubbleSeriesComponent);
1354
- this.dataCharts.set(CHART_TYPE.SCATTER_LINE, IgxScatterLineSeriesComponent);
1355
- this.dataCharts.set(CHART_TYPE.PIE, IgxPieChartComponent);
1356
- const iterable = this.dataCharts.keys();
1357
- for (let head = iterable.next().value; head !== undefined; head = iterable.next().value) {
1358
- this._dataChartTypes.add(head);
1359
- this.chartTypesAvailability.set(head, true);
1360
- this.customChartComponentOptions.set(head, {});
1361
- }
1362
- }
1363
- getAvailableCharts() {
1364
- const res = [];
1365
- this.chartTypesAvailability.forEach((isAvailable, chartType) => {
1366
- if (isAvailable) {
1367
- res.push(chartType);
1368
- }
1369
- });
1370
- return res;
1371
- }
1372
- disableCharts(types) {
1373
- types.forEach(type => {
1374
- if (this.chartTypesAvailability.get(type)) {
1375
- this.chartTypesAvailability.set(type, false);
1376
- }
1377
- });
1378
- }
1379
- enableCharts(types) {
1380
- types.forEach(type => {
1381
- if (!this.chartTypesAvailability.get(type)) {
1382
- this.chartTypesAvailability.set(type, true);
1383
- }
1384
- });
1385
- }
1386
- chartFactory(type, viewContainerRef) {
1387
- if (!this.chartTypesAvailability.get(type)) {
1388
- return;
1389
- }
1390
- let componentFactory;
1391
- let componentRef;
1392
- this._sizeScale.maximumValue = 60;
1393
- this._sizeScale.minimumValue = 10;
1394
- const chartType = this.dataCharts.get(type);
1395
- if (type === CHART_TYPE.PIE) {
1396
- componentFactory = this.factoryResolver.resolveComponentFactory(IgxPieChartComponent);
1397
- componentRef = viewContainerRef.createComponent(componentFactory);
1398
- }
1399
- else {
1400
- componentFactory = this.factoryResolver.resolveComponentFactory(IgxDataChartComponent);
1401
- componentRef = viewContainerRef.createComponent(componentFactory);
1402
- }
1403
- const options = this.getChartOptions(type);
1404
- const initializer = this.getInitializer(type, chartType);
1405
- if (this.useLegend) {
1406
- const legendType = type === CHART_TYPE.PIE ? IgxItemLegendComponent : IgxLegendComponent;
1407
- const legendFactory = this.factoryResolver.resolveComponentFactory(legendType);
1408
- const legendComponentRef = viewContainerRef.createComponent(legendFactory);
1409
- options.chartOptions['legend'] = legendComponentRef.instance;
1410
- }
1411
- const chart = initializer.initChart(componentRef.instance, options);
1412
- this.onChartCreationDone.emit(chart);
1413
- }
1414
- getInitializer(chartType, componentClassRef) {
1415
- if (chartType.includes('Pie')) {
1416
- return new IgxPieChartInitializer();
1417
- }
1418
- else if (chartType.includes('Stacked')) {
1419
- return new IgxStackedDataChartInitializer(componentClassRef);
1420
- }
1421
- else {
1422
- return new IgxDataChartInitializer(componentClassRef);
1423
- }
1424
- }
1425
- getChartOptions(type) {
1426
- const chartComponentOptions = {};
1427
- return type === CHART_TYPE.PIE ? this.addPieChartDataOptions(chartComponentOptions) :
1428
- this.addDataChartDataOptions(type, chartComponentOptions, type.includes('Stacked'));
1429
- }
1430
- addPieChartDataOptions(chartComponentOptions) {
1431
- // tslint:disable-next-line: max-line-length
1432
- chartComponentOptions.chartOptions = Object.assign(this.pieChartOptions, this.customChartComponentOptions.get(CHART_TYPE.PIE).chartOptions);
1433
- return chartComponentOptions;
1434
- }
1435
- addDataChartDataOptions(type, chartComponentOptions, stacked) {
1436
- chartComponentOptions.chartOptions = Object.assign(this.dataChartOptions, this.customChartComponentOptions.get(type));
1437
- if (type.indexOf('Scatter') !== -1) {
1438
- this.addScatterChartDataOptions(type, chartComponentOptions);
1439
- }
1440
- else {
1441
- // tslint:disable-next-line: max-line-length
1442
- chartComponentOptions.seriesModel = Object.assign(this.dataChartSeriesOptionsModel, this.customChartComponentOptions.get(type).seriesModel);
1443
- this.setAxisLabelOption(type, chartComponentOptions);
1444
- const options = [];
1445
- this._valueMemberPaths.forEach(valueMemberPath => {
1446
- const dataOptions = {
1447
- title: valueMemberPath,
1448
- valueMemberPath
1449
- };
1450
- if (stacked) {
1451
- options.push(Object.assign({}, dataOptions));
1452
- }
1453
- else {
1454
- options.push(Object.assign(Object.assign({}, dataOptions), chartComponentOptions.seriesModel));
1455
- }
1456
- });
1457
- stacked ? chartComponentOptions.stackedFragmentOptions = options :
1458
- chartComponentOptions.seriesOptions = options;
1459
- }
1460
- return chartComponentOptions;
1461
- }
1462
- addScatterChartDataOptions(scatterChart, chartComponentOptions) {
1463
- // tslint:disable-next-line: max-line-length
1464
- chartComponentOptions.seriesModel = Object.assign(this.scatterChartSeriesOptionsModel, this.customChartComponentOptions.get(scatterChart).seriesModel);
1465
- chartComponentOptions.seriesModel['yMemberPath'] = this.scatterChartYAxisValueMemberPath;
1466
- if (scatterChart === CHART_TYPE.SCATTER_BUBBLE) {
1467
- chartComponentOptions.seriesModel = Object.assign(chartComponentOptions.seriesModel, this.bubbleChartSeriesOptionsModel);
1468
- chartComponentOptions.seriesModel['radiusMemberPath'] = this.bubbleChartRadiusMemberPath;
1469
- }
1470
- const model = chartComponentOptions.seriesModel;
1471
- const seriesOptions = [];
1472
- this._valueMemberPaths.filter(v => !(v === model['yMemberPath'] ||
1473
- v === model['radiusMemberPath'])).forEach(valueMemberPath => {
1474
- const dataOptions = {
1475
- title: `${model['yMemberPath']} vs ${valueMemberPath}`,
1476
- xMemberPath: valueMemberPath,
1477
- labelMemberPath: this._labelMemberPath
1478
- };
1479
- seriesOptions.push(Object.assign(Object.assign({}, dataOptions), model));
1480
- });
1481
- chartComponentOptions.seriesOptions = seriesOptions;
1482
- }
1483
- addIndexMemberPath(dataRecord, index) {
1484
- dataRecord = Object.assign({ [this._labelMemberPath]: index }, dataRecord);
1485
- return dataRecord;
1486
- }
1487
- setAxisLabelOption(type, options) {
1488
- if (type.indexOf('Bar') !== -1) {
1489
- options.yAxisOptions = Object.assign({
1490
- label: this._labelMemberPath
1491
- }, this.customChartComponentOptions.get(type).yAxisOptions);
1492
- }
1493
- else {
1494
- options.xAxisOptions = Object.assign({
1495
- label: this._labelMemberPath
1496
- }, this.customChartComponentOptions.get(type).xAxisOptions);
1497
- }
1498
- }
1499
- setChartComponentOptions(chart, optionsType, options) {
1500
- if (!this.customChartComponentOptions.get(chart)[optionsType]) {
1501
- this.customChartComponentOptions.get(chart)[optionsType] = {};
1502
- }
1503
- Object.keys(options).forEach(property => {
1504
- this.customChartComponentOptions.get(chart)[optionsType][property] = options[property];
1505
- });
1506
- }
1507
- }
1508
- IgxChartIntegrationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxChartIntegrationDirective, deps: [{ token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Directive });
1509
- IgxChartIntegrationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: IgxChartIntegrationDirective, selector: "[igxChartIntegration]", inputs: { chartData: "chartData", useLegend: "useLegend", defaultLabelMemberPath: "defaultLabelMemberPath", scatterChartYAxisValueMemberPath: "scatterChartYAxisValueMemberPath", bubbleChartRadiusMemberPath: "bubbleChartRadiusMemberPath" }, outputs: { onChartTypesDetermined: "onChartTypesDetermined", onChartCreationDone: "onChartCreationDone" }, ngImport: i0 });
1510
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxChartIntegrationDirective, decorators: [{
1511
- type: Directive,
1512
- args: [{
1513
- selector: '[igxChartIntegration]'
1514
- }]
1515
- }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }]; }, propDecorators: { chartData: [{
1516
- type: Input
1517
- }], onChartTypesDetermined: [{
1518
- type: Output
1519
- }], onChartCreationDone: [{
1520
- type: Output
1521
- }], useLegend: [{
1522
- type: Input
1523
- }], defaultLabelMemberPath: [{
1524
- type: Input
1525
- }], scatterChartYAxisValueMemberPath: [{
1526
- type: Input
1527
- }], bubbleChartRadiusMemberPath: [{
1528
- type: Input
1529
- }] } });
1530
-
1531
- class IgxContextMenuDirective {
1532
- constructor(grid, textFormatter, chartsDirective, overlayService) {
1533
- this.grid = grid;
1534
- this.textFormatter = textFormatter;
1535
- this.chartsDirective = chartsDirective;
1536
- this.overlayService = overlayService;
1537
- this.onButtonClose = new EventEmitter();
1538
- this.formatters = [];
1539
- this.charts = [];
1540
- this.gridResizeNotify = new Subject();
1541
- this._collapsed = true;
1542
- this.destroy$ = new Subject();
1543
- this._analyticsBtnSettings = {
1544
- closeOnOutsideClick: false,
1545
- modal: false
1546
- };
1547
- }
1548
- ngOnInit() {
1549
- this.gridResizeNotify.pipe(takeUntil(this.destroy$))
1550
- .subscribe(() => {
1551
- if (this._id && !this._collapsed) {
1552
- this.renderButton();
1553
- }
1554
- });
1555
- }
1556
- ngAfterViewInit() {
1557
- this.setUpGridListeners();
1558
- if (this.textFormatter) {
1559
- this.textFormatter.onFormattersReady.pipe(takeUntil(this.destroy$))
1560
- .subscribe(names => this.formatters = names);
1561
- }
1562
- if (this.chartsDirective) {
1563
- this.chartsDirective.onChartTypesDetermined.pipe(takeUntil(this.destroy$))
1564
- .subscribe((args) => this.charts = args.chartsForCreation);
1565
- }
1566
- this.overlayService.opening.pipe(takeUntil(this.destroy$))
1567
- .subscribe((args) => {
1568
- if (args.componentRef) {
1569
- const instance = args.componentRef.instance;
1570
- instance.contextDirective = this;
1571
- }
1572
- });
1573
- }
1574
- ngOnDestroy() {
1575
- this.destroy$.next(true);
1576
- this.destroy$.complete();
1577
- if (!this._collapsed) {
1578
- this.close();
1579
- }
1580
- }
1581
- setUpGridListeners() {
1582
- this.contentObserver = new ResizeObserver(() => this.gridResizeNotify.next());
1583
- this.contentObserver.observe(this.grid.nativeElement);
1584
- this.grid.rangeSelected.pipe(takeUntil(this.destroy$))
1585
- .subscribe((args) => {
1586
- this._range = args;
1587
- if (this.chartsDirective) {
1588
- if (this.grid.getSelectedRanges().length === 1) {
1589
- this.chartsDirective.chartData = this.grid.getSelectedData();
1590
- }
1591
- else {
1592
- this.chartsDirective.chartData = [];
1593
- }
1594
- }
1595
- if (!this._collapsed) {
1596
- this.onButtonClose.emit();
1597
- }
1598
- this.renderButton();
1599
- });
1600
- this.grid.verticalScrollContainer.chunkLoad.pipe(merge(this.grid.parentVirtDir.chunkLoad, this.grid.filteringDone, this.grid.columnResized, this.grid.columnVisibilityChanged.pipe(debounceTime(30))), filter(() => this._range), takeUntil(this.destroy$)).subscribe(() => {
1601
- this.onButtonClose.emit();
1602
- this.renderButton();
1603
- });
1604
- this.grid.selected.pipe(merge(this.grid.pagingDone, this.grid.groupingDone, this.grid.perPageChange), takeUntil(this.destroy$)).subscribe((args) => {
1605
- if (this.grid.selectedCells.length < 2 || args.expressions) {
1606
- this._range = undefined;
1607
- this.close();
1608
- }
1609
- });
1610
- }
1611
- renderButton() {
1612
- if (!this._range) {
1613
- return;
1614
- }
1615
- let rowIndex = this._range.rowEnd;
1616
- let colIndex = +this._range.columnEnd;
1617
- while (colIndex >= this._range.columnStart && !this.grid.navigation.isColumnFullyVisible(colIndex)) {
1618
- colIndex--;
1619
- }
1620
- while (rowIndex >= this._range.rowStart && this.grid.navigation.shouldPerformVerticalScroll(rowIndex, -1)) {
1621
- rowIndex--;
1622
- }
1623
- const field = this.grid.visibleColumns[colIndex] ? this.grid.visibleColumns[colIndex].field : '';
1624
- const cell = this.grid.gridAPI.get_cell_by_index(rowIndex, field);
1625
- if (!cell || !this.isWithInRange(cell.row.key, cell.column.index - 1)) {
1626
- this.close();
1627
- return;
1628
- }
1629
- this._analyticsBtnSettings.positionStrategy = new AutoPositionStrategy({
1630
- horizontalDirection: HorizontalAlignment.Right,
1631
- horizontalStartPoint: HorizontalAlignment.Right,
1632
- verticalStartPoint: VerticalAlignment.Bottom,
1633
- verticalDirection: VerticalAlignment.Bottom, closeAnimation: null,
1634
- target: cell.nativeElement
1635
- });
1636
- this._analyticsBtnSettings.scrollStrategy = new AbsoluteScrollStrategy();
1637
- const info = this.overlayService.getOverlayById(this._id);
1638
- if (info) {
1639
- info.settings.positionStrategy = this._analyticsBtnSettings.positionStrategy;
1640
- }
1641
- this._collapsed ? this.show() : this.overlayService.reposition(this._id);
1642
- }
1643
- show() {
1644
- if (!this._collapsed) {
1645
- return;
1646
- }
1647
- this._collapsed = false;
1648
- this._id = this._id ? this._id :
1649
- this.overlayService.attach(IgxContextMenuComponent, this._analyticsBtnSettings);
1650
- this.overlayService.show(this._id);
1651
- }
1652
- close() {
1653
- if (this._collapsed) {
1654
- return;
1655
- }
1656
- this._collapsed = true;
1657
- this.overlayService.hide(this._id);
1658
- this.onButtonClose.emit();
1659
- this._id = undefined;
1660
- }
1661
- isWithInRange(rInex, cIndex) {
1662
- return rInex >= this._range.rowStart && rInex <= this._range.rowEnd
1663
- && cIndex >= this._range.columnStart && cIndex <= this._range.columnEnd;
1664
- }
1665
- }
1666
- IgxContextMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxContextMenuDirective, deps: [{ token: i1$1.IgxGridComponent }, { token: IgxConditionalFormattingDirective, optional: true }, { token: IgxChartIntegrationDirective, optional: true }, { token: i1$1.IgxOverlayService }], target: i0.ɵɵFactoryTarget.Directive });
1667
- IgxContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: IgxContextMenuDirective, selector: "[igxContextMenu]", outputs: { onButtonClose: "onButtonClose" }, ngImport: i0 });
1668
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxContextMenuDirective, decorators: [{
1669
- type: Directive,
1670
- args: [{
1671
- selector: '[igxContextMenu]'
1672
- }]
1673
- }], ctorParameters: function () {
1674
- return [{ type: i1$1.IgxGridComponent }, { type: IgxConditionalFormattingDirective, decorators: [{
1675
- type: Optional
1676
- }] }, { type: IgxChartIntegrationDirective, decorators: [{
1677
- type: Optional
1678
- }] }, { type: i1$1.IgxOverlayService }];
1679
- }, propDecorators: { onButtonClose: [{
1680
- type: Output
1681
- }] } });
1682
-
1683
- class IgxExtrasModule {
1684
- }
1685
- IgxExtrasModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxExtrasModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1686
- IgxExtrasModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: IgxExtrasModule, declarations: [IgxConditionalFormattingDirective,
1687
- IgxChartIntegrationDirective,
1688
- IgxContextMenuDirective,
1689
- IgxContextMenuComponent,
1690
- IgxChartMenuComponent,
1691
- SvgPipe], imports: [IgxButtonModule,
1692
- IgxDividerModule,
1693
- IgxGridModule,
1694
- IgxTabsModule,
1695
- IgxToggleModule,
1696
- IgxDataChartCategoryModule,
1697
- IgxDataChartCoreModule,
1698
- IgxLegendModule,
1699
- IgxDataChartInteractivityModule,
1700
- IgxNumericXAxisModule,
1701
- IgxNumericYAxisModule,
1702
- IgxCategoryXAxisModule,
1703
- IgxItemLegendModule,
1704
- IgxPieChartModule,
1705
- IgxDataChartStackedModule,
1706
- IgxDividerModule,
1707
- IgxDataChartScatterModule,
1708
- IgxBarSeriesModule,
1709
- IgxIconModule,
1710
- IgxCategoryChartModule], exports: [IgxConditionalFormattingDirective,
1711
- IgxChartIntegrationDirective,
1712
- IgxContextMenuDirective] });
1713
- IgxExtrasModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxExtrasModule, imports: [IgxButtonModule,
1714
- IgxDividerModule,
1715
- IgxGridModule,
1716
- IgxTabsModule,
1717
- IgxToggleModule,
1718
- IgxDataChartCategoryModule,
1719
- IgxDataChartCoreModule,
1720
- IgxLegendModule,
1721
- IgxDataChartInteractivityModule,
1722
- IgxNumericXAxisModule,
1723
- IgxNumericYAxisModule,
1724
- IgxCategoryXAxisModule,
1725
- IgxItemLegendModule,
1726
- IgxPieChartModule,
1727
- IgxDataChartStackedModule,
1728
- IgxDividerModule,
1729
- IgxDataChartScatterModule,
1730
- IgxBarSeriesModule,
1731
- IgxIconModule,
1732
- IgxCategoryChartModule] });
1733
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: IgxExtrasModule, decorators: [{
1734
- type: NgModule,
1735
- args: [{
1736
- declarations: [
1737
- IgxConditionalFormattingDirective,
1738
- IgxChartIntegrationDirective,
1739
- IgxContextMenuDirective,
1740
- IgxContextMenuComponent,
1741
- IgxChartMenuComponent,
1742
- SvgPipe
1743
- ],
1744
- imports: [
1745
- IgxButtonModule,
1746
- IgxDividerModule,
1747
- IgxGridModule,
1748
- IgxTabsModule,
1749
- IgxToggleModule,
1750
- IgxDataChartCategoryModule,
1751
- IgxDataChartCoreModule,
1752
- IgxLegendModule,
1753
- IgxDataChartInteractivityModule,
1754
- IgxNumericXAxisModule,
1755
- IgxNumericYAxisModule,
1756
- IgxCategoryXAxisModule,
1757
- IgxItemLegendModule,
1758
- IgxPieChartModule,
1759
- IgxDataChartStackedModule,
1760
- IgxDividerModule,
1761
- IgxDataChartScatterModule,
1762
- IgxBarSeriesModule,
1763
- IgxIconModule,
1764
- IgxCategoryChartModule
1765
- ],
1766
- exports: [
1767
- IgxConditionalFormattingDirective,
1768
- IgxChartIntegrationDirective,
1769
- IgxContextMenuDirective
1770
- ],
1771
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
1772
- }]
1773
- }] });
1774
-
1775
- /*
1776
- * Public API Surface of igniteui-angular-extras
1777
- */
1778
-
1779
- /**
1780
- * Generated bundle index. Do not edit.
1781
- */
1782
-
1783
- export { CHART_TYPE, ChartInitializer, ConditionalFormattingType, IgxChartIntegrationDirective, IgxChartMenuComponent, IgxConditionalFormattingDirective, IgxContextMenuComponent, IgxContextMenuDirective, IgxDataChartInitializer, IgxExtrasModule, IgxPieChartInitializer, IgxStackedDataChartInitializer, OPTIONS_TYPE };
1784
- //# sourceMappingURL=igniteui-angular-extras.mjs.map