|
|
|
@ -151,7 +151,6 @@ |
|
|
|
|
|
|
|
|
|
{% block script %} |
|
|
|
|
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> |
|
|
|
|
<script src="https://code.highcharts.com/highcharts.js"></script> |
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
const wlayout = { |
|
|
|
|
'autosize': true, |
|
|
|
@ -188,12 +187,12 @@ |
|
|
|
|
Plotly.newPlot("price", r.data, rlayout, {responsive: true}); |
|
|
|
|
Plotly.newPlot("bar", b.data, blayout, {responsive: true}); |
|
|
|
|
$('#copy-port').click(function(event) { |
|
|
|
|
alert('投資組合即將複製。') |
|
|
|
|
var stockList = []; |
|
|
|
|
$('.asset').each(function(){ |
|
|
|
|
stockList.push($(this).text()); |
|
|
|
|
}); |
|
|
|
|
// alert(currentList.includes(texts)); |
|
|
|
|
if (stockList.length > 0) { |
|
|
|
|
if (stockList.length > 1) { |
|
|
|
|
$.ajax({ |
|
|
|
|
url: '/copyPort', |
|
|
|
|
method: 'POST', |
|
|
|
|