Skip to content

Commit

Permalink
Merge pull request #766 from iotaledger/feat/improve-statistics
Browse files Browse the repository at this point in the history
Feat: Add Improvements for Statistics page charts (zooming)
  • Loading branch information
msarcev authored Apr 28, 2023
2 parents 8e64611 + bb1e4fc commit 3f7ff9f
Show file tree
Hide file tree
Showing 17 changed files with 806 additions and 351 deletions.
2 changes: 1 addition & 1 deletion api/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ module.exports = {
"off"
],
"generator-star-spacing": [
"error"
"error", {"before": false, "after": true}
],
"getter-return": [
"off"
Expand Down
4 changes: 3 additions & 1 deletion api/src/initServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { InfluxDBService } from "./services/stardust/influx/influxDbService";
import { NodeInfoService } from "./services/stardust/nodeInfoService";
import { StardustStatsService } from "./services/stardust/stats/stardustStatsService";

const CURRENCY_UPDATE_INTERVAL_MS = 5 * 60000;

const isKnownProtocolVersion = (networkConfig: INetwork) =>
networkConfig.protocolVersion === LEGACY ||
networkConfig.protocolVersion === CHRYSALIS ||
Expand Down Expand Up @@ -96,7 +98,7 @@ export async function initServices(config: IConfiguration) {
void currencyService.update();
};

setInterval(update, 60000);
setInterval(update, CURRENCY_UPDATE_INTERVAL_MS);

await update();
}
Expand Down
2 changes: 1 addition & 1 deletion client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ module.exports = {
"off"
],
"generator-star-spacing": [
"error"
"error", {"before": false, "after": true}
],
"getter-return": [
"off"
Expand Down
171 changes: 165 additions & 6 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@
"crypto": "npm:crypto-browserify",
"d3-array": "^3.2.1",
"d3-axis": "^3.0.0",
"d3-brush": "^3.0.0",
"d3-format": "^3.1.0",
"d3-scale": "^4.0.2",
"d3-selection": "^3.0.0",
"d3-shape": "^3.1.0",
"d3-time": "^3.1.0",
"d3-time-format": "^4.1.0",
"d3-transition": "^3.0.1",
"express": "^4.18.1",
"jsonschema": "^1.4.1",
"moment": "^2.29.4",
Expand All @@ -62,11 +65,14 @@
"@types/classnames": "^2.3.1",
"@types/d3-array": "^3.0.3",
"@types/d3-axis": "^3.0.1",
"@types/d3-brush": "^3.0.2",
"@types/d3-format": "^3.0.1",
"@types/d3-scale": "^4.0.2",
"@types/d3-selection": "^3.0.3",
"@types/d3-shape": "^3.1.0",
"@types/d3-time": "^3.0.0",
"@types/d3-time-format": "^4.0.0",
"@types/d3-transition": "^3.0.3",
"@types/express": "^4.17.14",
"@types/jest": "^29.0.0",
"@types/node": "^16.10.3",
Expand Down
31 changes: 0 additions & 31 deletions client/src/app/components/stardust/statistics/ChartHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,6 @@
}
}

.chart-header__select {
display: flex;
justify-content: center;
align-items: center;
.select-wrapper {
position: relative;
margin-right: 20px;

select {
cursor: pointer;
background: var(--statistics-select-bg);
color: var(--card-color);
border-color: var(--statistics-select-border);
height: 40px;

@include phone-down {
height: 32px;
}
}

.chevron {
top: 23%;
color: var(--card-color);
z-index: 1;

@include phone-down {
top: 13%;
}
}
}
}
.charts-css.legend {
padding: 1rem;
border: 1px solid var(--legend-border-color);
Expand Down
Loading

0 comments on commit 3f7ff9f

Please sign in to comment.