mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Working on d3 viz
This commit is contained in:
parent
020158a0ae
commit
fa676f1e57
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
[{"key":"Alabama","values":{"amount":642,"paid":484,"age":84},"displayName":"Alabama","displayTotal":642,"displayBalance":158,"displayPercent":"0.75","displayAge":84},{"key":"Arizona","values":{"amount":7480,"paid":5062,"age":52},"displayName":"Arizona","displayTotal":7480,"displayBalance":2418,"displayPercent":"0.68","displayAge":52},{"key":"California","values":{"amount":6249,"paid":5545,"age":58},"displayName":"California","displayTotal":6249,"displayBalance":704,"displayPercent":"0.89","displayAge":58},{"key":"Colorado","values":{"amount":1260,"paid":666,"age":68},"displayName":"Colorado","displayTotal":1260,"displayBalance":594,"displayPercent":"0.53","displayAge":68},{"key":"Connecticut","values":{"amount":578,"paid":393,"age":74},"displayName":"Connecticut","displayTotal":578,"displayBalance":185,"displayPercent":"0.68","displayAge":74},{"key":"Delaware","values":{"amount":209,"paid":186,"age":72},"displayName":"Delaware","displayTotal":209,"displayBalance":23,"displayPercent":"0.89","displayAge":72},{"key":"Florida","values":{"amount":262,"paid":200,"age":65},"displayName":"Florida","displayTotal":262,"displayBalance":62,"displayPercent":"0.76","displayAge":65},{"key":"Georgia","values":{"amount":71,"paid":71},"displayName":"Georgia","displayTotal":71,"displayBalance":0,"displayPercent":"1.00"},{"key":"Hawaii","values":{"amount":536,"paid":536},"displayName":"Hawaii","displayTotal":536,"displayBalance":0,"displayPercent":"1.00"},{"key":"Idaho","values":{"amount":315,"paid":315},"displayName":"Idaho","displayTotal":315,"displayBalance":0,"displayPercent":"1.00"},{"key":"Illinois","values":{"amount":1281,"paid":1281},"displayName":"Illinois","displayTotal":1281,"displayBalance":0,"displayPercent":"1.00"},{"key":"Indiana","values":{"amount":227,"paid":148,"age":76},"displayName":"Indiana","displayTotal":227,"displayBalance":79,"displayPercent":"0.65","displayAge":76},{"key":"Iowa","values":{"amount":1659,"paid":1261,"age":9.5},"displayName":"Iowa","displayTotal":1659,"displayBalance":398,"displayPercent":"0.76","displayAge":9.5},{"key":"Kansas","values":{"amount":342,"paid":295,"age":78},"displayName":"Kansas","displayTotal":342,"displayBalance":47,"displayPercent":"0.86","displayAge":78},{"key":"Kentucky","values":{"amount":1077,"paid":984,"age":82},"displayName":"Kentucky","displayTotal":1077,"displayBalance":93,"displayPercent":"0.91","displayAge":82},{"key":"Louisiana","values":{"amount":2092,"paid":1151,"age":99},"displayName":"Louisiana","displayTotal":2092,"displayBalance":941,"displayPercent":"0.55","displayAge":99},{"key":"Maine","values":{"amount":211,"paid":143,"age":17},"displayName":"Maine","displayTotal":211,"displayBalance":68,"displayPercent":"0.68","displayAge":17},{"key":"Maryland","values":{"amount":321,"paid":125,"age":25},"displayName":"Maryland","displayTotal":321,"displayBalance":196,"displayPercent":"0.39","displayAge":25},{"key":"Massachusetts","values":{"amount":190,"paid":0,"age":76},"displayName":"Massachusetts","displayTotal":190,"displayBalance":190,"displayPercent":"0.00","displayAge":76},{"key":"Michigan","values":{"amount":522,"paid":387,"age":58},"displayName":"Michigan","displayTotal":522,"displayBalance":135,"displayPercent":"0.74","displayAge":58},{"key":"New York","values":{"amount":4396,"paid":2669,"age":16.5},"displayName":"New York","displayTotal":4396,"displayBalance":1727,"displayPercent":"0.61","displayAge":16.5}]
|
@ -205,7 +205,7 @@
|
||||
visibleTooltip = d.displayName;
|
||||
}
|
||||
|
||||
d3.select("#tooltipTitle").text(d.displayName);
|
||||
d3.select("#tooltipTitle").text(truncate(d.displayName, 18));
|
||||
d3.select("#tooltipTotal").text(formatMoney(d.displayTotal));
|
||||
d3.select("#tooltipBalance").text(formatMoney(d.displayBalance));
|
||||
d3.select("#tooltipAge").text(pluralize('? day', parseInt(d.displayAge)));
|
||||
|
@ -47041,7 +47041,6 @@ function populateInvoiceComboboxes(clientId, invoiceId) {
|
||||
var client = clientMap[invoice.client.public_id];
|
||||
setComboboxValue($('.client-select'), client.public_id, getClientDisplayName(client));
|
||||
if (!parseFloat($('#amount').val())) {
|
||||
//$('#amount').val(formatMoney(invoice.balance, invoice.currency_id, true));
|
||||
$('#amount').val(parseFloat(invoice.balance).toFixed(2));
|
||||
}
|
||||
}
|
||||
@ -47813,4 +47812,6 @@ function roundToTwo(num, toString) {
|
||||
return toString ? val.toFixed(2) : val;
|
||||
}
|
||||
|
||||
|
||||
function truncate(str, length) {
|
||||
return (str && str.length > length) ? (str.substr(0, length-1) + '...') : str;
|
||||
}
|
@ -1887,4 +1887,6 @@ function roundToTwo(num, toString) {
|
||||
return toString ? val.toFixed(2) : val;
|
||||
}
|
||||
|
||||
|
||||
function truncate(str, length) {
|
||||
return (str && str.length > length) ? (str.substr(0, length-1) + '...') : str;
|
||||
}
|
Loading…
Reference in New Issue
Block a user