protected void Page_Load(object sender, System.EventArgs e)
{
if (IsPostBack) return;
// セルにデータを設定します。
FarPoint.Web.Spread.SheetView sv = FpSpread1.Sheets[0];
sv.RowCount = 10;
sv.ColumnCount = 10;
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
sv.Cells[i, j].Value = j;
// 入れ替え可能なスパークラインを追加します。
FarPoint.Web.Spread.Chart.SheetCellRange scr = new FarPoint.Web.Spread.Chart.SheetCellRange(sv, 0, 0, 3, 3);
FarPoint.Web.Spread.Model.CellRange cr = new FarPoint.Web.Spread.Model.CellRange(3, 0, 1, 3);
sv.AddSquareSparkline(scr, cr, FarPoint.Web.Spread.SparklineType.Column, new FarPoint.Web.Spread.ExcelSparklineSetting(), false);
}
protected void Button1_Click(object sender, EventArgs e)
{
FarPoint.Web.Spread.ExcelSparklineGroup esg = (FarPoint.Web.Spread.ExcelSparklineGroup)FpSpread1.Sheets[0].SparklineContainer[0];
// 入れ替え可能な場合は入れ替えます。
if (esg.IsSwitchable())
{
esg.SwitchRowColumn();
}
}
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If IsPostBack Then Return
' セルにデータを設定します。
Dim sv As FarPoint.Web.Spread.SheetView = FpSpread1.Sheets(0)
sv.RowCount = 10
sv.ColumnCount = 10
For i As Integer = 0 To 2
For j As Integer = 0 To 2
FpSpread1.Sheets(0).Cells(i, j).Value = j
Next
Next
' 入れ替え可能なスパークラインを追加します。
Dim scr As New FarPoint.Web.Spread.Chart.SheetCellRange(sv, 0, 0, 3, 3)
Dim cr As New FarPoint.Web.Spread.Model.CellRange(3, 0, 1, 3)
sv.AddSquareSparkline(scr, cr, FarPoint.Web.Spread.SparklineType.Column, New FarPoint.Web.Spread.ExcelSparklineSetting(), False)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs)
Dim esg As FarPoint.Web.Spread.ExcelSparklineGroup = DirectCast(FpSpread1.Sheets(0).SparklineContainer(0), FarPoint.Web.Spread.ExcelSparklineGroup)
' 入れ替え可能な場合は入れ替えます。
If esg.IsSwitchable() Then
esg.SwitchRowColumn()
End If
End Sub