gosling.js
gosling.js copied to clipboard
feat: native 1D and 2D matrix rendering
Updates
- 2D matrix now uses Gosling.js' native rendering. This allows using semantic zooming (e.g., showing details with text labels when zoomed in) or using different mark types (e.g., visualize points with extreme values).
- To support the matrix, we now support cooler files, i.e.,
matrix
data type. For the rendering performance, nine cells are aggregated by default. We can expose a parameter to control this number when we improve the rendering performance.
data: {
url: 'http://...', type: 'matrix'
},
- Added a
rotateMatrix
data transform to support 45deg rotated matrix (i.e., "horizontal matrix").
dataTransform: [
{
type: 'rotateMatrix',
startField1: 'xs',
endField1: 'xe',
startField2: 'ye',
endField2: 'ys'
}
],

- Added a
diamond
mark to support 45deg rotated matrix that works in both the linear and circular layouts.
mark: 'diamond',
x: { field: 'xs', type: 'genomic', axis: 'bottom' },
xe: { field: 'xe', type: 'genomic' },
y: { field: 'ys', type: 'quantitative', axis: 'none' },
ye: { field: 'ye', type: 'quantitative', axis: 'none' },
color: { field: 'value', type: 'quantitative', legend: true },
Screenshots







ToDo
- [ ] Zig-zag patterns at extent still should be handled
- [ ] support
yDomain