1. 删除Chart可以直接使用Del键。
2. 关于代码设置Chart,建议参考帮助文档中的示例代码。如下:- FarPoint.Win.Chart.BarSeries series1 = new FarPoint.Win.Chart.BarSeries();
- series1.SeriesName = "Series 0";
- series1.BarShape = BarShape.FullCone;
- series1.Values.Add(2.0);
- series1.Values.Add(4.0);
- series1.Values.Add(3.0);
- series1.Values.Add(5.0);
- FarPoint.Win.Chart.BarSeries series2 = new FarPoint.Win.Chart.BarSeries(series1);
- FarPoint.Win.Chart.ClusteredBarSeries series = new FarPoint.Win.Chart.ClusteredBarSeries();
- series.Series.Add(series1);
- series.Series.Add(series2);
- FarPoint.Win.Chart.YPlotArea plotArea = new FarPoint.Win.Chart.YPlotArea();
- plotArea.Location = new System.Drawing.PointF(0.2f, 0.2f);
- plotArea.Size = new System.Drawing.SizeF(0.6f, 0.6f);
- plotArea.Series.Add(series);
- FarPoint.Win.Chart.ChartModel model = new FarPoint.Win.Chart.ChartModel();
- model.PlotAreas.Add(plotArea);
- FarPoint.Win.Spread.Chart.SpreadChart chart = new FarPoint.Win.Spread.Chart.SpreadChart();
- chart.Model = model;
- this.fpSpread1.Sheets[0].Charts.Add(chart);
- Type seriesType = typeof(FarPoint.Win.Chart.BarSeries);
- ChartViewType viewType = FarPoint.Win.Chart.ChartViewType.View3D;
- BarShape barShape = FarPoint.Win.Chart.BarShape.FullCone;
- bool isVertical = true;
- fpSpread1.ActiveSheet.AddChart(0, 0, seriesType, 200, 200, 200, 200, viewType, true);
- FarPoint.Win.Chart.YPlotArea plotArea = fpSpread1.ActiveSheet.Charts[fpSpread1.ActiveSheet.Charts.Count - 1].Model.PlotAreas[0] as FarPoint.Win.Chart.YPlotArea;
复制代码 3. Designer是我们为用户提供的设计器,里面的功能有时候看起来简单,实际上代码量很大。所以可能需要你多研究一下Chart的接口,效果会更理想。
更多有关Spread尤其是Chart的细节信息,请查阅帮助文档。 |