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) {
|
||||
let pieSize = ['20%', '80%']; // Desktop
|
||||
if (this.isMobile() && !this.widget) {
|
||||
pieSize = ['15%', '60%'];
|
||||
}
|
||||
|
||||
this.chartOptions = {
|
||||
animation: false,
|
||||
color: chartColors,
|
||||
@ -215,7 +220,7 @@ export class PoolRankingComponent implements OnInit {
|
||||
minShowLabelAngle: 3.6,
|
||||
name: 'Mining pool',
|
||||
type: 'pie',
|
||||
radius: ['20%', '80%'],
|
||||
radius: pieSize,
|
||||
data: this.generatePoolsChartSerieData(miningStats),
|
||||
labelLine: {
|
||||
lineStyle: {
|
||||
@ -224,6 +229,7 @@ export class PoolRankingComponent implements OnInit {
|
||||
},
|
||||
label: {
|
||||
fontSize: 14,
|
||||
formatter: (serie) => `${serie.name === 'Binance Pool' ? 'Binance\nPool' : serie.name}`,
|
||||
},
|
||||
itemStyle: {
|
||||
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
|
||||
// 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') {
|
||||
selectedPower = 12;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user