gosling.js icon indicating copy to clipboard operation
gosling.js copied to clipboard

feat: native 1D and 2D matrix rendering

Open sehilyi opened this issue 3 years ago • 0 comments

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'
    }
],
Screen Shot 2021-10-14 at 9 59 39 PM
  • 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

Screen Shot 2021-10-13 at 3 32 12 PM Screen Shot 2021-10-13 at 3 32 21 PM Screen Shot 2021-10-14 at 2 43 46 PM Screen Shot 2021-10-14 at 4 46 04 PM Screen Shot 2021-10-14 at 5 12 45 PM Screen Shot 2021-10-21 at 9 39 07 PM Screen Shot 2021-10-21 at 9 39 21 PM

ToDo

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

sehilyi avatar Oct 12 '21 07:10 sehilyi