I have an Angular.js variable {{vm.gift.unclaimedamount | number}} that is cast as a number but not returning a number.
I'm trying to plug it in as a number for the Unclaimed portion of Total Spent in a drawChart function:
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Total Spent', 'Dollars'],
['Claimed', 400],
['Unclaimed', a)]
]);
How can I parse the vm variable as a number? parseInt and parseFloat aren't working
parseInt
should work – jtate Dec 6 '18 at 21:03a
, and no closing brace at the end of your function. Where is thea
defined? – HaveSpacesuit Dec 7 '18 at 19:54