FarPoint.Win.SpreadJ アセンブリ > FarPoint.Win.Spread.Chart 名前空間 > SeriesDataField クラス : Formula プロパティ |
'Declaration Public Property Formula As String
'使用法 Dim instance As SeriesDataField Dim value As String instance.Formula = value value = instance.Formula
public string Formula {get; set;}
object[,] values = { { "lg1", "lg2", "lg3" }, { "tt1", 2.0, 5.0 }, { "tt2", 4.0, 5.0 } }; fpSpread1.Sheets[0].SetArray(0, 0, values); FarPoint.Win.Spread.Model.CellRange cellRange = new FarPoint.Win.Spread.Model.CellRange(0,0,values.GetLength(0),values.GetLength(1)); fpSpread1.Sheets[0].AddChart(cellRange, typeof(FarPoint.Win.Chart.BarSeries), 400, 400, 0, 0); private void button1_Click(object sender, EventArgs e) { FarPoint.Win.Chart.BarSeries series = (FarPoint.Win.Chart.BarSeries)fpSpread1.Sheets[0].Charts[0].Model.PlotAreas[0].Series[0]; FarPoint.Win.Spread.Chart.SeriesDataField data = (FarPoint.Win.Spread.Chart.SeriesDataField)series.Values.DataSource; data.Formula = "Sheet1!$B$2:$E$1"; }
Dim values As Object(,) = {{"lg1", "lg2", "lg3"}, {"tt1", 2.0R, 5.0R}, {"tt2", 4.0R, 5.0R}} FpSpread1.Sheets(0).SetArray(0, 0, values) Dim cellRange As New FarPoint.Win.Spread.Model.CellRange(0, 0, values.GetLength(0), values.GetLength(1)) FpSpread1.Sheets(0).AddChart(cellRange, GetType(FarPoint.Win.Chart.BarSeries), 400, 400, 0, 0) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim series As FarPoint.Win.Chart.BarSeries = DirectCast(FpSpread1.Sheets(0).Charts(0).Model.PlotAreas(0).Series(0), FarPoint.Win.Chart.BarSeries) Dim data As FarPoint.Win.Spread.Chart.SeriesDataField = DirectCast(series.Values.DataSource, FarPoint.Win.Spread.Chart.SeriesDataField) data.Formula = "Sheet1!$B$2:$E$1" End Sub