我试图在一个图表中显示两个系列的数据。我能够这样做,但我需要在右边第二个Y轴。有没有办法在不使用其他工具和扩展的情况下添加第二个Y轴?
我的控制器看起来像这样:
public ActionResult PerformanceChart(){
xVals = {...}
yVals = {...}
var myChart = new Chart(width: 1000, height: 500, theme:ChartTheme.Green)
.AddTitle("FSA Monthly Report").AddLegend(title: "% Backup vs Day", name: "File Server Backup Chart")
.AddSeries(
chartType:"Line",
name: "Total Success",
xValue: xVals.ToList(),
yValues: yVals.ToList());
myChart.AddSeries(chartType: "StackedArea",
name: "Daily Archiving",
xValue: xVals.ToList(),
yValues: dailyArchive).Write();
myChart.Save("~/Content/PerformanceChart", "jpeg");
// Return the contents of the Stream to the client
return base.File("~/Content/PerformanceChart", "jpeg");}
我的cshtml看起来像这样:
<div style="margin-left:5%; margin-top:1em; float: left; width: 90%; height:auto;">
<div style="height:inherit; width:inherit;">
<p><img style="height:90%; width:96%;" src="@Url.Action("PerformanceChart")" alt="Cricketers" /> </p>
</div>