大家好,
本人最近项目用到spread7,我用的VS2012 + spread.net 7, 在做一个chart的时候,发现页面上没有显示chart而是显示一个小图标(表示不能显示),不知是什么情况,我是按照官网的例子做的,代码如下:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BarSeries series = new BarSeries();
series.SeriesName = "Series 0";
series.Values.Add(2.0);
series.Values.Add(4.0);
series.Values.Add(3.0);
series.Values.Add(5.0);
YPlotArea plotArea = new YPlotArea();
plotArea.Location = new PointF(0.2f, 0.2f);
plotArea.Size = new SizeF(0.6f, 0.6f);
plotArea.Series.Add(series);
LabelArea label = new LabelArea();
label.Text = "Bar Chart";
label.Location = new PointF(0.5f, 0.02f);
label.AlignmentX = 0.5f;
label.AlignmentY = 0.0f;
LegendArea legend = new LegendArea();
legend.Location = new PointF(0.98f, 0.5f);
legend.AlignmentX = 1.0f;
legend.AlignmentY = 0.5f;
ChartModel model = new ChartModel();
model.LabelAreas.Add(label);
model.LegendAreas.Add(legend);
model.PlotAreas.Add(plotArea);
FarPoint.Web.Spread.Chart.SpreadChart chart = new FarPoint.Web.Spread.Chart.SpreadChart();
chart.Model = model;
FpSpread1.Sheets[0].Charts.Add(chart);
}
}
哪位高手给解释一下子啊,
附件是显示结果,我用IE8 和chrome都试过了,都是这个样子。
谢谢了 |
-
|