newColumnSerie to create a serie from a known type
(ctyp ColumnType, options ColumnOptions)
| 142 | |
| 143 | // newColumnSerie to create a serie from a known type |
| 144 | func newColumnSerie(ctyp ColumnType, options ColumnOptions) (serie.Serie, error) { |
| 145 | if s, ok := ctypes[ctyp]; ok { |
| 146 | return s(options), nil |
| 147 | } |
| 148 | err := errors.Errorf("unknown column type '%s'", ctyp) |
| 149 | return nil, errors.Wrap(err, ErrUnknownColumnType.Error()) |
| 150 | } |
| 151 | |
| 152 | // Column describes a column in our datatable |
| 153 | type Column interface { |
no outgoing calls