mirror of
https://github.com/Expand-sys/ccashfrontend
synced 2025-12-18 15:42:14 +11:00
changed some graph stuff
This commit is contained in:
parent
15f2fbcfb6
commit
df264c3d50
1 changed files with 17 additions and 8 deletions
|
|
@ -49,7 +49,7 @@ block content
|
||||||
p Date: #{log.time}
|
p Date: #{log.time}
|
||||||
p You sent #{log.to} $#{log.amount}
|
p You sent #{log.to} $#{log.amount}
|
||||||
hr
|
hr
|
||||||
#received.tab-pane(role='tabpanel', aria-labelledby='contact-tab')
|
#received.tab-pane(role='tabpanel', aria-labelledby='recieved-tab')
|
||||||
.logs
|
.logs
|
||||||
if logrec
|
if logrec
|
||||||
each log in logrec
|
each log in logrec
|
||||||
|
|
@ -57,25 +57,34 @@ block content
|
||||||
p Date: #{log.time}
|
p Date: #{log.time}
|
||||||
p #{log.from} sent you $#{log.amount}
|
p #{log.from} sent you $#{log.amount}
|
||||||
hr
|
hr
|
||||||
|
#balhistory.tab-pane(role='tabpanel', aria-labelledby='balhistory-tab')
|
||||||
#balhistory.tab-pane(role='tabpanel', aria-labelledby='contact-tab')
|
|
||||||
#chart_div(style="width:100%; height 100%")
|
#chart_div(style="width:100%; height 100%")
|
||||||
|
|
||||||
script(type='text/javascript' src='https://www.gstatic.com/charts/loader.js')
|
script(type='text/javascript' src='https://www.gstatic.com/charts/loader.js')
|
||||||
script(type='text/javascript').
|
script(type='text/javascript').
|
||||||
|
|
||||||
google.charts.load('current', {'packages':['corechart']});
|
google.charts.load('current', {'packages':['corechart', 'line']});
|
||||||
google.charts.setOnLoadCallback(drawChart);
|
google.charts.setOnLoadCallback(drawChart);
|
||||||
function drawChart() {
|
function drawChart() {
|
||||||
var data = google.visualization.arrayToDataTable([!{graphdata}]);
|
var data = google.visualization.arrayToDataTable([!{graphdata}]);
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
title: 'Balance',
|
title: 'Balance',
|
||||||
hAxis: {title: 'Transaction', minValue: 0, maxValue: 15, direction: 1, textPosition: 'none'},
|
hAxis: {
|
||||||
vAxis: {title: 'Balance', minValue: 0, maxValue: 500},
|
title: 'Transaction',
|
||||||
legend: 'none',
|
textPosition: 'out',
|
||||||
|
},
|
||||||
|
vAxis: {
|
||||||
|
title: 'Balance',
|
||||||
|
format: 'currency',
|
||||||
|
textPosition: 'out',
|
||||||
|
},
|
||||||
|
trendlines: {
|
||||||
|
0: {type: 'exponential', color: '#333', opacity: .1},
|
||||||
|
1: {type: 'linear', color: '#111', opacity: .3}
|
||||||
|
},
|
||||||
width: 670,
|
width: 670,
|
||||||
height: 350
|
height: 350,
|
||||||
};
|
};
|
||||||
|
|
||||||
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
|
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue