我试图在Asp.Net MVC中显示图表,但它总是在另一个窗口中打开。我想在不打开另一个窗口的情况下显示它。
我该怎么办?
_GraficoPerformance
@model ResumoMovtoTrades
<div class="text-center">
<p>
@{
var macChart = new Chart(200,200)
.AddTitle("Performance")
.AddSeries(
name: "Performance",
chartType: "Pie",
legend: "Performance",
xValue: new[] { "Gain", "Loss" },
yValues: new[] { Model.qtdGain, Model.qtdLoss })
.Write();
}
</p>
</div>
显示_PartialView
<div class="panel panel-blue">
<div class="panel-heading bg-blue">Gráfico de Performance</div>
<div class="panel-body">
<img src="@Html.Partial("_GraficoPerformance", @Model.resumoMovtos)"/>
</div>
</div><!--/panelchart-->