Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: native 1D and 2D matrix rendering #543

Closed
wants to merge 15 commits into from
Closed

Conversation

sehilyi
Copy link
Member

@sehilyi sehilyi commented Oct 12, 2021

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 sehilyi mentioned this pull request Oct 14, 2021
@sehilyi sehilyi changed the title feat: native matrix rendering feat: native 1D and 2D matrix rendering Oct 14, 2021
@sehilyi sehilyi force-pushed the sehilyi/native-matrix branch from 194c789 to a0a8c2d Compare October 21, 2021 11:23
@sehilyi sehilyi closed this Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant