add wownero charts

This commit is contained in:
stoffu
2018-07-27 17:00:14 +09:00
parent 060c30703a
commit 89d83031a2
5 changed files with 33689 additions and 33263 deletions
+92
View File
@@ -0,0 +1,92 @@
<html>
<header><title>Wownero block reward</title>
<!-- Styles -->
<style>
#chartdiv {
width : 100%;
height : 500px;
}
</style>
<!-- Resources -->
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script src="wownero-data-0.js"></script>
<!-- Chart code -->
<script>
var chartData = chartData_0;
chartData.shift();
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"marginRight": 80,
"autoMarginOffset": 20,
"marginTop": 7,
"dataProvider": chartData,
"valueAxes": [{
"axisAlpha": 0,
}],
"mouseWheelZoomEnabled": true,
"graphs": [{
"id": "g1",
"lineColor": "#ffa366",
"balloonText": "Reward: <b>[[value]]</b>\nHeight: <b>[[height]]</b>",
"bullet": "round",
"bulletBorderAlpha": 1,
"bulletColor": "#FFFFFF",
"hideBulletsCount": 50,
"title": "block reward",
"valueField": "reward",
"useLineColorForBulletBorder": true,
"balloon":{
"cornerRadius": 10,
}
}],
"chartScrollbar": {
"autoGridCount": true,
"graph": "g1",
"scrollbarHeight": 40
},
"chartCursor": {
"pan": false
},
"categoryField": "date",
"categoryAxis": {
"parseDates": true,
"minPeriod": "ss",
"axisColor": "#DADADA",
"dashLength": 1,
"minorGridEnabled": true
},
"export": {
"enabled": true,
"position": "bottom-right"
}
});
chart.addListener("rendered", zoomChart);
zoomChart();
// this method is called when chart is first inited as we listen for "rendered" event
function zoomChart() {
// different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
chart.zoomToIndexes(0, chartData.length - 1);
}
function togglePan() {
chart.chartCursor.pan = document.getElementById("pan").checked;
}
</script>
</header>
<body>
<h1>Wownero block reward</h1>
<div id="chartdiv"></div>
<p><input type="checkbox" id="pan" onclick="togglePan()">Enable panning</p>
</body>
</html>
+107
View File
@@ -0,0 +1,107 @@
<html>
<header><title>Wownero block size</title>
<!-- Styles -->
<style>
#chartdiv {
width : 100%;
height : 500px;
}
</style>
<!-- Resources -->
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script src="wownero-data-0.js"></script>
<!-- Chart code -->
<script>
var chartData = chartData_0;
chartData.shift();
// https://stackoverflow.com/a/18650828
function formatBytes(bytes, decimal) {
if (0 == bytes)
return "0 bytes";
var c = 1024;
var d = decimal || 2;
var e = ["bytes", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
var f = Math.floor(Math.log(bytes) / Math.log(c));
return "<b>" + parseFloat((bytes / Math.pow(c, f)).toFixed(d)) + "</b> " + e[f]
}
for (var i = 0; i < chartData.length; ++i) {
chartData[i].block_size_str = formatBytes(chartData[i].block_size, 3);
}
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"marginRight": 80,
"autoMarginOffset": 20,
"marginTop": 7,
"dataProvider": chartData,
"valueAxes": [{
"axisAlpha": 0,
}],
"mouseWheelZoomEnabled": true,
"graphs": [{
"id": "g1",
"lineColor": "#9bc408",
"balloonText": "Size: [[block_size_str]]\nHeight: <b>[[height]]</b>",
"bullet": "round",
"bulletBorderAlpha": 1,
"bulletColor": "#FFFFFF",
"hideBulletsCount": 50,
"title": "block size",
"valueField": "block_size",
"useLineColorForBulletBorder": true,
"balloon":{
"cornerRadius": 10,
}
}],
"chartScrollbar": {
"autoGridCount": true,
"graph": "g1",
"scrollbarHeight": 40
},
"chartCursor": {
"pan": false
},
"categoryField": "date",
"categoryAxis": {
"parseDates": true,
"minPeriod": "ss",
"axisColor": "#DADADA",
"dashLength": 1,
"minorGridEnabled": true
},
"export": {
"enabled": true,
"position": "bottom-right"
}
});
chart.addListener("rendered", zoomChart);
zoomChart();
// this method is called when chart is first inited as we listen for "rendered" event
function zoomChart() {
// different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
chart.zoomToIndexes(0, chartData.length - 1);
}
function togglePan() {
chart.chartCursor.pan = document.getElementById("pan").checked;
}
</script>
</header>
<body>
<h1>Wownero block size</h1>
<div id="chartdiv"></div>
<p><input type="checkbox" id="pan" onclick="togglePan()">Enable panning</p>
</body>
</html>
+33369 -33255
View File
File diff suppressed because it is too large Load Diff
+114
View File
@@ -0,0 +1,114 @@
<html>
<header><title>Wownero transactions per day</title>
<!-- Styles -->
<style>
#chartdiv {
width : 100%;
height : 500px;
}
</style>
<!-- Resources -->
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script src="wownero-data-0.js"></script>
<!-- Chart code -->
<script>
var chartData = chartData_0;
chartData.shift();
var chartData_tpd = [];
var last_date = "";
var num_txes = 0;
for (var i = 0; i < chartData.length; ++i) {
var block = chartData[i];
var block_date = block.date.substr(0, 10);
if (last_date === "") {
last_date = block_date;
}
if (Date.parse(last_date) < Date.parse(block_date) || i == chartData.length - 1) {
chartData_tpd.push({
"date": last_date,
"num_txes": num_txes,
});
last_date = block_date;
num_txes = 0;
} else {
num_txes += block.num_txes;
}
}
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"marginRight": 80,
"autoMarginOffset": 20,
"marginTop": 7,
"dataProvider": chartData_tpd,
"valueAxes": [{
"axisAlpha": 0.2,
"dashLength": 1,
"position": "left",
}],
"mouseWheelZoomEnabled": true,
"graphs": [{
"id": "g1",
"lineColor": "#cc99ff",
"balloonText": "<b>[[value]]</b>",
"bullet": "round",
"bulletBorderAlpha": 1,
"bulletColor": "#FFFFFF",
"hideBulletsCount": 50,
"title": "red line",
"valueField": "num_txes",
"useLineColorForBulletBorder": true,
"balloon":{
"cornerRadius": 10,
}
}],
"chartScrollbar": {
"autoGridCount": true,
"graph": "g1",
"scrollbarHeight": 40
},
"chartCursor": {
"limitToGraph":"g1",
"pan": false
},
"categoryField": "date",
"categoryAxis": {
"parseDates": true,
"axisColor": "#DADADA",
"dashLength": 1,
"minorGridEnabled": true
},
"export": {
"enabled": true
}
});
chart.addListener("rendered", zoomChart);
zoomChart();
// this method is called when chart is first inited as we listen for "rendered" event
function zoomChart() {
// different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues
chart.zoomToIndexes(0, chartData.length - 1);
}
function togglePan() {
chart.chartCursor.pan = document.getElementById("pan").checked;
}
</script>
</header>
<body>
<h1>Wownero transactions per day</h1>
<div id="chartdiv"></div>
<p><input type="checkbox" id="pan" onclick="togglePan()">Enable panning</p>
</body>
</html>
+7 -8
View File
@@ -1,5 +1,5 @@
<html>
<header><title>Wownero difficulty chart</title>
<header><title>Wownero difficulty</title>
<!-- Styles -->
<style>
#chartdiv {
@@ -29,20 +29,19 @@ var chart = AmCharts.makeChart("chartdiv", {
"marginTop": 7,
"dataProvider": chartData,
"valueAxes": [{
"axisAlpha": 0.2,
"dashLength": 1,
"position": "left",
"axisAlpha": 0,
"logarithmic": true
}],
"mouseWheelZoomEnabled": true,
"graphs": [{
"id": "g1",
"lineColor": "#67B7DC",
"balloonText": "Diff: <b>[[value]]</b>\nHeight: <b>[[height]]</b>",
"bullet": "round",
"bulletBorderAlpha": 1,
"bulletColor": "#FFFFFF",
"hideBulletsCount": 50,
"title": "red line",
"title": "difficulty",
"valueField": "difficulty",
"useLineColorForBulletBorder": true,
"balloon":{
@@ -55,7 +54,6 @@ var chart = AmCharts.makeChart("chartdiv", {
"scrollbarHeight": 40
},
"chartCursor": {
"limitToGraph":"g1",
"pan": false
},
"categoryField": "date",
@@ -67,7 +65,8 @@ var chart = AmCharts.makeChart("chartdiv", {
"minorGridEnabled": true
},
"export": {
"enabled": true
"enabled": true,
"position": "bottom-right"
}
});
@@ -92,7 +91,7 @@ function togglePan() {
</script>
</header>
<body>
<h1>Wownero difficulty chart</h1>
<h1>Wownero difficulty</h1>
<div id="chartdiv"></div>
<p><input type="checkbox" id="log_scale" onclick="toggleLogScale()" checked>Log scale</p>
<p><input type="checkbox" id="pan" onclick="togglePan()">Enable panning</p>