mschart 饼图,该怎么解决
mschart 饼图
.net 非asp.net
machart 饼图 查询按钮点击两次时,之前的数据没有删除,chart没有清除上一次数据,请问怎么解决
我还想点击其中一块图片(比如年龄在21-30的),可以把这一部分的数据取出来,绑定到datagridview中
Title tPie = new Title("xxCV統計");
Series seriesPie = new Series("");
Series seriesColumn = new Series("");
seriesPie.ChartType = SeriesChartType.Pie;
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
seriesPie.Points.AddXY("年齢:"+ds.Tables[0].Rows[i]["nnd"], ds.Tables[0].Rows[i]["countInt"]);
seriesColumn.Points.AddXY( ds.Tables[0].Rows[i]["nnd"], ds.Tables[0].Rows[i]["countInt"]);
}
//this.chartPie.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
//this.chartPie.ChartAreas["ChartArea1"].BackColor = Color.Transparent;
this.chartPie.Titles.Add(tPie);
this.chartPie.Series.Add(seriesPie);
seriesColumn.ChartType = SeriesChartType.Column;
this.chartColumn.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
this.chartColumn.ChartAreas["ChartArea1"].BackColor = Color.Transparent;
this.chartColumn.Titles.Add(tPie);
this.chartColumn.Series.Add(seriesColumn);

------解决方案--------------------
http://www.cnblogs.com/lzjsky/archive/2011/04/07/2007888.html
------解决方案--------------------
http://blog.****.net/fanzhonglei/article/details/2878409
.net 非asp.net
machart 饼图 查询按钮点击两次时,之前的数据没有删除,chart没有清除上一次数据,请问怎么解决
我还想点击其中一块图片(比如年龄在21-30的),可以把这一部分的数据取出来,绑定到datagridview中
Title tPie = new Title("xxCV統計");
Series seriesPie = new Series("");
Series seriesColumn = new Series("");
seriesPie.ChartType = SeriesChartType.Pie;
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
seriesPie.Points.AddXY("年齢:"+ds.Tables[0].Rows[i]["nnd"], ds.Tables[0].Rows[i]["countInt"]);
seriesColumn.Points.AddXY( ds.Tables[0].Rows[i]["nnd"], ds.Tables[0].Rows[i]["countInt"]);
}
//this.chartPie.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
//this.chartPie.ChartAreas["ChartArea1"].BackColor = Color.Transparent;
this.chartPie.Titles.Add(tPie);
this.chartPie.Series.Add(seriesPie);
seriesColumn.ChartType = SeriesChartType.Column;
this.chartColumn.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
this.chartColumn.ChartAreas["ChartArea1"].BackColor = Color.Transparent;
this.chartColumn.Titles.Add(tPie);
this.chartColumn.Series.Add(seriesColumn);
------解决方案--------------------
http://www.cnblogs.com/lzjsky/archive/2011/04/07/2007888.html
------解决方案--------------------
http://blog.****.net/fanzhonglei/article/details/2878409