Skip to content

Commit

Permalink
Merge pull request #33 from gosling-lang/thomcsmits/casesoverlaid
Browse files Browse the repository at this point in the history
Thomcsmits/casesoverlaid
  • Loading branch information
thomcsmits authored Apr 23, 2024
2 parents 3bf4856 + d99cb90 commit 0512154
Show file tree
Hide file tree
Showing 22 changed files with 2,283 additions and 2,062 deletions.
42 changes: 13 additions & 29 deletions demo/DemoFull.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,38 @@ import React, { useState } from 'react';
import { AltGoslingComponent } from '../src/AltGoslingComponent';

// simple examples
import { barChart, barChartStatic } from './examples/barChart';
import { lineChart } from './examples/lineChart';
import { pointChart } from './examples/pointChart';
import { ideogram, ideogramWithArea } from './examples/ideogram';
import { compare2 } from './examples/tonsil';
import { barChart } from './examples/barChart';
import { ideogramWithArea } from './examples/ideogram';
import { compareTwoSamples } from './examples/tonsil';
import { circularHalves } from './examples/circularHalves';
import { heatmap } from './examples/heatmap';

// multiple visual encodings
import { visualEncoding } from './examples/visualEncoding';
import { visualEncodingTrack1, visualEncodingTrack1And2, visualEncodingTrack4, visualEncodingTrack4WithDataCopied } from './examples/visualEncodingVariations';
import { ruleMark, ruleMark2, ruleMarkOverlaidWithSecondEncoding, ruleMarkOverlaidWithSecondEncodingSame } from './examples/ruleMark';
import { doubleMarks } from './examples/visualEncodingOverlay';
import { ruleMark } from './examples/ruleMark';
import { brush } from './examples/brush';

// complex examples
import { give } from './examples/exampleGIVE';
import { geneAnnotation } from './examples/geneAnnotation';
import { transform } from './examples/transform';

// MUI elements
import Grid from '@mui/material/Grid';
import FormControl from '@mui/material/FormControl';
import InputLabel from '@mui/material/InputLabel';
import Select from '@mui/material/Select';
import MenuItem from '@mui/material/MenuItem';
import { brush } from './examples/brush';


function Demo() {
const examples = {'Bar chart': barChart,
'Line chart': lineChart,
// 'Point chart': pointChart,
// 'Ideogram': ideogram,
'Ideogram': ideogramWithArea,
'Linked views': brush,
// 'Multiple Visual Encodings': visualEncoding,
'Tonsil ChIP-seq comparison': compare2,
// 'Multiple Visual Encoding Track 1 and 2': visualEncodingTrack1And2,
// 'Multiple Visual Encoding Track 4': visualEncodingTrack4,
// 'Multiple Visual Encoding Track 4 Test': visualEncodingTrack4WithDataCopied,
'Bar chart with lines': ruleMark,
// 'Bar chart with lines2': ruleMark2,
// 'Bar chart with points': ruleMarkOverlaidWithSecondEncoding,
// 'Bar chart with points2': ruleMarkOverlaidWithSecondEncodingSame,
// 'GIVE - CAO et al.': give,
const examples = {'Bar chart': barChart,
'Ideogram': ideogramWithArea,
'Linked views': brush,
'Tonsil ChIP-seq comparison': compareTwoSamples,
'Bar chart with lines': ruleMark,
'Double marks': doubleMarks,
'Gene annotations': geneAnnotation,
'Circular halves': circularHalves,
'Circular heatmap': heatmap
// 'transform': transform
'Heatmap': heatmap,
};
const [selectedExample, setSelectedExample] = useState<string>(Object.keys(examples)[0]);

Expand Down
27 changes: 0 additions & 27 deletions demo/examples/barChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,3 @@ export const barChart = {
}
]
}

export const barChartStatic = {
"title": "Basic Marks: bar",
"subtitle": "Tutorial Examples",
"static": true,
"tracks": [
{
"layout": "linear",
"width": 800,
"height": 180,
"data": {
"url": "https://resgen.io/api/v1/tileset_info/?d=UvVPeLHuRDiYA3qwFlm7xQ",
"type": "multivec",
"row": "sample",
"column": "position",
"value": "peak",
"categories": ["sample 1"],
"binSize": 5
},
"mark": "bar",
"x": {"field": "start", "type": "genomic", "axis": "bottom"},
"xe": {"field": "end", "type": "genomic"},
"y": {"field": "peak", "type": "quantitative", "axis": "right"},
"size": {"value": 5}
}
]
}
2 changes: 1 addition & 1 deletion demo/examples/brush.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const brush = {
"title": "Visual Linking",
"subtitle": "Change the position and range of brushes to update the detail view on the bottom",
"subtitle": "Change the position and range of the brush to update the detail view on the bottom",
"arrangement": "vertical",
"centerRadius": 0.4,
"views": [
Expand Down
Loading

0 comments on commit 0512154

Please sign in to comment.