final version

This commit is contained in:
anon 2022-08-12 16:35:47 -03:00
parent e6efb887b0
commit a198961d4c
7 changed files with 908 additions and 19 deletions

View file

@ -123,7 +123,7 @@
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePrice" <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePrice"
aria-expanded="true" aria-controls="collapsePrice"> aria-expanded="true" aria-controls="collapsePrice">
<i class="bx bx-dollar"></i> <i class="bx bx-dollar"></i>
<span>Price (17)</span> <span>Price (18)</span>
</a> </a>
<div id="collapsePrice" class="collapse" aria-labelledby="headingPrice" <div id="collapsePrice" class="collapse" aria-labelledby="headingPrice"
data-parent="#accordionSidebar"> data-parent="#accordionSidebar">
@ -132,6 +132,7 @@
<a class="collapse-item" href="{% url 'charts:pricelog' %}">Price in Dollars (Log.)</a> <a class="collapse-item" href="{% url 'charts:pricelog' %}">Price in Dollars (Log.)</a>
<a class="collapse-item" href="{% url 'charts:pricelin' %}">Price in Dollars (Lin.)</a> <a class="collapse-item" href="{% url 'charts:pricelin' %}">Price in Dollars (Lin.)</a>
<a class="collapse-item" href="{% url 'charts:pricesats' %}">Price in Sats (Lin.)</a> <a class="collapse-item" href="{% url 'charts:pricesats' %}">Price in Sats (Lin.)</a>
<a class="collapse-item" href="{% url 'charts:pricesatslog' %}">Price in Sats (Log.) <span class="badge badge-pill badge-danger">New</span></a>
<a class="collapse-item" href="{% url 'charts:fractal' %}">Fractal Multiple</a> <a class="collapse-item" href="{% url 'charts:fractal' %}">Fractal Multiple</a>
<a class="collapse-item" href="{% url 'charts:inflationfractal' %}">Inflation-Adjusted Fractal</a> <a class="collapse-item" href="{% url 'charts:inflationfractal' %}">Inflation-Adjusted Fractal</a>
<a class="collapse-item" href="{% url 'charts:golden' %}">Golden Ratio Multiplier</a> <a class="collapse-item" href="{% url 'charts:golden' %}">Golden Ratio Multiplier</a>
@ -144,8 +145,8 @@
<a class="collapse-item" href="{% url 'charts:powerlaw' %}">Power Law</a> <a class="collapse-item" href="{% url 'charts:powerlaw' %}">Power Law</a>
<a class="collapse-item" href="{% url 'charts:thermocap' %}">Thermocap Multiple</a> <a class="collapse-item" href="{% url 'charts:thermocap' %}">Thermocap Multiple</a>
<a class="collapse-item" href="{% url 'charts:sharpe' %}">Sharpe Ratio</a> <a class="collapse-item" href="{% url 'charts:sharpe' %}">Sharpe Ratio</a>
<a class="collapse-item" href="{% url 'charts:deviation' %}">Price Deviation</a> <a class="collapse-item" href="{% url 'charts:deviation' %}">Price Deviation <span class="badge badge-pill badge-secondary">New</span</a>
<a class="collapse-item" href="{% url 'charts:marketcycle' %}">Market Cycle</a> <a class="collapse-item" href="{% url 'charts:marketcycle' %}">Market Cycle <span class="badge badge-pill badge-danger">New</span></a>
</div> </div>
</div> </div>
</li> </li>
@ -174,7 +175,7 @@
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTransactions" <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTransactions"
aria-expanded="true" aria-controls="collapseTransactions"> aria-expanded="true" aria-controls="collapseTransactions">
<i class="bx bx-transfer"></i> <i class="bx bx-transfer"></i>
<span>Transactions (14)</span> <span>Transactions (15)</span>
</a> </a>
<div id="collapseTransactions" class="collapse" aria-labelledby="headingTransactions" <div id="collapseTransactions" class="collapse" aria-labelledby="headingTransactions"
data-parent="#accordionSidebar"> data-parent="#accordionSidebar">
@ -189,11 +190,12 @@
<a class="collapse-item" href="{% url 'charts:percentmonth' %}">Monthly Percentage (Lin.)</a> <a class="collapse-item" href="{% url 'charts:percentmonth' %}">Monthly Percentage (Lin.)</a>
<a class="collapse-item" href="{% url 'charts:metcalfesats' %}">Metcalfe's Law (Sats)</a> <a class="collapse-item" href="{% url 'charts:metcalfesats' %}">Metcalfe's Law (Sats)</a>
<a class="collapse-item" href="{% url 'charts:metcalfeusd' %}">Metcalfe's Law ($)</a> <a class="collapse-item" href="{% url 'charts:metcalfeusd' %}">Metcalfe's Law ($)</a>
<a class="collapse-item" href="{% url 'charts:metcalfesats_deviation' %}">Metcalfe's Deviation (Sats)</a> <a class="collapse-item" href="{% url 'charts:metcalfesats_deviation' %}">Metc. Deviation (Sats) <span class="badge badge-pill badge-danger">New</span></a>
<a class="collapse-item" href="{% url 'charts:metcalfe_deviation' %}">Metcalfe's Deviation ($)</a> <a class="collapse-item" href="{% url 'charts:metcalfe_deviation' %}">Metcalfe Deviation ($) <span class="badge badge-pill badge-danger">New</span></a>
<a class="collapse-item" href="{% url 'charts:deviation_tx' %}">Transacted Price Deviation</a> <a class="collapse-item" href="{% url 'charts:deviation_tx' %}">Transac. Price Dev. <span class="badge badge-pill badge-secondary">New</span</a>
<a class="collapse-item" href="{% url 'charts:transactiondominance' %}">Transaction Dominance</a> <a class="collapse-item" href="{% url 'charts:transactiondominance' %}">Transac. Dominance <span class="badge badge-pill badge-secondary">New</span</a>
<a class="collapse-item" href="{% url 'charts:shielded' %}">Shielded Transactions</a> <a class="collapse-item" href="{% url 'charts:shielded' %}">Shielded Transactions <span class="badge badge-pill badge-danger">New</span></a>
<a class="collapse-item" href="{% url 'charts:comptransactions' %}">Competitors' Transac. <span class="badge badge-pill badge-danger">New</span></a></a>
</div> </div>
</div> </div>
</li> </li>
@ -261,11 +263,11 @@
<a class="collapse-item" href="{% url 'charts:blockchainsize' %}">Blockchain Size (Bytes)</a> <a class="collapse-item" href="{% url 'charts:blockchainsize' %}">Blockchain Size (Bytes)</a>
<a class="collapse-item" href="{% url 'charts:transactionsize' %}">Transaction Size (Bytes)</a> <a class="collapse-item" href="{% url 'charts:transactionsize' %}">Transaction Size (Bytes)</a>
<a class="collapse-item" href="{% url 'charts:difficulty' %}">Mining Difficulty</a> <a class="collapse-item" href="{% url 'charts:difficulty' %}">Mining Difficulty</a>
<a class="collapse-item" href="{% url 'charts:securitybudget' %}">Security Budget</a> <a class="collapse-item" href="{% url 'charts:securitybudget' %}">Security Budget <span class="badge badge-pill badge-secondary">New</span></a>
<a class="collapse-item" href="{% url 'charts:efficiency' %}">Breakeven Efficiency</a> <a class="collapse-item" href="{% url 'charts:efficiency' %}">Breakeven Efficiency <span class="badge badge-pill badge-secondary">New</span></a>
<a class="collapse-item" href="{% url 'charts:p2pool_hashrate' %}">P2Pool Hashrate</a> <a class="collapse-item" href="{% url 'charts:p2pool_hashrate' %}">P2Pool Hashrate <span class="badge badge-pill badge-danger">New</span></a>
<a class="collapse-item" href="{% url 'charts:p2pool_miners' %}">P2Pool Miners</a> <a class="collapse-item" href="{% url 'charts:p2pool_miners' %}">P2Pool Miners <span class="badge badge-pill badge-danger">New</span></a>
<a class="collapse-item" href="{% url 'charts:p2pool_totalblocks' %}">P2Pool Blocks Found</a> <a class="collapse-item" href="{% url 'charts:p2pool_totalblocks' %}">P2Pool Blocks Found <span class="badge badge-pill badge-danger">New</span></a>
<!-- <!--
<a class="collapse-item" href="{% url 'charts:difficulty' %}">Reward / Hashrate</a> <a class="collapse-item" href="{% url 'charts:difficulty' %}">Reward / Hashrate</a>
--> -->
@ -368,8 +370,8 @@
data-parent="#accordionSidebar"> data-parent="#accordionSidebar">
<div class="py-2 collapse-inner rounded"> <div class="py-2 collapse-inner rounded">
<h6 class="collapse-header text-dark">Info:</h6> <h6 class="collapse-header text-dark">Info:</h6>
<a class="collapse-item" href="{% url 'charts:pageviews' %}">Pageviews <span class="badge badge-pill badge-secondary">New</span></a>
<a class="collapse-item" href="{% url 'charts:about' %}">About Us</a> <a class="collapse-item" href="{% url 'charts:about' %}">About Us</a>
<a class="collapse-item" href="{% url 'charts:pageviews' %}">Pageviews</a>
<a class="collapse-item" href="https://twitter.com/CryptoMorpheus_" target="_blank">Twitter</a> <a class="collapse-item" href="https://twitter.com/CryptoMorpheus_" target="_blank">Twitter</a>
</div> </div>
</div> </div>

View file

@ -0,0 +1,429 @@
{% extends 'charts/base.html' %}
{% block header %}
<title>Moneroj.net - Inflation</title>
{% endblock %}
{% block content %}
<!-- Content Wrapper -->
<div id="content-wrapper" style="background-color:rgb(48, 44, 41)">
<!-- Main Content -->
<div id="content">
<!-- Begin Page Content -->
<div class="container-fluid"><br>
<div class="row">
<div class="col-xl-12 col-lg-12">
<div class="card" id="graph1">
<div
class="card-header py-3 d-flex flex-row align-items-center justify-content-between text-white">
<h6 class="m-0 text-light">Daily Transactions for Monero and its competitors (Bitcoin and
privacy-oriented Dash, Zcash and Grin)</h6>
<div class="dropdown no-arrow">
<a class="dropdown-toggle" href="#" role="button"
onclick="$('#graph1').toggleClass('fullscreen');window.dispatchEvent(new Event('resize'));">
<i class="bx bx-expand text-gray-400"></i>
</a>
</div>
</div>
<div class="card-body pb-0 pt-0 pl-0 pr-0" style="height: 100px;">
<div id="graph" style="height: 100%; width:100%;"></div>
</div>
</div>
<br>
</div>
</div>
<!-- Content Row -->
<div class="row">
<!-- Earnings (Monthly) Card Example -->
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-new h-100 py-2">
<div class="card-body">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">
Monero Daily Transactions</div>
<div class="h5 mb-0 font-weight-bold text-gray-800">{{ now_xmr }}</div>
</div>
</div>
</div>
<!-- Earnings (Monthly) Card Example -->
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-new h-100 py-2">
<div class="card-body">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">
Dash Daily Transactions</div>
<div class="h5 mb-0 font-weight-bold text-gray-800">{{ now_dash }}</div>
</div>
</div>
</div>
<!-- Earnings (Monthly) Card Example -->
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-new h-100 py-2">
<div class="card-body">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">
Zcash Daily Transactions</div>
<div class="h5 mb-0 font-weight-bold text-gray-800">{{ now_zcash }}</div>
</div>
</div>
</div>
<!-- Earnings (Monthly) Card Example -->
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-new h-100 py-2">
<div class="card-body">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">
Grin Daily Transactions</div>
<div class="h5 mb-0 font-weight-bold text-gray-800">{{ now_grin }}</div>
</div>
</div>
</div>
</div>
<!-- Content Row -->
<div class="row">
<div class="col-xl-11 col-md-6 mb-4">
<div class="alert alert-dark" role="alert">
This page was created to help Monero's community, but this isn't financial advice. Invest at
your own risk.
For information about the chart, click the button >
</div>
</div>
<div class="col-xl-1">
<button type="button" class="btn btn-dark btn-block" data-toggle="modal" href="#"
data-target="#id_Modal">
<div class="col-auto">
+
</div>
</button>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
</div>
<!-- End of Content Wrapper -->
<!-- Modal -->
<div class="modal fade" id="id_Modal" tabindex="-1" role="dialog" aria-labelledby="Modal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="Modal">Help about the chart</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Cancelar">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
This chart shows a comparison between the daily transaction numbers for Bitcoin, Monero and the other major privacy-oriented cryptocurrencies. Chart provided as courtesy from Cake Wallet and Monero.com. <a href="https://monero.com/charts/total_transactions" target="_blank">Link.</a><br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Fim do Modal -->
<!-- Page level plugins -->
<script>
var data3 = {
type: "scatter",
mode: "lines",
name: 'Dash Daily Transactions',
x: {{ dates|safe }},
y: {{ dash|safe }},
line: {
color: '#2f21f7'
,width: 2
}
};
var data3_mobile = {
type: "scatter",
mode: "lines",
name: 'Dash Daily Transactions',
x: {{ dates|safe }},
y: {{ dash|safe }},
line: {
color: '#2f21f7'
,width: 2
}
};
var data1 = {
type: "scatter",
mode: "lines",
name: 'Grin Daily Transactions',
x: {{ dates|safe }},
y: {{ grin|safe }},
line: {
color: '#dcdf30'
,width: 2
}
};
var data1_mobile = {
type: "scatter",
mode: "lines",
name: 'Grin Daily Transactions',
x: {{ dates|safe }},
y: {{ grin|safe }},
line: {
color: '#dcdf30'
,width: 2
}
};
var data4 = {
type: "scatter",
mode: "lines",
name: 'Zcash Daily Transactions',
x: {{ dates|safe }},
y: {{ zcash|safe }},
line: {
color: '#ffb6a0'
,width: 2
}
};
var data4_mobile = {
type: "scatter",
mode: "lines",
name: 'Zcash Daily Transactions',
x: {{ dates|safe }},
y: {{ zcash|safe }},
line: {
color: '#ffb6a0'
,width: 2
}
};
var data2 = {
type: "scatter",
mode: "lines",
name: 'Monero Daily Transactions',
x: {{ dates|safe }},
y: {{ xmr|safe }},
line: {
color: '#dd1d1d'
,width: 2
}
};
var data2_mobile = {
type: "scatter",
mode: "lines",
name: 'Monero Daily Transactions',
x: {{ dates|safe }},
y: {{ xmr|safe }},
line: {
color: '#dd1d1d'
,width: 2
}
};
var data5 = {
type: "scatter",
mode: "lines",
name: 'Bitcoin Daily Transactions',
x: {{ dates|safe }},
y: {{ btc|safe }},
line: {
color: '#ff9d1d'
,width: 2
}
};
var data5_mobile = {
type: "scatter",
mode: "lines",
name: 'Bitcoin Daily Transactions',
x: {{ dates|safe }},
y: {{ btc|safe }},
line: {
color: '#ff9d1d'
,width: 2
}
};
var data = [data3, data1, data4, data5, data2];
var data_mobile = [data3_mobile, data1_mobile, data4_mobile, data5_mobile, data2_mobile];
var layout = {
plot_bgcolor:"#252221",
paper_bgcolor:"#252221",
annotations: [
{
xref: 'paper',
yref: 'paper',
x: 0.02,
xanchor: 'auto',
y: 0.98,
yanchor: 'auto',
text: 'Moneroj<br>https://www.moneroj.net<br>Chart provided as courtesy from Cake Wallet and Monero.com',
showarrow: false,
borderwidth: 1,
bordercolor: '#5f5f5f',
bgcolor: '#333333',
borderpad: 5,
align: 'center',
font: {
color: "white",
size: 12
}
}],
separators: ",.",
legend: {
x: 0.02,
y: 0.85,
bgcolor: '#333333',
bordercolor: '#5f5f5f',
borderwidth: 1,
font: {
color: 'white',
size: 12
},
traceorder: 'normal',
xanchor: 'auto',
yanchor: 'auto'
},
hoverlabel: {
namelength: -1
},
yaxis: {
type: "log",
title: {
text: 'Transactions',
font: {
size: 20,
color: 'white'
}
},
tickformat :",.0f"
,nticks: 10
,tickfont: {
color: "#ffffff"
,size: 12
}
,gridcolor: "#333333"
},
xaxis: {
hoverformat: "%Y-%m-%d",
showgrid: true,
type: 'date',
nticks: 10
,tickfont: {
color: "#dddddd"
,size: 13
}
,gridcolor: "#333333"
,range: ['2010-03-20', '2024-06-01']
,zeroline: true
},
margin: {
l: 120,
r: 60,
b: 35,
t: 10,
pad: 4
}
};
var layout_mobile = {
plot_bgcolor:"black",
paper_bgcolor:"black",
separators: ",.",
hoverlabel: {
namelength: -1
},
legend: {
x: 0.02,
y: 0.98,
bgcolor: '#000000',
bordercolor: '#5f5f5f',
borderwidth: 1,
font: {
color: 'white',
size: 5
},
traceorder: 'normal',
xanchor: 'auto',
yanchor: 'auto'
},
showlegend: false,
yaxis: {
type: "log",
tickformat :",.0f"
,nticks: 10
,tickfont: {
color: "#ffffff"
,size: 7
}
,gridcolor: "#444444"
},
xaxis: {
hoverformat: "%Y",
showgrid: true,
type: 'date',
nticks: 10
,tickfont: {
color: "#dddddd"
,size: 7
}
,gridcolor: "#444444"
,range: ['2010-03-20', '2024-06-01']
,zeroline: true
},
margin: {
l: 40,
r: 0,
b: 35,
t: 10,
pad: 0
}
};
function findBootstrapEnvironment() {
let envs = ['xs', 'sm', 'md', 'lg', 'xl'];
let el = document.createElement('div');
document.body.appendChild(el);
let curEnv = envs.shift();
for (let env of envs.reverse()) {
el.classList.add(`d-${env}-none`);
if (window.getComputedStyle(el).display === 'none') {
curEnv = env;
break;
}
}
document.body.removeChild(el);
return curEnv;
}
env_size = findBootstrapEnvironment();
if (env_size == "xs") {
document.getElementById("graph1").style.height="350px";
Plotly.newPlot('graph', data_mobile, layout_mobile, {responsive: true, modeBarButtonsToRemove: ['toImage', 'hoverCompareCartesian', 'hoverClosest2d', 'toggleSpikelines', 'lasso2d', 'select2d', 'hoverClosestCartesian'], displaylogo: false});
}
else {
document.getElementById("graph1").style.height="700px";
Plotly.newPlot('graph', data, layout, {responsive: true, modeBarButtonsToRemove: ['toImage', 'hoverCompareCartesian', 'hoverClosest2d', 'toggleSpikelines', 'lasso2d', 'select2d', 'hoverClosestCartesian'], displaylogo: false});
}
</script>
{% endblock %}

View file

@ -19,7 +19,7 @@
<div class="card" id="graph1"> <div class="card" id="graph1">
<div <div
class="card-header py-3 d-flex flex-row align-items-center justify-content-between text-white"> class="card-header py-3 d-flex flex-row align-items-center justify-content-between text-white">
<h6 class="m-0 text-light">Stock-to-flow Multiple (Price / SF Model)</h6> <h6 class="m-0 text-light">Market Cycle</h6>
<div class="dropdown no-arrow"> <div class="dropdown no-arrow">
<a class="dropdown-toggle" href="#" role="button" <a class="dropdown-toggle" href="#" role="button"
onclick="$('#graph1').toggleClass('fullscreen');window.dispatchEvent(new Event('resize'));"> onclick="$('#graph1').toggleClass('fullscreen');window.dispatchEvent(new Event('resize'));">

View file

@ -0,0 +1,352 @@
{% extends 'charts/base.html' %}
{% block header %}
<title>Moneroj.net - Price</title>
{% endblock %}
{% block content %}
<!-- Content Wrapper -->
<div id="content-wrapper" style="background-color:rgb(48, 44, 41)">
<!-- Main Content -->
<div id="content">
<!-- Begin Page Content -->
<div class="container-fluid"><br>
<div class="row">
<div class="col-xl-12 col-lg-12">
<div class="card" id="graph1">
<div
class="card-header py-3 d-flex flex-row align-items-center justify-content-between text-white">
<h6 class="m-0 text-light">Price (BTC)</h6>
<div class="dropdown no-arrow">
<a class="dropdown-toggle" href="#" role="button"
onclick="$('#graph1').toggleClass('fullscreen');window.dispatchEvent(new Event('resize'));">
<i class="bx bx-expand text-gray-400"></i>
</a>
</div>
</div>
<div class="card-body pb-0 pt-0 pl-0 pr-0" style="height: 100px;">
<div id="graph" style="height: 100%; width:100%;"></div>
</div>
</div>
<br>
</div>
</div>
<!-- Content Row -->
<div class="row">
<!-- Earnings (Monthly) Card Example -->
<div class="col-xl-4 col-md-6 mb-4">
<div class="card border-left-new h-100 py-2">
<div class="card-body">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">
Last Price</div>
<div class="h5 mb-0 font-weight-bold text-gray-800">{{ now_price }}</div>
</div>
</div>
</div>
<!-- Earnings (Monthly) Card Example -->
<div class="col-xl-4 col-md-6 mb-4">
<div class="card border-left-new h-100 py-2">
<div class="card-body">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">
Bottom</div>
<div class="h5 mb-0 font-weight-bold text-gray-800">{{ bottom }}</div>
</div>
</div>
</div>
<!-- Earnings (Monthly) Card Example -->
<div class="col-xl-4 col-md-6 mb-4">
<div class="card border-left-new h-100 py-2">
<div class="card-body">
<div class="text-xs font-weight-bold text-info text-uppercase mb-1">
Last Top</div>
<div class="h5 mb-0 font-weight-bold text-gray-800">{{ maximum }}</div>
</div>
</div>
</div>
</div>
<!-- Content Row -->
<div class="row">
<div class="col-xl-11 col-md-6 mb-4">
<div class="alert alert-dark" role="alert">
Not financial advice.
For information about the chart, click the button >
</div>
</div>
<div class="col-xl-1">
<button type="button" class="btn btn-dark btn-block" data-toggle="modal" href="#"
data-target="#id_Modal">
<div class="col-auto">
+
</div>
</button>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
</div>
<!-- End of Content Wrapper -->
<!-- Modal -->
<div class="modal fade" id="id_Modal" tabindex="-1" role="dialog" aria-labelledby="Modal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="Modal">Help about the chart</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Cancelar">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
This chart shows the price of the coin on the BTC pair on a linear scale. The color of the points
indicate their position on the Bitcoin pair, being red as overbought and blue as cheap.<br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Fim do Modal -->
<!-- Page level plugins -->
<script>
var data4 = {
type: "scatter",
mode: "markers",
name: 'Average price on date',
x: {{ dates|safe }},
y: {{ values|safe }},
line: {color: '#7f421d'},
marker: {
color: {{ color|safe }},
colorbar: {
title: {
text: 'Cycle on the Bitcoin pair (%)',
side: 'right'
,font: {
color: 'white'
,size: 14
}
}
,thickness: 10
,tickfont: {
color: 'white'
,size: 14
}
,borderwidth: 0
},
colorscale: [['0', '#0000ff'], ['0.33', '#00ff00'], ['0.66', '#ffff00'], ['1', '#ff0000']],
sizemode: 'area',
size: 5,
cmax: 100,
cmin: 0
}
};
var data4_mobile = {
type: "scatter",
mode: "markers",
name: 'Average price on date',
x: {{ dates|safe }},
y: {{ values|safe }},
line: {color: '#7f421d'},
marker: {
color: {{ color|safe }},
colorbar: {
thickness: 4
,tickfont: {
color: 'white'
,size: 6
}
,borderwidth: 0
},
colorscale: [['0', '#0000ff'], ['0.33', '#00ff00'], ['0.66', '#ffff00'], ['1', '#ff0000']],
sizemode: 'area',
size: 3,
cmax: 100,
cmin: 0
}
};
var data = [data4];
var data_mobile = [data4_mobile];
var layout = {
plot_bgcolor:"#252221",
paper_bgcolor:"#252221",
annotations: [
{
xref: 'paper',
yref: 'paper',
x: 0.5,
xanchor: 'auto',
y: 0.05,
yanchor: 'auto',
text: 'Moneroj<br>https://www.moneroj.net',
showarrow: false,
borderwidth: 1,
bordercolor: '#5f5f5f',
bgcolor: '#333333',
borderpad: 5,
align: 'center',
font: {
color: "white",
size: 12
}
}],
separators: ",.",
legend: {
x: 0.5,
y: 0.02,
bgcolor: '#333333',
bordercolor: '#5f5f5f',
borderwidth: 1,
font: {
color: 'white',
size: 12
},
traceorder: 'normal',
xanchor: 'auto',
yanchor: 'auto'
},
hoverlabel: {
namelength: -1
},
yaxis: {
type: "log",
title: {
text: 'Price (BTC)',
font: {
size: 20,
color: 'white'
}
},
tickformat :",.4f"
,nticks: 10
,tickfont: {
color: "#ffffff"
,size: 12
}
,gridcolor: "#333333"
},
xaxis: {
hoverformat: "%Y-%m-%d",
showgrid: true,
type: 'date',
nticks: 10
,tickfont: {
color: "#dddddd"
,size: 13
}
,gridcolor: "#333333"
,range: ['2014-05-01', '2023-01-01']
,zeroline: true
},
margin: {
l: 120,
r: 60,
b: 35,
t: 10,
pad: 4
}
};
var layout_mobile = {
plot_bgcolor:"black",
paper_bgcolor:"black",
separators: ",.",
hoverlabel: {
namelength: -1
},
legend: {
x: 0.98,
y: 0.05,
bgcolor: '#000000',
bordercolor: '#5f5f5f',
borderwidth: 1,
font: {
color: 'white',
size: 5
},
traceorder: 'normal',
xanchor: 'auto',
yanchor: 'auto'
},
showlegend: false,
yaxis: {
type: "log",
tickformat :",.4f"
,nticks: 10
,tickfont: {
color: "#ffffff"
,size: 7
}
,gridcolor: "#444444"
},
xaxis: {
hoverformat: "%Y",
showgrid: true,
type: 'date',
nticks: 10
,tickfont: {
color: "#dddddd"
,size: 7
}
,gridcolor: "#444444"
,range: ['2014-05-01', '2023-01-01']
,zeroline: true
},
margin: {
l: 40,
r: 0,
b: 35,
t: 10,
pad: 0
}
};
function findBootstrapEnvironment() {
let envs = ['xs', 'sm', 'md', 'lg', 'xl'];
let el = document.createElement('div');
document.body.appendChild(el);
let curEnv = envs.shift();
for (let env of envs.reverse()) {
el.classList.add(`d-${env}-none`);
if (window.getComputedStyle(el).display === 'none') {
curEnv = env;
break;
}
}
document.body.removeChild(el);
return curEnv;
}
env_size = findBootstrapEnvironment();
if (env_size == "xs") {
document.getElementById("graph1").style.height="350px";
Plotly.newPlot('graph', data_mobile, layout_mobile, {responsive: true, modeBarButtonsToRemove: ['toImage', 'hoverCompareCartesian', 'hoverClosest2d', 'toggleSpikelines', 'lasso2d', 'select2d', 'hoverClosestCartesian'], displaylogo: false});
}
else {
document.getElementById("graph1").style.height="700px";
Plotly.newPlot('graph', data, layout, {responsive: true, modeBarButtonsToRemove: ['toImage', 'hoverCompareCartesian', 'hoverClosest2d', 'toggleSpikelines', 'lasso2d', 'select2d', 'hoverClosestCartesian'], displaylogo: false});
}
</script>
{% endblock %}

View file

@ -92,6 +92,8 @@ urlpatterns = [
path('metcalfe_deviation/', views.metcalfe_deviation, name='metcalfe_deviation'), path('metcalfe_deviation/', views.metcalfe_deviation, name='metcalfe_deviation'),
path('marketcycle/', views.marketcycle, name='marketcycle'), path('marketcycle/', views.marketcycle, name='marketcycle'),
path('shielded/', views.shielded, name='shielded'), path('shielded/', views.shielded, name='shielded'),
path('pricesatslog/', views.pricesatslog, name='pricesatslog'),
path('comptransactions/', views.comptransactions, name='comptransactions'),
# URLs to useful functions on charts/views.py # URLs to useful functions on charts/views.py
# Only admins can use these # Only admins can use these

View file

@ -2138,6 +2138,46 @@ def pricesats(request):
context = {'values': values, 'dates': dates, 'maximum': maximum, 'now_price': now_price, 'color': color, 'bottom': bottom} context = {'values': values, 'dates': dates, 'maximum': maximum, 'now_price': now_price, 'color': color, 'bottom': bottom}
return render(request, 'charts/pricesats.html', context) return render(request, 'charts/pricesats.html', context)
def pricesatslog(request):
if request.user.username != "Administrador" and request.user.username != "Morpheus":
update_visitors(False)
dt = datetime.datetime.now(timezone.utc).timestamp()
dates = []
color = []
values = []
now_price = 0
maximum = 0
bottom = 1
data = Sfmodel.objects.order_by('date')
for item in data:
dates.append(datetime.datetime.strftime(item.date, '%Y-%m-%d'))
if item.color != 0:
color.append(item.color)
else:
color.append('')
if item.pricebtc > 0.0001:
values.append(item.pricebtc)
now_price = item.pricebtc
if bottom > item.pricebtc:
bottom = item.pricebtc
if maximum < item.pricebtc:
maximum = item.pricebtc
else:
values.append('')
now_price = locale.format('%.4f', now_price, grouping=True) + ' BTC'
maximum = locale.format('%.4f', maximum, grouping=True) + ' BTC'
bottom = locale.format('%.4f', bottom, grouping=True) + ' BTC'
dt = 'pricesatslog.html ' + locale.format('%.2f', datetime.datetime.now(timezone.utc).timestamp() - dt, grouping=True)+' seconds'
print(dt)
context = {'values': values, 'dates': dates, 'maximum': maximum, 'now_price': now_price, 'color': color, 'bottom': bottom}
return render(request, 'charts/pricesatslog.html', context)
def fractal(request): def fractal(request):
if request.user.username != "Administrador" and request.user.username != "Morpheus": if request.user.username != "Administrador" and request.user.username != "Morpheus":
update_visitors(False) update_visitors(False)
@ -3914,6 +3954,70 @@ def compinflation(request):
'now_xmr': now_xmr, 'now_btc': now_btc, 'now_dash': now_dash, 'now_grin': now_grin, 'now_zcash': now_zcash, 'now_btc': now_btc, 'dates': dates} 'now_xmr': now_xmr, 'now_btc': now_btc, 'now_dash': now_dash, 'now_grin': now_grin, 'now_zcash': now_zcash, 'now_btc': now_btc, 'dates': dates}
return render(request, 'charts/compinflation.html', context) return render(request, 'charts/compinflation.html', context)
def comptransactions(request):
if request.user.username != "Administrador" and request.user.username != "Morpheus":
update_visitors(False)
dt = datetime.datetime.now(timezone.utc).timestamp()
data = DailyData.objects.order_by('date')
dates = []
xmr = []
dash = []
grin = []
zcash = []
btc = []
now_xmr = 999999
now_dash = 999999
now_grin = 999999
now_zcash = 999999
now_btc = 999999
for item in data:
dates.append(datetime.datetime.strftime(item.date, '%Y-%m-%d'))
if item.btc_transactions > 10:
btc.append(item.btc_transactions)
now_btc = item.btc_transactions
else:
btc.append('')
if item.zcash_transactions > 10:
zcash.append(item.zcash_transactions)
now_zcash = item.zcash_transactions
else:
zcash.append('')
if item.dash_transactions > 10:
dash.append(item.dash_transactions)
now_dash = item.dash_transactions
else:
dash.append('')
if item.xmr_transactions > 10:
xmr.append(item.xmr_transactions)
now_xmr = item.xmr_transactions
else:
xmr.append('')
if item.grin_transactions > 10:
grin.append(item.grin_transactions)
now_grin = item.grin_transactions
else:
grin.append('')
now_dash = locale.format('%.0f', now_dash, grouping=True)
now_grin = locale.format('%.0f', now_grin, grouping=True)
now_zcash = locale.format('%.0f', now_zcash, grouping=True)
now_xmr = locale.format('%.0f', now_xmr, grouping=True)
now_btc = locale.format('%.0f', now_btc, grouping=True)
dt = 'comptransactions.html ' + locale.format('%.2f', datetime.datetime.now(timezone.utc).timestamp() - dt, grouping=True)+' seconds'
print(dt)
context = {'xmr': xmr, 'dash': dash, 'grin': grin, 'zcash': zcash, 'btc': btc, 'now_xmr': now_xmr, 'now_btc': now_btc, 'now_dash': now_dash, 'now_grin': now_grin, 'now_zcash': now_zcash, 'now_btc': now_btc, 'dates': dates}
return render(request, 'charts/comptransactions.html', context)
def sfmodel(request): def sfmodel(request):
if request.user.username != "Administrador" and request.user.username != "Morpheus": if request.user.username != "Administrador" and request.user.username != "Morpheus":
update_visitors(False) update_visitors(False)

View file

@ -32,9 +32,9 @@ STATICFILES_DIRS = [
SECRET_KEY = 'dafsdasdfasfa7sdfs9d7das7f9as7df8ad43525fsffdssdg455$$###77saf9df79as79s' SECRET_KEY = 'dafsdasdfasfa7sdfs9d7das7f9as7df8ad43525fsffdssdg455$$###77saf9df79as79s'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True #DEBUG = True
#DEBUG = False DEBUG = False
#STATIC_ROOT = "/var/www/moneropro/static/" STATIC_ROOT = "/var/www/moneropro/static/"
ALLOWED_HOSTS = ['www.moneroj.net', 'localhost', '127.0.0.1', 'moneroj.net', 'moneroj5xq4ttg4ec7e5secqdyw5mcovzvfvlq6i7omv353i6mnexlqd.onion'] ALLOWED_HOSTS = ['www.moneroj.net', 'localhost', '127.0.0.1', 'moneroj.net', 'moneroj5xq4ttg4ec7e5secqdyw5mcovzvfvlq6i7omv353i6mnexlqd.onion']