tRowXValue returns an x value at given actual row in table
(row int)
| 170 | |
| 171 | // tRowXValue returns an x value at given actual row in table |
| 172 | func (txy *tableXY) tRowXValue(row int) float32 { |
| 173 | if txy.table == nil || txy.table.Table == nil { |
| 174 | return 0 |
| 175 | } |
| 176 | xc := txy.table.Table.Columns[txy.xColumn] |
| 177 | x := float32(0.0) |
| 178 | switch { |
| 179 | case xc.IsString(): |
| 180 | x = float32(row) |
| 181 | case xc.NumDims() > 1: |
| 182 | _, sz := xc.RowCellSize() |
| 183 | if txy.xIndex < sz && txy.xIndex >= 0 { |
| 184 | x = float32(xc.FloatRowCell(row, txy.xIndex)) |
| 185 | } |
| 186 | default: |
| 187 | x = float32(xc.Float1D(row)) |
| 188 | } |
| 189 | return x |
| 190 | } |
| 191 | |
| 192 | // xValue returns an x value at given row in table |
| 193 | func (txy *tableXY) xValue(row int) float32 { |
no test coverage detected