Skip to content

Commit

Permalink
#64 More implementation done
Browse files Browse the repository at this point in the history
  • Loading branch information
pantunes committed May 4, 2020
1 parent f6c4a27 commit 36b7cb4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion xtcryptosignals/client/templates/ticker/ticker.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
}
for (let i in charts) {
let shift = false
if (charts[i].series[0].data.length > 30) {
if (json['frequency'] === "10s" && charts[i].series[0].data.length > 30) {
shift = true
}
charts[i].series[0].addPoint([json['created_on_ts'], json['price']], false, shift);
Expand Down
12 changes: 9 additions & 3 deletions xtcryptosignals/client/templates/tools/coin-token.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@
<script src="/static/js/charts/coin-or-token.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() {
const fs = {{ frequencies_charts|safe }};
function build_charts(fs) {
for (let i in fs) {
setTimeout(function () {
get_chart_coin_or_token_data(render_data_charts, '{{ coin_or_token }}', fs[i]);
}, i * 500);
}
}
</script>

<script type="text/javascript">
const fs = {{ frequencies_charts|safe }};
$(document).ready(function() {
build_charts(fs)
});
</script>

Expand All @@ -40,7 +46,7 @@

<script type="text/javascript">
wakeEvent(function () {
alert('Computer Awakes!!!');
build_charts(fs)
});
</script>

Expand Down

0 comments on commit 36b7cb4

Please sign in to comment.