Permalink
Browse files

fix sharerate precision and reduce graphics page size

  • Loading branch information...
r4sas committed May 12, 2018
1 parent e09db5c commit 30668ed502c3fe948c9a951313e0c101daa532ef
Showing with 5 additions and 4 deletions.
  1. +1 −1 include/classes/statistics.class.php
  2. +4 −3 templates/bootstrap/statistics/graphs/default.tpl
@@ -470,7 +470,7 @@ public function fetchAllUserMiningStats($interval=180) {
a.username AS account,
COUNT(DISTINCT t1.username) AS workers,
IFNULL(SUM(t1.difficulty), 0) AS shares,
ROUND(SUM(t1.difficulty) / ?, 2) AS sharerate,
ROUND(SUM(t1.difficulty) / ?, " . $this->coin->getShareDifficultyPrecision() . ") AS sharerate,
IFNULL(AVG(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)), 0) AS avgsharediff
FROM (
SELECT
@@ -1,8 +1,9 @@
<script>
$(function () {
var miningstats = {$YOURMININGSTATS nofilter};
var hashChart = Morris.Line({
element: 'hashrate-area-chart',
data: {$YOURMININGSTATS nofilter},
data: miningstats,
xkey: 'time',
ykeys: ['hashrate'],
labels: ['Hashrate'],
@@ -17,7 +18,7 @@ $(function () {
var workersChart = Morris.Line({
element: 'workers-area-chart',
data: {$YOURMININGSTATS nofilter},
data: miningstats,
xkey: 'time',
ykeys: ['workers'],
labels: ['Workers'],
@@ -32,7 +33,7 @@ $(function () {
var shareCharts= Morris.Line({
element: 'sharerate-area-chart',
data: {$YOURMININGSTATS nofilter},
data: miningstats,
xkey: 'time',
ykeys: ['sharerate'],
labels: ['Sharerate'],

0 comments on commit 30668ed

Please sign in to comment.