本帖最后由 似水流年 于 2016-10-28 10:59 编辑
x轴坐标有点挤,两边留白有点多,想设置一下黄框区域的宽度 急在线等!!!!!!
代码:
protected void CreateChartByMonth(int rCount, ChartViewType viewType)
{
if (fpSpreades.ActiveSheetView.Charts.Count != 0)
{
fpSpreades.ActiveSheetView.Charts.RemoveAt(0);
}
fpSpreades.Sheets[0].AddChart(new CellRange(2, 0, rCount, 13), typeof(ClusteredBarSeries), 700, 300, 50, 150);
SpreadChart spreadChart = fpSpreades.ActiveSheetView.Charts[0];
spreadChart.ViewType = viewType;
FarPoint.Web.Chart.LabelArea label = new FarPoint.Web.Chart.LabelArea();
label.Location = new System.Drawing.PointF(0.5f, 0.02f);
label.Text = hfFirstYear.Value;
label.AlignmentX = 0.5f;
label.AlignmentY = 0.0f;
fpSpreades.ActiveSheetView.Charts[0].Model.LabelAreas.Add(label);
}
|
|