Browse Source

Merge 3de084bcce into d9c07456cd

pull/2557/merge
Aldrin 1 year ago
committed by GitHub
parent
commit
046e6d21d7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 1
      apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html
  3. 1
      apps/client/src/app/components/home-overview/home-overview.html
  4. 1
      apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
  5. 6
      libs/ui/src/lib/line-chart/line-chart.component.ts

4
CHANGELOG.md

@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added a form validation against the DTO in the platform management of the admin control panel
- Added a form validation against the DTO in the tag management of the admin control panel
### Added
- Added support for data decimation in the line chart component
### Changed
- Set the performance column of the holdings table to stick at the end

1
apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html

@ -2,6 +2,7 @@
<gf-line-chart
class="mb-4"
[colorScheme]="user?.settings?.colorScheme"
[dataDecimation]="true"
[historicalDataItems]="historicalDataItems"
[isAnimated]="true"
[locale]="locale"

1
apps/client/src/app/components/home-overview/home-overview.html

@ -67,6 +67,7 @@
symbol="Performance"
unit="%"
[colorScheme]="user?.settings?.colorScheme"
[dataDecimation]="true"
[hidden]="historicalDataItems?.length === 0"
[historicalDataItems]="historicalDataItems"
[isAnimated]="user?.settings?.dateRange === '1d' ? false : true"

1
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html

@ -26,6 +26,7 @@
[benchmarkDataItems]="benchmarkDataItems"
[colorScheme]="data.colorScheme"
[currency]="SymbolProfile?.currency"
[dataDecimation]="true"
[historicalDataItems]="historicalDataItems"
[isAnimated]="true"
[locale]="data.locale"

6
libs/ui/src/lib/line-chart/line-chart.component.ts

@ -26,6 +26,7 @@ import {
} from '@angular/core';
import {
Chart,
Decimation,
Filler,
LineController,
LineElement,
@ -52,6 +53,7 @@ export class GfLineChartComponent
@Input() benchmarkLabel = '';
@Input() colorScheme: ColorScheme;
@Input() currency: string;
@Input() dataDecimation = false;
@Input() historicalDataItems: LineChartItem[];
@Input() isAnimated = false;
@Input() locale = getLocale();
@ -76,6 +78,7 @@ export class GfLineChartComponent
public constructor(private changeDetectorRef: ChangeDetectorRef) {
Chart.register(
Decimation,
Filler,
LineController,
LineElement,
@ -200,6 +203,9 @@ export class GfLineChartComponent
},
interaction: { intersect: false, mode: 'index' },
plugins: <unknown>{
decimation: {
enabled: this.dataDecimation
},
legend: {
align: 'start',
display: this.showLegend,

Loading…
Cancel
Save