fix sharerate precision and reduce graphics page size

This commit is contained in:
r4sas 2018-05-12 21:37:13 +00:00
parent e09db5c1e0
commit 30668ed502
2 changed files with 5 additions and 4 deletions

View File

@ -470,7 +470,7 @@ class Statistics extends Base {
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

View File

@ -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'],