嗨, 我尝试使用Opposite = true或false,但是Y轴标签也没有出现在左侧,请提出任何值得高度赞赏的解决方案。
我们做的编码是:
highChart.Credits.Enabled = false;
highChart.Title = new Highsoft.Web.Mvc.Stocks.Title
{
Text = ""
};
highChart.Subtitle = new Highsoft.Web.Mvc.Stocks.Subtitle
{
Text = ""
};
highChart.Exporting = new Highsoft.Web.Mvc.Stocks.Exporting { Enabled = false };
highChart.YAxis = new List<Highsoft.Web.Mvc.Stocks.YAxis>
{
new Highsoft.Web.Mvc.Stocks.YAxis()
{
Title = new Highsoft.Web.Mvc.Stocks.YAxisTitle
{
Text="Price GBP",
},
LineColor = "#fff",
Labels = new Highsoft.Web.Mvc.Stocks.YAxisLabels {Align = YAxisLabelsAlign.Center},
Opposite=true
},
};
highChart.RangeSelector = new RangeSelector()
{
Selected = 5,
InputEnabled = false,
Enabled = false
};
highChart.Chart.Height = 745;
highChart.Series = new List<Highsoft.Web.Mvc.Stocks.Series>
{
new Highsoft.Web.Mvc.Stocks.AreaSeries
{
Data = ViewData["appleData"] as List<AreaSeriesData> ,
Name = "AAPL",
GapSize = 5,
Tooltip = new AreaSeriesTooltip
{
ValueDecimals = 2,
PointFormatter= "function() { return Highcharts.dateFormat('%Y',this.x) + ','+this.y +''; }",
},
TurboThreshold = null,
FillColor = "#12a7bd",
}
};
fundDetailsModel.NetAssetNew = string1.GetHighstock(highChart, "highstock");