您好
请参考如下代码,可以获取到系列对应的range,然后获取数据。
- if(chart.SelectedObject is FarPoint.Win.Chart.SeriesInfo)
- {
- var so = chart.SelectedObject as FarPoint.Win.Chart.SeriesInfo;
- var series = so.Series as FarPoint.Win.Chart.BarSeries;
- if (series != null)
- {
- var ary = (SeriesDataField)series.Values.DataSource;// as SeriesDataField;
- var formula = ary.Formula;
- formula = formula.Substring(formula.IndexOf("!") + 1).Replace("$", "");
- bool result;
- FarPoint.Win.Spread.Model.CellRange range;
- result = FarPoint.Win.Spread.Model.CellRange.TryParse(formula, out range);
-
- }
- }
- }
复制代码 |