Merge pull request #1882 from mempool/nymkappa/bugfix/pool-ranking
Fix pool ranking layout on small mobile device
This commit is contained in:
commit
f7b60f3da7
@ -200,6 +200,11 @@ export class PoolRankingComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
prepareChartOptions(miningStats) {
|
prepareChartOptions(miningStats) {
|
||||||
|
let pieSize = ['20%', '80%']; // Desktop
|
||||||
|
if (this.isMobile() && !this.widget) {
|
||||||
|
pieSize = ['15%', '60%'];
|
||||||
|
}
|
||||||
|
|
||||||
this.chartOptions = {
|
this.chartOptions = {
|
||||||
animation: false,
|
animation: false,
|
||||||
color: chartColors,
|
color: chartColors,
|
||||||
@ -215,7 +220,7 @@ export class PoolRankingComponent implements OnInit {
|
|||||||
minShowLabelAngle: 3.6,
|
minShowLabelAngle: 3.6,
|
||||||
name: 'Mining pool',
|
name: 'Mining pool',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['20%', '80%'],
|
radius: pieSize,
|
||||||
data: this.generatePoolsChartSerieData(miningStats),
|
data: this.generatePoolsChartSerieData(miningStats),
|
||||||
labelLine: {
|
labelLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
@ -224,6 +229,7 @@ export class PoolRankingComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
formatter: (serie) => `${serie.name === 'Binance Pool' ? 'Binance\nPool' : serie.name}`,
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderRadius: 1,
|
borderRadius: 1,
|
||||||
|
@ -57,7 +57,7 @@ export class MiningService {
|
|||||||
|
|
||||||
// I think it's fine to hardcode this since we don't have x1000 hashrate jump everyday
|
// I think it's fine to hardcode this since we don't have x1000 hashrate jump everyday
|
||||||
// If we want to support the mining dashboard for testnet, we can hardcode it too
|
// If we want to support the mining dashboard for testnet, we can hardcode it too
|
||||||
let selectedPower = 15;
|
let selectedPower = 18;
|
||||||
if (this.stateService.network === 'testnet') {
|
if (this.stateService.network === 'testnet') {
|
||||||
selectedPower = 12;
|
selectedPower = 12;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user