void TabRegression::OnAutoset() { if (switchColsRows == 0) { // Columnas int fRow = firstCellIsName ? 1 : 0; int c; for (c = 0; c < grid.GetColumnCount(); ++c) { if (IsNumber2(grid.Get(fRow, c))) { gridDef.Set(0, 0, c); gridDef.Set(0, 3, c + 1); gridDef.Set(0, 1, fRow); break; } } if (c == grid.GetColumnCount()) { Exclamation(t_("Problem in Autoset")); return; } int r; for (r = fRow; r < grid.GetRowCount(); ++r) { if (!IsNumber2(grid.Get(r, c))) break; } gridDef.Set(0, 2, r - 1); } else { Exclamation("No implementado"); } scatter.RemoveAllSeries(); scatter.AddSeries(ds).Legend("Series").MarkStyle<RhombMarkPlot>().MarkWidth(10).NoPlot(); gridTrend.Clear(); scatter.ZoomToFit(true, true); }
void TabRegression::OnAutoset() { if (down.switchColsRows == 0) { // Columnas int fRow = down.firstCellIsName ? 1 : 0; int c; for (c = 0; c < down.grid.GetColumnCount(); ++c) { if (IsNumber2(down.grid.Get(fRow, c))) { down.gridDef.Set(0, 0, c); down.gridDef.Set(0, 3, c + 1); down.gridDef.Set(0, 1, fRow); break; } } if (c == down.grid.GetColumnCount()) { Exclamation(t_("Problem in Autoset")); return; } int r; for (r = fRow; r < down.grid.GetRowCount(); ++r) { if (!IsNumber2(down.grid.Get(r, c))) break; } down.gridDef.Set(0, 2, r - 1); } else { Exclamation("Not implemented"); } OnUpdate(); }