Fix tick
This commit is contained in:
parent
6fbe5bb6ae
commit
a6eb3c56fb
@ -718,6 +718,17 @@ export class GraphListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stackchartFunc(sDate, Cuckoo, ProgPow, RandomX) {
|
stackchartFunc(sDate, Cuckoo, ProgPow, RandomX) {
|
||||||
|
|
||||||
|
let dtickval;
|
||||||
|
if(sDate.length <10)
|
||||||
|
dtickval =2*24*60*60*1000
|
||||||
|
else if(sDate.length <20)
|
||||||
|
dtickval =4*24*60*60*1000
|
||||||
|
else if(sDate.length <40)
|
||||||
|
dtickval =6*24*60*60*1000
|
||||||
|
else
|
||||||
|
dtickval =8*24*60*60*1000
|
||||||
|
|
||||||
this.stackGraphData = {
|
this.stackGraphData = {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
@ -785,6 +796,8 @@ export class GraphListComponent implements OnInit {
|
|||||||
tickformat: '%m-%d',
|
tickformat: '%m-%d',
|
||||||
rangemode: 'nonnegative',
|
rangemode: 'nonnegative',
|
||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
|
tick0:sDate[0],
|
||||||
|
dtick:dtickval
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
showline: false,
|
showline: false,
|
||||||
@ -900,6 +913,19 @@ export class GraphListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
totalBlocksFunc(DifficultychartDate, Blockval) {
|
totalBlocksFunc(DifficultychartDate, Blockval) {
|
||||||
|
|
||||||
|
|
||||||
|
let dtickval;
|
||||||
|
if(DifficultychartDate.length <10)
|
||||||
|
dtickval =2*24*60*60*1000
|
||||||
|
else if(DifficultychartDate.length <20)
|
||||||
|
dtickval =4*24*60*60*1000
|
||||||
|
else if(DifficultychartDate.length <40)
|
||||||
|
dtickval =6*24*60*60*1000
|
||||||
|
else
|
||||||
|
dtickval =8*24*60*60*1000
|
||||||
|
|
||||||
|
|
||||||
this.barGraphData = {
|
this.barGraphData = {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
@ -925,7 +951,9 @@ export class GraphListComponent implements OnInit {
|
|||||||
tickformat: '%m-%d',
|
tickformat: '%m-%d',
|
||||||
showgrid: true,
|
showgrid: true,
|
||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
rangemode: 'nonnegative'
|
rangemode: 'nonnegative',
|
||||||
|
tick0:DifficultychartDate[0],
|
||||||
|
dtick:dtickval
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
title: 'Blocks',
|
title: 'Blocks',
|
||||||
@ -1052,6 +1080,15 @@ export class GraphListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blockspersecFunc(bDate, bPeriod) {
|
blockspersecFunc(bDate, bPeriod) {
|
||||||
|
let dtickval;
|
||||||
|
if(bDate.length <10)
|
||||||
|
dtickval =2*24*60*60*1000
|
||||||
|
else if(bDate.length <20)
|
||||||
|
dtickval =4*24*60*60*1000
|
||||||
|
else if(bDate.length <40)
|
||||||
|
dtickval =6*24*60*60*1000
|
||||||
|
else
|
||||||
|
dtickval =8*24*60*60*1000
|
||||||
this.areaGraphData = {
|
this.areaGraphData = {
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
@ -1078,6 +1115,8 @@ export class GraphListComponent implements OnInit {
|
|||||||
rangemode: 'nonnegative',
|
rangemode: 'nonnegative',
|
||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
showgrid: true,
|
showgrid: true,
|
||||||
|
tick0:bDate[0],
|
||||||
|
dtick:dtickval
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
title: 'Seconds / Block',
|
title: 'Seconds / Block',
|
||||||
|
Loading…
Reference in New Issue
Block a user