This commit is contained in:
SuriyaR 2019-08-08 14:45:05 +05:30
parent 4768f06abd
commit e0812fc24c
3 changed files with 41 additions and 8 deletions

View File

@ -23,7 +23,23 @@ import {
import { Paginate } from '../utils';
var moment = require('moment');
moment.updateLocale('en', {
relativeTime: {
future: "in %s",
past: "%s ago",
s: "seconds",
m: "1 minute",
mm: "%d minutes",
h: "1 hour",
hh: "%d hours",
d: "1 day",
dd: "%d days",
M: "1 month",
MM: "%d months",
y: "1 year",
yy: "%d years"
}
});
export class BlockchainBlockController {
public path = '/blockchain_block';
public router = express.Router();

View File

@ -1,5 +1,22 @@
import { getConnection } from "typeorm";
const moment = require("moment");
var moment = require("moment");
moment.updateLocale('en', {
relativeTime: {
future: "in %s",
past: "%s ago",
s: "seconds",
m: "1 minute",
mm: "%d minutes",
h: "1 hour",
hh: "%d hours",
d: "1 day",
dd: "%d days",
M: "1 month",
MM: "%d months",
y: "1 year",
yy: "%d years"
}
});
export async function universalGetLatestBlockDetails(socket) {

View File

@ -469,12 +469,12 @@ export class GraphListComponent implements OnInit {
{
x: DifficultychartDate,
y: TargetDifficulty,
text: TargetDifficulty,
text: DifficultychartDate,
mode: 'lines+markers',
type: 'scatter',
name: '',
line: { color: '#ac3333' },
hovertemplate: '%{x}<br> Difficulty : %{text:,}',
hovertemplate: '%{text}<br> Difficulty : %{y:,}',
},
// {
// x: DifficultychartDate,
@ -740,7 +740,6 @@ export class GraphListComponent implements OnInit {
}
growthFunc(gDate, gReward, gaddedreward) {
console.log('gDate gReward gaddedreward',gDate, gReward, gaddedreward)
this.growthGraphData = {
data: [
{
@ -776,7 +775,8 @@ export class GraphListComponent implements OnInit {
rangemode: 'nonnegative',
fixedrange: true,
showgrid: true,
tickformat :".0f"
tickformat :".0f",
tickprefix: ' '
},
margin: {
l: 50,
@ -1096,12 +1096,12 @@ export class GraphListComponent implements OnInit {
{
x: DifficultychartDate,
y: TargetDifficulty,
text: TargetDifficulty,
text: DifficultychartDate,
mode: 'lines+markers',
type: 'scatter',
name: '',
line: { color: '#ac3333' },
hovertemplate: '%{x}<br> Difficulty : %{text:,}',
hovertemplate: '%{text}<br> Difficulty : %{y:,}',
},
],
layout: {