Browse Source

Harmonize axis style

pull/1768/head
Thomas 3 years ago
parent
commit
043ce16414
  1. 1
      apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html
  2. 17
      apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
  3. 1
      apps/client/src/app/components/home-market/home-market.html
  4. 15
      apps/client/src/app/components/investment-chart/investment-chart.component.ts
  5. 18
      libs/ui/src/lib/line-chart/line-chart.component.ts

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

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

17
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts

@ -166,7 +166,6 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy {
}, },
display: true, display: true,
grid: { grid: {
color: `rgba(${getTextColor(this.colorScheme)}, 0.8)`,
display: false display: false
}, },
type: 'time', type: 'time',
@ -177,13 +176,21 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy {
}, },
y: { y: {
border: { border: {
color: `rgba(${getTextColor(this.colorScheme)}, 0.1)`, width: 0
display: false
}, },
display: true, display: true,
grid: { grid: {
color: `rgba(${getTextColor(this.colorScheme)}, 0.8)`, color: ({ scale, tick }) => {
display: false if (
tick.value === 0 ||
tick.value === scale.max ||
tick.value === scale.min
) {
return `rgba(${getTextColor(this.colorScheme)}, 0.1)`;
}
return 'transparent';
}
}, },
position: 'right', position: 'right',
ticks: { ticks: {

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

@ -10,6 +10,7 @@
symbol="Fear & Greed Index" symbol="Fear & Greed Index"
yMax="100" yMax="100"
yMin="0" yMin="0"
[colorScheme]="user?.settings?.colorScheme"
[historicalDataItems]="historicalDataItems" [historicalDataItems]="historicalDataItems"
[isAnimated]="true" [isAnimated]="true"
[locale]="user?.settings?.locale" [locale]="user?.settings?.locale"

15
apps/client/src/app/components/investment-chart/investment-chart.component.ts

@ -283,7 +283,6 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
}, },
display: true, display: true,
grid: { grid: {
color: `rgba(${getTextColor(this.colorScheme)}, 0.8)`,
display: false display: false
}, },
min: this.daysInMarket min: this.daysInMarket
@ -298,13 +297,21 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
}, },
y: { y: {
border: { border: {
color: `rgba(${getTextColor(this.colorScheme)}, 0.1)`,
display: false display: false
}, },
display: !this.isInPercent, display: !this.isInPercent,
grid: { grid: {
color: `rgba(${getTextColor(this.colorScheme)}, 0.8)`, color: ({ scale, tick }) => {
display: false if (
tick.value === 0 ||
tick.value === scale.max ||
tick.value === scale.min
) {
return `rgba(${getTextColor(this.colorScheme)}, 0.1)`;
}
return 'transparent';
}
}, },
position: 'right', position: 'right',
ticks: { ticks: {

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

@ -217,7 +217,6 @@ export class LineChartComponent implements AfterViewInit, OnChanges, OnDestroy {
}, },
display: this.showXAxis, display: this.showXAxis,
grid: { grid: {
color: `rgba(${getTextColor(this.colorScheme)}, 0.8)`,
display: false display: false
}, },
time: { time: {
@ -228,12 +227,23 @@ export class LineChartComponent implements AfterViewInit, OnChanges, OnDestroy {
}, },
y: { y: {
border: { border: {
color: `rgba(${getTextColor(this.colorScheme)}, 0.1)` width: 0
}, },
display: this.showYAxis, display: this.showYAxis,
grid: { grid: {
color: `rgba(${getTextColor(this.colorScheme)}, 0.8)`, color: ({ scale, tick }) => {
display: false if (
tick.value === 0 ||
tick.value === scale.max ||
tick.value === scale.min ||
tick.value === this.yMax ||
tick.value === this.yMin
) {
return `rgba(${getTextColor(this.colorScheme)}, 0.1)`;
}
return 'transparent';
}
}, },
max: this.yMax, max: this.yMax,
min: this.yMin, min: this.yMin,

Loading…
Cancel
Save