Add default chart label options and fix context menu repositioning
1018a07c
dobromirts
committed
3 changed files
context-menu.component.scss
/projects/igniteui-angular-extras/src/lib/context-menu/context-menu.component.scss-1+2
/projects/igniteui-angular-extras/src/lib/context-menu/context-menu.component.scss
Add comment 15 $focus-foreground: contrast-color($color: 'gray', $variant: 900),
Add comment 16 $border-radius: 0
Add comment 17 );
Add comment 18 Minus  
Add comment 19 18 .analytics-button {
Add comment 20 19 @include css-vars($analytics-btn);
Add comment 20 Plus   & {
Add comment 21 --ig-size: var(--ig-size-small);
Add comment 22 }
Add comment 23 }
Add comment 24 Plus  }
Add comment 24 25
Add comment 25 26 .disableButton {
Add comment 26 27 opacity: .4;
igx-context-menu.directive.ts
/projects/igniteui-angular-extras/src/lib/context-menu/igx-context-menu.directive.ts-2+2
/projects/igniteui-angular-extras/src/lib/context-menu/igx-context-menu.directive.ts
Add comment 106 this.renderHeaderButton();
Add comment 107 });
Add comment 108
Add comment 109 Minus   this.grid.rangeSelected.pipe(takeUntil(this.destroy$))
Add comment 109 Plus   this.grid.rangeSelected.pipe(takeUntil(this.destroy$), debounceTime(200))
Add comment 110 .subscribe((args) => {
Add comment 111 this._range = args;
Add comment 112 if (this.chartsDirective) {
Add comment 123 });
Add comment 124 this.grid.verticalScrollContainer.chunkLoad.pipe(
Add comment 125 merge(this.grid.parentVirtDir.chunkLoad, this.grid.filteringDone, this.grid.columnResized,
Add comment 126 Minus   this.grid.columnVisibilityChanged.pipe(debounceTime(30))),
Add comment 126 Plus   this.grid.columnVisibilityChanged.pipe(debounceTime(200))),
Add comment 127 filter(() => this._range), takeUntil(this.destroy$)).subscribe(() => {
Add comment 128 this.onButtonClose.emit();
Add comment 129 this.renderButton();
chart-integration.directive.ts
/projects/igniteui-angular-extras/src/lib/directives/chart-integration/chart-integration.directive.ts-2+22
/projects/igniteui-angular-extras/src/lib/directives/chart-integration/chart-integration.directive.ts
Add comment 322 };
Add comment 323 seriesOptions.push({ ...dataOptions, ...model });
Add comment 324 });
Add comment 325 Plus   chartComponentOptions.xAxisOptions = Object.assign({
Add comment 326 Plus   labelExtent: NaN,
Add comment 327 Plus   labelTextColor: null,
Add comment 328 Plus   });
Add comment 329 Plus   chartComponentOptions.yAxisOptions = Object.assign({
Add comment 330 Plus   labelTextColor: null,
Add comment 331 Plus   labelExtent: NaN,
Add comment 332 Plus   });
Add comment 325 333 chartComponentOptions.seriesOptions = seriesOptions;
Add comment 326 334 }
Add comment 327 335
Add comment 333 341 private setAxisLabelOption(type: CHART_TYPE, options: IChartComponentOptions) {
Add comment 334 342 if (type.indexOf('Bar') !== -1) {
Add comment 335 343 options.yAxisOptions = Object.assign({
Add comment 336 Minus   label: this._labelMemberPath
Add comment 344 Plus   label: this._labelMemberPath,
Add comment 345 Plus   labelTextColor: null,
Add comment 346 Plus   labelExtent: NaN,
Add comment 337 347 }, this.customChartComponentOptions.get(type).yAxisOptions);
Add comment 348 Plus   options.xAxisOptions = Object.assign({
Add comment 349 Plus   labelTextColor: null,
Add comment 350 Plus   labelExtent: NaN,
Add comment 351 Plus   });
Add comment 338 352 } else {
Add comment 339 353 options.xAxisOptions = Object.assign({
Add comment 340 Minus   label: this._labelMemberPath
Add comment 354 Plus   label: this._labelMemberPath,
Add comment 355 Plus   labelTextColor: null,
Add comment 356 Plus   labelExtent: NaN,
Add comment 341 357 }, this.customChartComponentOptions.get(type).xAxisOptions);
Add comment 358 Plus   options.yAxisOptions = Object.assign({
Add comment 359 Plus   labelTextColor: null,
Add comment 360 Plus   labelExtent: NaN,
Add comment 361 Plus   })
Add comment 342 362 }
Add comment 343 363 }
Add comment 344 364