Skip to content

Commit cf17a0f

Browse files
authored
Merge pull request #32 from mkaplan9/mk_small_fixes
Mk small fixes
2 parents f2b5da8 + e0e117f commit cf17a0f

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

asset_allocation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h4 class="aa-input-label">Set amount to add each year ($)</h4>
9999
<input type="text" placeholder="100" id="addAmount"/>
100100
<button id="addAmountButton">Set Add Amount</button>
101101

102-
<h4 class="aa-input-label">Set date range (enter years from 1963 to 2018)</h4>
102+
<h4 class="aa-input-label">Set date range (YYYY)</h4>
103103
<input type="text" placeholder="1963" id="startDate"/>
104104
<input type="text" placeholder="2018" id="endDate"/>
105105
<button id="dateButton">Set Dates</button>
@@ -110,7 +110,7 @@ <h4 class="aa-input-label">Set date range (enter years from 1963 to 2018)</h4>
110110
<br></br>
111111

112112
<div class="center">
113-
<h4>Add New Line (enter percent stocks)</h4>
113+
<h4>Add New Line (%)</h4>
114114
<input type="text" placeholder="70" id="percentStocks"/>
115115
<button id="addLine">Add Line</button>
116116
<button id="clear">Clear All Data</button>

assets/assetAllocation.png

137 KB
Loading

index.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,27 @@ <h2 class="featurette-heading right black">Abner Schreiber's Memoirs</h2>
123123
<a href="./my_favorite_things.html">
124124
<h2 class="featurette-heading black">A Few of My Favorite Things</h2>
125125
</a>
126-
<p class="lead"></p>
126+
<p class="lead">Quotes, books, articles, etc.</p>
127127
</div>
128128
<div class="col-md-4">
129129
<img class="featurette-image img-responsive right index-thumbnail-container" src="./assets/myFavoriteThings.jpg" alt="">
130130
</div>
131131
</div>
132132

133+
<hr class="featurette-divider">
134+
135+
<div class="row featurette">
136+
<div class="col-md-4 col-md-offset-2 index-thumbnail-container">
137+
<img class="featurette-image img-responsive left" src="./assets/assetAllocation.png" alt="">
138+
</div>
139+
<div class="col-md-4">
140+
<a href="./asset_allocation.html">
141+
<h2 class="featurette-heading right black">Asset Allocation Simulation</h2>
142+
</a>
143+
<p class="lead right">A simulation showing how different investment asset allocations would have fared over time.</p>
144+
</div>
145+
</div>
146+
133147
<!-- /END THE FEATURETTES -->
134148
<br></br>
135149

scripts/asset_allocation.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,23 @@ var config = {
321321
options: {
322322
title: {
323323
display: true,
324+
fontSize: 30,
324325
text: 'Asset Allocation'
325326
},
326327
scales: {
327328
yAxes: [{
328329
ticks: {
329330
beginAtZero: true
331+
},
332+
scaleLabel: {
333+
labelString: "Total Investment Value ($)",
334+
display: true
335+
}
336+
}],
337+
xAxes: [{
338+
scaleLabel: {
339+
labelString: "Year",
340+
display: true
330341
}
331342
}]
332343
}
@@ -443,7 +454,7 @@ function getNewLine(percentStocks, startIndex, endIndex) {
443454

444455
total = endStock + endBond
445456

446-
newLine.push(total)
457+
newLine.push(Math.round(total))
447458
}
448459

449460
return newLine

0 commit comments

Comments
 (0)