Layout changes

This commit is contained in:
HojouFotytu 2019-05-01 12:16:37 +09:00
parent 2014d1b350
commit a49b0e3868
2 changed files with 34 additions and 35 deletions

View File

@ -49,39 +49,7 @@
</table>
</div>
</div>
<div class="col-md-2 px-1">
<div class="card-box px-2" style="height:305px;">
<h4 class="m-t-0 header-title">Asset Distribution</h4>
<div id="AssetDistribution">
<svg style="height:290px;width:100%"></svg>
</div>
</div>
</div>
<div class="col-md-4 px-1">
<div class="card-box px-2" style="height:305px;">
@if (!Model.ProfitChartDataJSON.Equals("")) {
<div class="profit-chart">
<svg style="height:300px;width:100%"></svg>
</div>
} else {
<p>Unable to load graph, no sales data found.</p>
}
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 px-1">
<div class="card-box px-2" style="height:250px;">
@if (!Model.TrendChartDataJSON.Equals("")) {
<div class="trend-chart">
<svg style="height:240px;width:100%"></svg>
</div>
} else {
<p>Unable to load graph, no market trend data found.</p>
}
</div>
</div>
<div class="col-md-6 px-1">
<div class="card-box px-2">
<h4 class="m-t-0 m-b-20 header-title"><b>Sales Overview</b><small class="pull-right"><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)SalesAnalyzer">more</a></small></h4>
@ -114,7 +82,6 @@
double last30DaysProfitFiat = Math.Round(last30DaysProfit * Model.Summary.MainMarketPrice, 2);
double last30DaysPercentGain = Math.Round(last30DaysProfit / last30DaysStartBalance * 100, 2);
}
<table class="table table-sm">
<thead>
<tr>
@ -166,6 +133,38 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 px-1">
<div class="card-box px-2" style="height:305px;">
@if (!Model.TrendChartDataJSON.Equals("")) {
<div class="trend-chart">
<svg style="height:300px;width:100%"></svg>
</div>
} else {
<p>Unable to load graph, no market trend data found.</p>
}
</div>
</div>
<div class="col-md-2 px-1">
<div class="card-box px-2" style="height:305px;">
<h4 class="m-t-0 header-title">Asset Distribution</h4>
<div id="AssetDistribution">
<svg style="height:290px;width:100%"></svg>
</div>
</div>
</div>
<div class="col-md-4 px-1">
<div class="card-box px-2" style="height:305px;">
@if (!Model.ProfitChartDataJSON.Equals("")) {
<div class="profit-chart">
<svg style="height:300px;width:100%"></svg>
</div>
} else {
<p>Unable to load graph, no sales data found.</p>
}
</div>
</div>
</div>
<script src="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/d3/d3.min.js"></script>
<script src="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/nvd3/nv.d3.min.js"></script>

View File

@ -115,7 +115,7 @@ namespace Monitor.Pages {
string profitPerDayJSON = "";
if (PTData.SellLog.Count > 0) {
DateTime minSellLogDate = PTData.SellLog.OrderBy(sl => sl.SoldDate).First().SoldDate.Date;
DateTime graphStartDate = DateTime.UtcNow.Date.AddDays(-10);
DateTime graphStartDate = DateTime.UtcNow.Date.AddDays(-30);
if (minSellLogDate > graphStartDate) graphStartDate = minSellLogDate;
for (DateTime salesDate = graphStartDate; salesDate <= DateTime.UtcNow.Date; salesDate = salesDate.AddDays(1)) {
if (tradeDayIndex > 0) {