@genspectrum/dashboard-components 0.4.4 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +2 -2
  2. package/custom-elements.json +279 -108
  3. package/dist/dashboard-components.js +495 -283
  4. package/dist/dashboard-components.js.map +1 -1
  5. package/dist/genspectrum-components.d.ts +115 -55
  6. package/dist/style.css +34 -7
  7. package/package.json +5 -5
  8. package/src/preact/aggregatedData/aggregate-table.tsx +3 -2
  9. package/src/preact/aggregatedData/aggregate.stories.tsx +2 -0
  10. package/src/preact/aggregatedData/aggregate.tsx +8 -3
  11. package/src/preact/components/table.stories.tsx +51 -1
  12. package/src/preact/components/table.tsx +4 -3
  13. package/src/preact/locationFilter/location-filter.stories.tsx +12 -1
  14. package/src/preact/locationFilter/location-filter.tsx +10 -3
  15. package/src/preact/mutationComparison/mutation-comparison-table.tsx +7 -2
  16. package/src/preact/mutationComparison/mutation-comparison-venn.tsx +1 -1
  17. package/src/preact/mutationComparison/mutation-comparison.stories.tsx +21 -18
  18. package/src/preact/mutationComparison/mutation-comparison.tsx +30 -8
  19. package/src/preact/mutationComparison/queryMutationData.ts +4 -4
  20. package/src/preact/mutations/mutations-grid.tsx +8 -2
  21. package/src/preact/mutations/mutations-insertions-table.tsx +3 -2
  22. package/src/preact/mutations/mutations-table.tsx +3 -2
  23. package/src/preact/mutations/mutations.stories.tsx +6 -3
  24. package/src/preact/mutations/mutations.tsx +30 -10
  25. package/src/preact/mutations/queryMutations.ts +3 -3
  26. package/src/preact/prevalenceOverTime/__mockData__/{denominatorOneVariant.json → denominatorFilterOneDataset.json} +1 -1
  27. package/src/preact/prevalenceOverTime/__mockData__/{numeratorOneVariant.json → numeratorFilterOneDataset.json} +1 -1
  28. package/src/preact/prevalenceOverTime/prevalence-over-time-bar-chart.tsx +42 -5
  29. package/src/preact/prevalenceOverTime/prevalence-over-time-bubble-chart.tsx +26 -7
  30. package/src/preact/prevalenceOverTime/prevalence-over-time-line-chart.tsx +62 -28
  31. package/src/preact/prevalenceOverTime/prevalence-over-time-table.tsx +3 -2
  32. package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +30 -16
  33. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +46 -12
  34. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage-chart.tsx +39 -7
  35. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +10 -4
  36. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +19 -10
  37. package/src/preact/shared/charts/confideceInterval.ts +7 -2
  38. package/src/preact/shared/charts/getYAxisMax.ts +24 -0
  39. package/src/preact/shared/charts/getYAxisScale.ts +1 -3
  40. package/src/query/queryAggregateData.ts +2 -2
  41. package/src/query/queryInsertions.ts +7 -2
  42. package/src/query/querySubstitutionsOrDeletions.ts +2 -2
  43. package/src/web-components/input/gs-date-range-selector.tsx +1 -1
  44. package/src/web-components/input/gs-location-filter.stories.ts +11 -0
  45. package/src/web-components/input/gs-location-filter.tsx +15 -2
  46. package/src/web-components/input/gs-mutation-filter.tsx +1 -1
  47. package/src/web-components/input/gs-text-input.tsx +1 -1
  48. package/src/web-components/visualization/gs-aggregate.stories.ts +4 -0
  49. package/src/web-components/visualization/gs-aggregate.tsx +10 -2
  50. package/src/web-components/visualization/gs-mutation-comparison.stories.ts +16 -12
  51. package/src/web-components/visualization/gs-mutation-comparison.tsx +26 -19
  52. package/src/web-components/visualization/gs-mutations.stories.ts +8 -4
  53. package/src/web-components/visualization/gs-mutations.tsx +18 -11
  54. package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +51 -35
  55. package/src/web-components/visualization/gs-prevalence-over-time.tsx +66 -24
  56. package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +32 -18
  57. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +51 -13
  58. /package/src/preact/mutationComparison/__mockData__/{nucleotideMutationsOtherVariant.json → nucleotideMutationsOtherDataset.json} +0 -0
  59. /package/src/preact/mutationComparison/__mockData__/{nucleotideMutationsSomeVariant.json → nucleotideMutationsSomeDataset.json} +0 -0
  60. /package/src/preact/prevalenceOverTime/__mockData__/{denominator.json → denominatorFilter.json} +0 -0
  61. /package/src/preact/prevalenceOverTime/__mockData__/{numeratorEG.json → numeratorFilterEG.json} +0 -0
  62. /package/src/preact/prevalenceOverTime/__mockData__/{numeratorJN1.json → numeratorFilterJN1.json} +0 -0
  63. /package/src/preact/relativeGrowthAdvantage/__mockData__/{denominator.json → denominatorFilter.json} +0 -0
  64. /package/src/preact/relativeGrowthAdvantage/__mockData__/{numerator.json → numeratorFilter.json} +0 -0
@@ -364,7 +364,7 @@
364
364
  "text": "string"
365
365
  },
366
366
  "default": "'100%'",
367
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
367
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
368
368
  "attribute": "width"
369
369
  },
370
370
  {
@@ -439,7 +439,7 @@
439
439
  "text": "string"
440
440
  },
441
441
  "default": "'100%'",
442
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
442
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
443
443
  "fieldName": "width"
444
444
  },
445
445
  {
@@ -489,7 +489,7 @@
489
489
  "type": {
490
490
  "text": "Meta"
491
491
  },
492
- "default": "{ title: 'Input/Location filter', component: 'gs-location-filter', parameters: withComponentDocs({ actions: { handles: ['gs-location-changed'], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { fields: { control: { type: 'object', }, }, initialValue: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, }, decorators: [withActions], tags: ['autodocs'], }"
492
+ "default": "{ title: 'Input/Location filter', component: 'gs-location-filter', parameters: withComponentDocs({ actions: { handles: ['gs-location-changed'], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { fields: { control: { type: 'object', }, }, initialValue: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, placeholderText: { control: { type: 'text', }, }, }, decorators: [withActions], tags: ['autodocs'], }"
493
493
  },
494
494
  {
495
495
  "kind": "variable",
@@ -497,7 +497,7 @@
497
497
  "type": {
498
498
  "text": "StoryObj<LocationFilterProps>"
499
499
  },
500
- "default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: aggregatedEndpointMatcher, response: { status: 200, body: data, }, }, ], }, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-location-filter'); await waitFor(() => { return expect(canvas.getByRole('combobox')).toBeEnabled(); }); }, }"
500
+ "default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: aggregatedEndpointMatcher, response: { status: 200, body: data, }, }, ], }, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-location-filter'); await waitFor(() => { return expect(canvas.getByRole('combobox')).toBeEnabled(); }); await waitFor(() => { return expect(canvas.getByPlaceholderText('Enter a location')).toBeInTheDocument(); }); }, }"
501
501
  },
502
502
  {
503
503
  "kind": "variable",
@@ -603,8 +603,18 @@
603
603
  "text": "string"
604
604
  },
605
605
  "default": "'100%'",
606
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
606
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
607
607
  "attribute": "width"
608
+ },
609
+ {
610
+ "kind": "field",
611
+ "name": "placeholderText",
612
+ "type": {
613
+ "text": "string"
614
+ },
615
+ "default": "''",
616
+ "description": "The placeholder text to display in the input field, if it is empty.",
617
+ "attribute": "placeholderText"
608
618
  }
609
619
  ],
610
620
  "events": [
@@ -641,8 +651,17 @@
641
651
  "text": "string"
642
652
  },
643
653
  "default": "'100%'",
644
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
654
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
645
655
  "fieldName": "width"
656
+ },
657
+ {
658
+ "name": "placeholderText",
659
+ "type": {
660
+ "text": "string"
661
+ },
662
+ "default": "''",
663
+ "description": "The placeholder text to display in the input field, if it is empty.",
664
+ "fieldName": "placeholderText"
646
665
  }
647
666
  ],
648
667
  "superclass": {
@@ -770,7 +789,7 @@
770
789
  "text": "string"
771
790
  },
772
791
  "default": "'100%'",
773
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
792
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
774
793
  "attribute": "width"
775
794
  }
776
795
  ],
@@ -806,7 +825,7 @@
806
825
  "text": "string"
807
826
  },
808
827
  "default": "'100%'",
809
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
828
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
810
829
  "fieldName": "width"
811
830
  }
812
831
  ],
@@ -939,7 +958,7 @@
939
958
  "text": "string"
940
959
  },
941
960
  "default": "'100%'",
942
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
961
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
943
962
  "attribute": "width"
944
963
  }
945
964
  ],
@@ -986,7 +1005,7 @@
986
1005
  "text": "string"
987
1006
  },
988
1007
  "default": "'100%'",
989
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1008
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
990
1009
  "fieldName": "width"
991
1010
  }
992
1011
  ],
@@ -1124,7 +1143,7 @@
1124
1143
  "type": {
1125
1144
  "text": "Meta<Required<AggregateProps>>"
1126
1145
  },
1127
- "default": "{ title: 'Visualization/Aggregate', component: 'gs-aggregate', argTypes: { fields: [{ control: 'object' }], views: { options: ['table'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, initialSortField: { control: 'text' }, initialSortDirection: { options: ['ascending', 'descending'], control: { type: 'radio' }, }, }, parameters: withComponentDocs({ fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1146
+ "default": "{ title: 'Visualization/Aggregate', component: 'gs-aggregate', argTypes: { fields: [{ control: 'object' }], views: { options: ['table'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, initialSortField: { control: 'text' }, initialSortDirection: { options: ['ascending', 'descending'], control: { type: 'radio' }, }, }, parameters: withComponentDocs({ fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1128
1147
  },
1129
1148
  {
1130
1149
  "kind": "variable",
@@ -1132,7 +1151,7 @@
1132
1151
  "type": {
1133
1152
  "text": "StoryObj<Required<AggregateProps>>"
1134
1153
  },
1135
- "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .filter=${args.filter} .views=${args.views} .width=${args.width} .height=${args.height} .headline=${args.headline} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} ></gs-aggregate> </gs-app> `, args: { fields: ['division', 'host'], views: ['table'], filter: { country: 'USA', }, width: '100%', height: '700px', headline: 'Aggregate', initialSortField: 'count', initialSortDirection: 'descending', }, }"
1154
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .filter=${args.filter} .views=${args.views} .width=${args.width} .height=${args.height} .headline=${args.headline} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} .pageSize=${args.pageSize} ></gs-aggregate> </gs-app> `, args: { fields: ['division', 'host'], views: ['table'], filter: { country: 'USA', }, width: '100%', height: '700px', headline: 'Aggregate', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, }, }"
1136
1155
  }
1137
1156
  ],
1138
1157
  "exports": [
@@ -1200,7 +1219,7 @@
1200
1219
  "text": "string"
1201
1220
  },
1202
1221
  "default": "'100%'",
1203
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1222
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1204
1223
  "attribute": "width"
1205
1224
  },
1206
1225
  {
@@ -1210,7 +1229,7 @@
1210
1229
  "text": "string"
1211
1230
  },
1212
1231
  "default": "'700px'",
1213
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1232
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1214
1233
  "attribute": "height"
1215
1234
  },
1216
1235
  {
@@ -1242,6 +1261,16 @@
1242
1261
  "default": "'descending'",
1243
1262
  "description": "The initial sort direction of the table.",
1244
1263
  "attribute": "initialSortDirection"
1264
+ },
1265
+ {
1266
+ "kind": "field",
1267
+ "name": "pageSize",
1268
+ "type": {
1269
+ "text": "boolean | number"
1270
+ },
1271
+ "default": "false",
1272
+ "description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
1273
+ "attribute": "pageSize"
1245
1274
  }
1246
1275
  ],
1247
1276
  "attributes": [
@@ -1278,7 +1307,7 @@
1278
1307
  "text": "string"
1279
1308
  },
1280
1309
  "default": "'100%'",
1281
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1310
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1282
1311
  "fieldName": "width"
1283
1312
  },
1284
1313
  {
@@ -1287,7 +1316,7 @@
1287
1316
  "text": "string"
1288
1317
  },
1289
1318
  "default": "'700px'",
1290
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1319
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1291
1320
  "fieldName": "height"
1292
1321
  },
1293
1322
  {
@@ -1316,6 +1345,15 @@
1316
1345
  "default": "'descending'",
1317
1346
  "description": "The initial sort direction of the table.",
1318
1347
  "fieldName": "initialSortDirection"
1348
+ },
1349
+ {
1350
+ "name": "pageSize",
1351
+ "type": {
1352
+ "text": "boolean | number"
1353
+ },
1354
+ "default": "false",
1355
+ "description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
1356
+ "fieldName": "pageSize"
1319
1357
  }
1320
1358
  ],
1321
1359
  "superclass": {
@@ -1355,7 +1393,7 @@
1355
1393
  "type": {
1356
1394
  "text": "Meta<Required<MutationComparisonProps>>"
1357
1395
  },
1358
- "default": "{ title: 'Visualization/Mutation comparison', component: 'gs-mutation-comparison', argTypes: { variants: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'venn'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1396
+ "default": "{ title: 'Visualization/Mutation comparison', component: 'gs-mutation-comparison', argTypes: { lapisFilters: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'venn'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1359
1397
  },
1360
1398
  {
1361
1399
  "kind": "variable",
@@ -1363,7 +1401,7 @@
1363
1401
  "type": {
1364
1402
  "text": "StoryObj<Required<MutationComparisonProps>>"
1365
1403
  },
1366
- "default": "{ ...Template, args: { variants: [ { displayName: 'Some variant', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo }, }, { displayName: 'Other variant', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, }, }, ], sequenceType: 'nucleotide', views: ['table', 'venn'], width: '100%', height: '700px', headline: 'Mutation comparison', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutationsSomeVariant', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsSomeVariant, }, }, { matcher: { name: 'nucleotideMutationsOtherVariant', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsOtherVariant, }, }, ], }, }, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-comparison'); await step('Min and max proportions should be 50% and 100%', async () => { const minInput = () => canvas.getAllByLabelText('%')[0]; const maxInput = () => canvas.getAllByLabelText('%')[1]; await waitFor(() => expect(minInput()).toHaveValue(50)); await waitFor(() => expect(maxInput()).toHaveValue(100)); }); }, }"
1404
+ "default": "{ ...Template, args: { lapisFilters: [ { displayName: 'Some dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo }, }, { displayName: 'Other dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, }, }, ], sequenceType: 'nucleotide', views: ['table', 'venn'], width: '100%', height: '700px', headline: 'Mutation comparison', pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutationsSomeDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsSomeDataset, }, }, { matcher: { name: 'nucleotideMutationsOtherDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsOtherDataset, }, }, ], }, }, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-comparison'); await step('Min and max proportions should be 50% and 100%', async () => { const minInput = () => canvas.getAllByLabelText('%')[0]; const maxInput = () => canvas.getAllByLabelText('%')[1]; await waitFor(() => expect(minInput()).toHaveValue(50)); await waitFor(() => expect(maxInput()).toHaveValue(100)); }); }, }"
1367
1405
  },
1368
1406
  {
1369
1407
  "kind": "variable",
@@ -1407,18 +1445,18 @@
1407
1445
  "declarations": [
1408
1446
  {
1409
1447
  "kind": "class",
1410
- "description": "## Context\n\nThis component allows to compare mutations between different variants.\nA variant is defined by its LAPIS filter.\n\nIt only shows substitutions and deletions, it does not show insertions.\n\n## Views\n\n### Table View\n\nThe table view shows mutations\nand the proportions with which the mutation occurs in the respective variant.\nIt only shows mutations that are present in at least one of the variants\nand where the proportion is within the selected proportion interval for at least one variant.\n\n### Venn View\n\nThe Venn view shows the overlap of mutations between the variants in a Venn diagram.\nA variant is considered to have a certain mutation,\nif the proportion of the mutation in the variant is within the selected proportion interval.\nThus, changing the proportion interval may change a mutations from being \"common\" between variant\nto being \"for one variant only\".",
1448
+ "description": "## Context\n\nThis component allows to compare mutations between two different datasets.\nThe datasets are selected by LAPIS filters.\n\nIt only shows substitutions and deletions, it does not show insertions.\n\n## Views\n\n### Table View\n\nThe table view shows mutations and the proportions with which the mutation occurs in the respective data subsets.\nIt only shows mutations that are present in at least one of the data subsets\nand where the proportion is within the selected proportion interval for at least one data subset.\n\n### Venn View\n\nThe Venn view shows the overlap of mutations between the datasets in a Venn diagram.\nA dataset is considered to have a certain mutation, if the proportion of the mutation in the dataset is within the\nselected proportion interval.\nThus, changing the proportion interval may change a mutations from being \"common\" between the datasets\nto being \"for one dataset only\".",
1411
1449
  "name": "MutationComparisonComponent",
1412
1450
  "members": [
1413
1451
  {
1414
1452
  "kind": "field",
1415
- "name": "variants",
1453
+ "name": "lapisFilters",
1416
1454
  "type": {
1417
1455
  "text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
1418
1456
  },
1419
1457
  "default": "[]",
1420
- "description": "Required.\n\nAn array of variants to compare.\n\nThe `lapisFilter` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label for the variant in the views.\nIt should be human-readable.",
1421
- "attribute": "variants"
1458
+ "description": "Required.\n\nAn array of LAPIS filters to select the data to compare.\n\nThe `lapisFilter` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label for the filtered dataset in the views.\nIt should be human-readable.",
1459
+ "attribute": "lapisFilters"
1422
1460
  },
1423
1461
  {
1424
1462
  "kind": "field",
@@ -1447,7 +1485,7 @@
1447
1485
  "text": "string"
1448
1486
  },
1449
1487
  "default": "'100%'",
1450
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1488
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1451
1489
  "attribute": "width"
1452
1490
  },
1453
1491
  {
@@ -1457,7 +1495,7 @@
1457
1495
  "text": "string"
1458
1496
  },
1459
1497
  "default": "'700px'",
1460
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1498
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1461
1499
  "attribute": "height"
1462
1500
  },
1463
1501
  {
@@ -1469,17 +1507,27 @@
1469
1507
  "default": "'Mutation comparison'",
1470
1508
  "description": "The headline of the component. Set to an empty string to hide the headline.",
1471
1509
  "attribute": "headline"
1510
+ },
1511
+ {
1512
+ "kind": "field",
1513
+ "name": "pageSize",
1514
+ "type": {
1515
+ "text": "boolean | number"
1516
+ },
1517
+ "default": "false",
1518
+ "description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
1519
+ "attribute": "pageSize"
1472
1520
  }
1473
1521
  ],
1474
1522
  "attributes": [
1475
1523
  {
1476
- "name": "variants",
1524
+ "name": "lapisFilters",
1477
1525
  "type": {
1478
1526
  "text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
1479
1527
  },
1480
1528
  "default": "[]",
1481
- "description": "Required.\n\nAn array of variants to compare.\n\nThe `lapisFilter` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label for the variant in the views.\nIt should be human-readable.",
1482
- "fieldName": "variants"
1529
+ "description": "Required.\n\nAn array of LAPIS filters to select the data to compare.\n\nThe `lapisFilter` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label for the filtered dataset in the views.\nIt should be human-readable.",
1530
+ "fieldName": "lapisFilters"
1483
1531
  },
1484
1532
  {
1485
1533
  "name": "sequenceType",
@@ -1505,7 +1553,7 @@
1505
1553
  "text": "string"
1506
1554
  },
1507
1555
  "default": "'100%'",
1508
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1556
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1509
1557
  "fieldName": "width"
1510
1558
  },
1511
1559
  {
@@ -1514,7 +1562,7 @@
1514
1562
  "text": "string"
1515
1563
  },
1516
1564
  "default": "'700px'",
1517
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1565
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1518
1566
  "fieldName": "height"
1519
1567
  },
1520
1568
  {
@@ -1525,6 +1573,15 @@
1525
1573
  "default": "'Mutation comparison'",
1526
1574
  "description": "The headline of the component. Set to an empty string to hide the headline.",
1527
1575
  "fieldName": "headline"
1576
+ },
1577
+ {
1578
+ "name": "pageSize",
1579
+ "type": {
1580
+ "text": "boolean | number"
1581
+ },
1582
+ "default": "false",
1583
+ "description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
1584
+ "fieldName": "pageSize"
1528
1585
  }
1529
1586
  ],
1530
1587
  "superclass": {
@@ -1564,7 +1621,7 @@
1564
1621
  "type": {
1565
1622
  "text": "Meta<Required<MutationsProps>>"
1566
1623
  },
1567
- "default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { variant: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'grid', 'insertions'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, }, args: { variant: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], width: '100%', height: '700px', headline: 'Mutations', }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1624
+ "default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'grid', 'insertions'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, }, args: { lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], width: '100%', height: '700px', headline: 'Mutations', pageSize: 10, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1568
1625
  },
1569
1626
  {
1570
1627
  "kind": "variable",
@@ -1632,18 +1689,18 @@
1632
1689
  "declarations": [
1633
1690
  {
1634
1691
  "kind": "class",
1635
- "description": "## Context\n\nThis component displays mutations (substitutions, deletions and insertions) for a given variant.\n\n## Views\n\n### Table View\n\nThe table view shows all substitutions and deletions for the given variant.\nIt shows the type (substitution or deletion), the total count of the mutation\nand the proportion of the mutation in the variant.\nThe proportion is relative to the total number of sequences matching\nthe specified sequence filters with non-ambiguous reads at that position.\n\nThe proportion interval filter can be used to filter the displayed mutations on client side.\n\n### Grid View\n\nThe grid view shows the proportion of each sequence symbol (nucleotide or amino acid) for each position that has a mutation.\nOnly positions with at least one mutation in the selected proportion interval are shown.\n\n### Insertions View\n\nThe insertions view shows the count of all insertions for the given variant.",
1692
+ "description": "## Context\n\nThis component displays mutations (substitutions, deletions and insertions) for a dataset selected by a LAPIS filter.\n\n## Views\n\n### Table View\n\nThe table view shows all substitutions and deletions for the dataset.\nIt shows the type (substitution or deletion), the total count of the mutation\nand the proportion of the mutation in the dataset.\nThe proportion is relative to the total number of sequences matching\nthe specified sequence filters with non-ambiguous reads at that position.\n\nThe proportion interval filter can be used to filter the displayed mutations on client side.\n\n### Grid View\n\nThe grid view shows the proportion of each sequence symbol (nucleotide or amino acid) for each position that has a mutation.\nOnly positions with at least one mutation in the selected proportion interval are shown.\n\n### Insertions View\n\nThe insertions view shows the count of all insertions for the dataset.",
1636
1693
  "name": "MutationsComponent",
1637
1694
  "members": [
1638
1695
  {
1639
1696
  "kind": "field",
1640
- "name": "variant",
1697
+ "name": "lapisFilter",
1641
1698
  "type": {
1642
1699
  "text": "Record<string, string | number | null | boolean>"
1643
1700
  },
1644
1701
  "default": "{}",
1645
- "description": "Required.\n\nThe `variant` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.",
1646
- "attribute": "variant"
1702
+ "description": "Required.\n\nLAPIS filter to select the displayed data.",
1703
+ "attribute": "lapisFilter"
1647
1704
  },
1648
1705
  {
1649
1706
  "kind": "field",
@@ -1672,7 +1729,7 @@
1672
1729
  "text": "string"
1673
1730
  },
1674
1731
  "default": "'100%'",
1675
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1732
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1676
1733
  "attribute": "width"
1677
1734
  },
1678
1735
  {
@@ -1682,7 +1739,7 @@
1682
1739
  "text": "string"
1683
1740
  },
1684
1741
  "default": "'700px'",
1685
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1742
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1686
1743
  "attribute": "height"
1687
1744
  },
1688
1745
  {
@@ -1694,17 +1751,27 @@
1694
1751
  "default": "'Mutations'",
1695
1752
  "description": "The headline of the component. Set to an empty string to hide the headline.",
1696
1753
  "attribute": "headline"
1754
+ },
1755
+ {
1756
+ "kind": "field",
1757
+ "name": "pageSize",
1758
+ "type": {
1759
+ "text": "boolean | number"
1760
+ },
1761
+ "default": "false",
1762
+ "description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
1763
+ "attribute": "pageSize"
1697
1764
  }
1698
1765
  ],
1699
1766
  "attributes": [
1700
1767
  {
1701
- "name": "variant",
1768
+ "name": "lapisFilter",
1702
1769
  "type": {
1703
1770
  "text": "Record<string, string | number | null | boolean>"
1704
1771
  },
1705
1772
  "default": "{}",
1706
- "description": "Required.\n\nThe `variant` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.",
1707
- "fieldName": "variant"
1773
+ "description": "Required.\n\nLAPIS filter to select the displayed data.",
1774
+ "fieldName": "lapisFilter"
1708
1775
  },
1709
1776
  {
1710
1777
  "name": "sequenceType",
@@ -1730,7 +1797,7 @@
1730
1797
  "text": "string"
1731
1798
  },
1732
1799
  "default": "'100%'",
1733
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1800
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1734
1801
  "fieldName": "width"
1735
1802
  },
1736
1803
  {
@@ -1739,7 +1806,7 @@
1739
1806
  "text": "string"
1740
1807
  },
1741
1808
  "default": "'700px'",
1742
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
1809
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1743
1810
  "fieldName": "height"
1744
1811
  },
1745
1812
  {
@@ -1750,6 +1817,15 @@
1750
1817
  "default": "'Mutations'",
1751
1818
  "description": "The headline of the component. Set to an empty string to hide the headline.",
1752
1819
  "fieldName": "headline"
1820
+ },
1821
+ {
1822
+ "name": "pageSize",
1823
+ "type": {
1824
+ "text": "boolean | number"
1825
+ },
1826
+ "default": "false",
1827
+ "description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
1828
+ "fieldName": "pageSize"
1753
1829
  }
1754
1830
  ],
1755
1831
  "superclass": {
@@ -1787,49 +1863,49 @@
1787
1863
  "kind": "variable",
1788
1864
  "name": "meta",
1789
1865
  "type": {
1790
- "text": "Meta<Required<PrevalenceOverTimeProps>>"
1866
+ "text": "Meta<Required<PrevalenceOverTimeComponentProps>>"
1791
1867
  },
1792
- "default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numerator: { control: 'object' }, denominator: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['wilson'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1868
+ "default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numeratorFilter: { control: 'object' }, denominatorFilter: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['wilson'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1793
1869
  },
1794
1870
  {
1795
1871
  "kind": "variable",
1796
- "name": "TwoVariants",
1872
+ "name": "TwoDatasets",
1797
1873
  "type": {
1798
- "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
1874
+ "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
1799
1875
  },
1800
- "default": "{ ...Template, args: { numerator: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' } }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], denominator: { country: 'USA', dateFrom: '2023-01-01' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominator, }, }, ], }, }, }"
1876
+ "default": "{ ...Template, args: { numeratorFilter: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' } }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], denominatorFilter: { country: 'USA', dateFrom: '2023-01-01' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
1801
1877
  },
1802
1878
  {
1803
1879
  "kind": "variable",
1804
- "name": "OneVariant",
1880
+ "name": "OneDataset",
1805
1881
  "type": {
1806
- "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
1882
+ "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
1807
1883
  },
1808
- "default": "{ ...Template, args: { numerator: { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, }, denominator: { country: 'USA', dateFrom: '2023-10-01' }, granularity: 'day', smoothingWindow: 7, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorOneVariant, }, }, { matcher: { name: 'denominatorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorOneVariant, }, }, ], }, }, }"
1884
+ "default": "{ ...Template, args: { numeratorFilter: { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, }, denominatorFilter: { country: 'USA', dateFrom: '2023-10-01' }, granularity: 'week', smoothingWindow: 2, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterOneDataset, }, }, { matcher: { name: 'denominatorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilterOneDataset, }, }, ], }, }, }"
1809
1885
  },
1810
1886
  {
1811
1887
  "kind": "variable",
1812
- "name": "OneVariantOnLineTab",
1888
+ "name": "OneDatasetOnLineTab",
1813
1889
  "type": {
1814
- "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
1890
+ "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
1815
1891
  },
1816
- "default": "{ ...OneVariant, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Line' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Line' })); }, }"
1892
+ "default": "{ ...OneDataset, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Line' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Line' })); }, }"
1817
1893
  },
1818
1894
  {
1819
1895
  "kind": "variable",
1820
- "name": "OneVariantOnBubbleTab",
1896
+ "name": "OneDatasetOnBubbleTab",
1821
1897
  "type": {
1822
- "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
1898
+ "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
1823
1899
  },
1824
- "default": "{ ...OneVariant, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Bubble' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Bubble' })); }, }"
1900
+ "default": "{ ...OneDataset, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Bubble' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Bubble' })); }, }"
1825
1901
  },
1826
1902
  {
1827
1903
  "kind": "variable",
1828
- "name": "OneVariantOnTableTab",
1904
+ "name": "OneDatasetOnTableTab",
1829
1905
  "type": {
1830
- "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
1906
+ "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
1831
1907
  },
1832
- "default": "{ ...OneVariant, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Table' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Table' })); }, }"
1908
+ "default": "{ ...OneDataset, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Table' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Table' })); }, }"
1833
1909
  }
1834
1910
  ],
1835
1911
  "exports": [
@@ -1843,41 +1919,41 @@
1843
1919
  },
1844
1920
  {
1845
1921
  "kind": "js",
1846
- "name": "TwoVariants",
1922
+ "name": "TwoDatasets",
1847
1923
  "declaration": {
1848
- "name": "TwoVariants",
1924
+ "name": "TwoDatasets",
1849
1925
  "module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
1850
1926
  }
1851
1927
  },
1852
1928
  {
1853
1929
  "kind": "js",
1854
- "name": "OneVariant",
1930
+ "name": "OneDataset",
1855
1931
  "declaration": {
1856
- "name": "OneVariant",
1932
+ "name": "OneDataset",
1857
1933
  "module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
1858
1934
  }
1859
1935
  },
1860
1936
  {
1861
1937
  "kind": "js",
1862
- "name": "OneVariantOnLineTab",
1938
+ "name": "OneDatasetOnLineTab",
1863
1939
  "declaration": {
1864
- "name": "OneVariantOnLineTab",
1940
+ "name": "OneDatasetOnLineTab",
1865
1941
  "module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
1866
1942
  }
1867
1943
  },
1868
1944
  {
1869
1945
  "kind": "js",
1870
- "name": "OneVariantOnBubbleTab",
1946
+ "name": "OneDatasetOnBubbleTab",
1871
1947
  "declaration": {
1872
- "name": "OneVariantOnBubbleTab",
1948
+ "name": "OneDatasetOnBubbleTab",
1873
1949
  "module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
1874
1950
  }
1875
1951
  },
1876
1952
  {
1877
1953
  "kind": "js",
1878
- "name": "OneVariantOnTableTab",
1954
+ "name": "OneDatasetOnTableTab",
1879
1955
  "declaration": {
1880
- "name": "OneVariantOnTableTab",
1956
+ "name": "OneDatasetOnTableTab",
1881
1957
  "module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
1882
1958
  }
1883
1959
  }
@@ -1889,28 +1965,28 @@
1889
1965
  "declarations": [
1890
1966
  {
1891
1967
  "kind": "class",
1892
- "description": "## Context\n\nThis component displays the prevalence over time of one or more variants.\nThe prevalence is calculated as the ratio of the number of cases of each variant given as `numerator`\nto the number of cases of the variant given as `denominator`.\n\nIn the chart views,\n- the user can select whether to display a confidence interval (not available in the bubble chart).\n The confidence interval is calculated using [Wilson score interval](https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval),\n with a confidence level of 95%.\n- the x-axis shows time steps in the selected `granularity`.\n- the user can select the y-axis scale (linear, logistic, logit).\n\n## Views\n\n### Bar View\n\nDisplays the prevalence over time as a bar chart.\nShows a bar for each variant in the `numerator` on every time step.\n\n### Line View\n\nDisplays the prevalence over time as a line chart.\nEach data point is connected for better visibility.\nShows a line for each variant in the `numerator`.\n\n### Bubble View\n\nDisplays the prevalence over time as a bubble chart.\nThe size of the bubbles represents the number of cases of the `denominator` variant.\nThe height of the bubbles represents the prevalence of the `numerator` variants.\n\n### Table View\n\nDisplays the prevalence over time as a table with one row per time point.",
1968
+ "description": "## Context\n\nThis component displays the prevalence over time of one or more datasets, selected by LAPIS filters.\nThe prevalence is calculated as the ratio of the number of cases of each dataset to the number of cases of a reference dataset.\nThe reference dataset is also selected by a LAPIS filter.\n\nIn the chart views,\n- the user can select whether to display a confidence interval (not available in the bubble chart).\n The confidence interval is calculated using [Wilson score interval](https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval),\n with a confidence level of 95%.\n- the x-axis shows time steps in the selected `granularity`.\n- the user can select the y-axis scale (linear, logistic, logit).\n\n## Views\n\n### Bar View\n\nDisplays the prevalence over time as a bar chart.\nShows a bar for each dataset of the `numeratorFilter` on every time step.\n\n### Line View\n\nDisplays the prevalence over time as a line chart.\nEach data point is connected for better visibility.\nShows a line for each dataset of the `numeratorFilter`.\n\n### Bubble View\n\nDisplays the prevalence over time as a bubble chart.\nThe size of the bubbles represents the number of cases of the reference, defined by the `denominatorFilter`.\nThe height of the bubbles represents the prevalence of the datasets selected by the `numeratorFilters`.\n\n### Table View\n\nDisplays the prevalence over time as a table with one row per time point.",
1893
1969
  "name": "PrevalenceOverTimeComponent",
1894
1970
  "members": [
1895
1971
  {
1896
1972
  "kind": "field",
1897
- "name": "numerator",
1973
+ "name": "numeratorFilter",
1898
1974
  "type": {
1899
- "text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
1975
+ "text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
1900
1976
  },
1901
1977
  "default": "{ displayName: '', lapisFilter: {} }",
1902
- "description": "Required.\n\nEither a single variant or an array of variants to compare.\nThis must be a valid LAPIS filter object with an additional `displayName` property\nwhich will be used as the label for the variant in the views,\nor an array of such objects.",
1903
- "attribute": "numerator"
1978
+ "description": "Required.\nEither a LAPIS filter or an array of LAPIS filters to calculate the prevalence for.\n\nThe `lapisFilter` will be sent as is to LAPIS to select the data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label the prevalence in the views.\nIt should be human-readable.",
1979
+ "attribute": "numeratorFilter"
1904
1980
  },
1905
1981
  {
1906
1982
  "kind": "field",
1907
- "name": "denominator",
1983
+ "name": "denominatorFilter",
1908
1984
  "type": {
1909
1985
  "text": "Record<string, string | number | null | boolean>"
1910
1986
  },
1911
1987
  "default": "{}",
1912
- "description": "Required.\n\nThe variant that the variants in `numerator` are compared to.",
1913
- "attribute": "denominator"
1988
+ "description": "Required.\n\nThe LAPIS filter, to select the data of the reference.\nIt must be a valid LAPIS filter object.",
1989
+ "attribute": "denominatorFilter"
1914
1990
  },
1915
1991
  {
1916
1992
  "kind": "field",
@@ -1969,7 +2045,7 @@
1969
2045
  "text": "string"
1970
2046
  },
1971
2047
  "default": "'100%'",
1972
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
2048
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1973
2049
  "attribute": "width"
1974
2050
  },
1975
2051
  {
@@ -1979,7 +2055,7 @@
1979
2055
  "text": "string"
1980
2056
  },
1981
2057
  "default": "'700px'",
1982
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
2058
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1983
2059
  "attribute": "height"
1984
2060
  },
1985
2061
  {
@@ -1991,26 +2067,56 @@
1991
2067
  "default": "'date'",
1992
2068
  "description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nThe values will be used on the x-axis of the diagram.\nMust be a field of type `date` in LAPIS.",
1993
2069
  "attribute": "lapisDateField"
2070
+ },
2071
+ {
2072
+ "kind": "field",
2073
+ "name": "pageSize",
2074
+ "type": {
2075
+ "text": "boolean | number"
2076
+ },
2077
+ "default": "false",
2078
+ "description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
2079
+ "attribute": "pageSize"
2080
+ },
2081
+ {
2082
+ "kind": "field",
2083
+ "name": "yAxisMaxLinear",
2084
+ "type": {
2085
+ "text": "'maxInData' | 'limitTo1' | number"
2086
+ },
2087
+ "default": "1",
2088
+ "description": "The maximum value for the y-axis on all graphs in linear view.\nIf set to a number, the maximum value is set to this number.\nIf set to `maxInData`, the maximum value is set to the maximum value in the data.\nIf set to `limitTo1`, the maximum value is set to `min(1, the maximum value in the data)`.\nIf not set, the maximum value is set to the default value (1).",
2089
+ "attribute": "yAxisMaxLinear"
2090
+ },
2091
+ {
2092
+ "kind": "field",
2093
+ "name": "yAxisMaxLogarithmic",
2094
+ "type": {
2095
+ "text": "'maxInData' | 'limitTo1' | number"
2096
+ },
2097
+ "default": "1",
2098
+ "description": "The maximum value for the y-axis on all graphs in logarithmic view.\nIf set to a number, the maximum value is set to this number.\nIf set to `maxInData`, the maximum value is set to the maximum value in the data.\nIf set to `limitTo1`, the maximum value is set to `min(1, the maximum value in the data)`.\nIf not set, the maximum value is set to the default value (1).",
2099
+ "attribute": "yAxisMaxLogarithmic"
1994
2100
  }
1995
2101
  ],
1996
2102
  "attributes": [
1997
2103
  {
1998
- "name": "numerator",
2104
+ "name": "numeratorFilter",
1999
2105
  "type": {
2000
- "text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
2106
+ "text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
2001
2107
  },
2002
2108
  "default": "{ displayName: '', lapisFilter: {} }",
2003
- "description": "Required.\n\nEither a single variant or an array of variants to compare.\nThis must be a valid LAPIS filter object with an additional `displayName` property\nwhich will be used as the label for the variant in the views,\nor an array of such objects.",
2004
- "fieldName": "numerator"
2109
+ "description": "Required.\nEither a LAPIS filter or an array of LAPIS filters to calculate the prevalence for.\n\nThe `lapisFilter` will be sent as is to LAPIS to select the data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label the prevalence in the views.\nIt should be human-readable.",
2110
+ "fieldName": "numeratorFilter"
2005
2111
  },
2006
2112
  {
2007
- "name": "denominator",
2113
+ "name": "denominatorFilter",
2008
2114
  "type": {
2009
2115
  "text": "Record<string, string | number | null | boolean>"
2010
2116
  },
2011
2117
  "default": "{}",
2012
- "description": "Required.\n\nThe variant that the variants in `numerator` are compared to.",
2013
- "fieldName": "denominator"
2118
+ "description": "Required.\n\nThe LAPIS filter, to select the data of the reference.\nIt must be a valid LAPIS filter object.",
2119
+ "fieldName": "denominatorFilter"
2014
2120
  },
2015
2121
  {
2016
2122
  "name": "granularity",
@@ -2063,7 +2169,7 @@
2063
2169
  "text": "string"
2064
2170
  },
2065
2171
  "default": "'100%'",
2066
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
2172
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2067
2173
  "fieldName": "width"
2068
2174
  },
2069
2175
  {
@@ -2072,7 +2178,7 @@
2072
2178
  "text": "string"
2073
2179
  },
2074
2180
  "default": "'700px'",
2075
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
2181
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2076
2182
  "fieldName": "height"
2077
2183
  },
2078
2184
  {
@@ -2083,6 +2189,33 @@
2083
2189
  "default": "'date'",
2084
2190
  "description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nThe values will be used on the x-axis of the diagram.\nMust be a field of type `date` in LAPIS.",
2085
2191
  "fieldName": "lapisDateField"
2192
+ },
2193
+ {
2194
+ "name": "pageSize",
2195
+ "type": {
2196
+ "text": "boolean | number"
2197
+ },
2198
+ "default": "false",
2199
+ "description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
2200
+ "fieldName": "pageSize"
2201
+ },
2202
+ {
2203
+ "name": "yAxisMaxLinear",
2204
+ "type": {
2205
+ "text": "'maxInData' | 'limitTo1' | number"
2206
+ },
2207
+ "default": "1",
2208
+ "description": "The maximum value for the y-axis on all graphs in linear view.\nIf set to a number, the maximum value is set to this number.\nIf set to `maxInData`, the maximum value is set to the maximum value in the data.\nIf set to `limitTo1`, the maximum value is set to `min(1, the maximum value in the data)`.\nIf not set, the maximum value is set to the default value (1).",
2209
+ "fieldName": "yAxisMaxLinear"
2210
+ },
2211
+ {
2212
+ "name": "yAxisMaxLogarithmic",
2213
+ "type": {
2214
+ "text": "'maxInData' | 'limitTo1' | number"
2215
+ },
2216
+ "default": "1",
2217
+ "description": "The maximum value for the y-axis on all graphs in logarithmic view.\nIf set to a number, the maximum value is set to this number.\nIf set to `maxInData`, the maximum value is set to the maximum value in the data.\nIf set to `limitTo1`, the maximum value is set to `min(1, the maximum value in the data)`.\nIf not set, the maximum value is set to the default value (1).",
2218
+ "fieldName": "yAxisMaxLogarithmic"
2086
2219
  }
2087
2220
  ],
2088
2221
  "superclass": {
@@ -2120,17 +2253,17 @@
2120
2253
  "kind": "variable",
2121
2254
  "name": "meta",
2122
2255
  "type": {
2123
- "text": "Meta<RelativeGrowthAdvantageProps>"
2256
+ "text": "Meta<RelativeGrowthAdvantageComponentProps>"
2124
2257
  },
2125
- "default": "{ title: 'Visualization/Relative growth advantage', component: 'gs-relative-growth-advantage', argTypes: { numerator: { control: 'object' }, denominator: { control: 'object' }, generationTime: { control: 'number' }, views: { options: ['line'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2258
+ "default": "{ title: 'Visualization/Relative growth advantage', component: 'gs-relative-growth-advantage', argTypes: { numeratorFilter: { control: 'object' }, denominatorFilter: { control: 'object' }, generationTime: { control: 'number' }, views: { options: ['line'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2126
2259
  },
2127
2260
  {
2128
2261
  "kind": "variable",
2129
2262
  "name": "Default",
2130
2263
  "type": {
2131
- "text": "StoryObj<Required<RelativeGrowthAdvantageProps>>"
2264
+ "text": "StoryObj<Required<RelativeGrowthAdvantageComponentProps>>"
2132
2265
  },
2133
- "default": "{ ...Template, args: { numerator: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01' }, denominator: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01' }, generationTime: 7, views: ['line'], width: '100%', height: '700px', headline: 'Relative growth advantage', lapisDateField: 'date', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numerator', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: numerator, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: denominator, }, }, ], }, }, }"
2266
+ "default": "{ ...Template, args: { numeratorFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', }, denominatorFilter: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01' }, generationTime: 7, views: ['line'], width: '100%', height: '700px', headline: 'Relative growth advantage', lapisDateField: 'date', yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorFilter', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilter, }, }, { matcher: { name: 'denominatorFilter', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
2134
2267
  }
2135
2268
  ],
2136
2269
  "exports": [
@@ -2158,28 +2291,28 @@
2158
2291
  "declarations": [
2159
2292
  {
2160
2293
  "kind": "class",
2161
- "description": "## Context\n\nFor this component, we assume a discrete time model, where new infections happen exactly every `generationTime` days.\nThis is what we call a \"generation\".\n\nThis component estimates the relative growth advantage of a variant by performing a logistic regression.\nBased on the inferred logistic growth rate, we derive the relative growth advantage (per generation).\n\nFor details on the scientific method, see:\nChen, Chaoran, et al. \"Quantification of the spread of SARS-CoV-2 variant B.1.1.7 in Switzerland.\" Epidemics (2021);\ndoi: [10.1016/j.epidem.2021.100480](https://doi.org/10.1016/j.epidem.2021.100480)\n\nThis component fetches aggregated data from LAPIS.\nThen the data is sent to `https://cov-spectrum.org/api/v2/computed/model/chen2021Fitness`\nwhich performs the logistic regression and calculates the relative growth advantage.\n\n## Views\n\n### Line View\n\nThe line view shows the relative growth advantage over time in a line chart.\nThe dots in the plot show the proportions of the focal variant (`numerator`) to the `denominator` variant\nfor every day as observed in the data.\nThe line shows a logistic curve fitted to the data points, including a 95% confidence interval.",
2294
+ "description": "## Context\n\nFor this component, we assume a discrete time model, where new infections happen exactly every `generationTime` days.\nThis is what we call a \"generation\".\n\nThis component estimates the relative growth advantage of a variant (defined by its LAPIS filter) by performing a logistic regression.\nBased on the inferred logistic growth rate, we derive the relative growth advantage (per generation).\n\nFor details on the scientific method, see:\nChen, Chaoran, et al. \"Quantification of the spread of SARS-CoV-2 variant B.1.1.7 in Switzerland.\" Epidemics (2021);\ndoi: [10.1016/j.epidem.2021.100480](https://doi.org/10.1016/j.epidem.2021.100480)\n\nThis component fetches aggregated data from LAPIS.\nThen the data is sent to `https://cov-spectrum.org/api/v2/computed/model/chen2021Fitness`\nwhich performs the logistic regression and calculates the relative growth advantage.\n\n## Views\n\n### Line View\n\nThe line view shows the relative growth advantage over time in a line chart.\nThe dots in the plot show the proportions of the focal variant (defined by the `numeratorFilter`) to the baseline variant (defined by the `denominatorFilter`)\nfor every day as observed in the data.\nThe line shows a logistic curve fitted to the data points, including a 95% confidence interval.",
2162
2295
  "name": "RelativeGrowthAdvantageComponent",
2163
2296
  "members": [
2164
2297
  {
2165
2298
  "kind": "field",
2166
- "name": "numerator",
2299
+ "name": "numeratorFilter",
2167
2300
  "type": {
2168
2301
  "text": "Record<string, string | number | null | boolean>"
2169
2302
  },
2170
2303
  "default": "{}",
2171
- "description": "Required.\n\nThe LAPIS filter for the focal variant.",
2172
- "attribute": "numerator"
2304
+ "description": "Required.\n\nLAPIS filter to select the data of the focal variant.\nIt must be a valid LAPIS filter object.",
2305
+ "attribute": "numeratorFilter"
2173
2306
  },
2174
2307
  {
2175
2308
  "kind": "field",
2176
- "name": "denominator",
2309
+ "name": "denominatorFilter",
2177
2310
  "type": {
2178
2311
  "text": "Record<string, string | number | null | boolean>"
2179
2312
  },
2180
2313
  "default": "{}",
2181
- "description": "Required.\n\nThe LAPIS filter for the variant that the focal variant (`numerator`) should be compared to.",
2182
- "attribute": "denominator"
2314
+ "description": "Required.\n\nLAPIS filter to select the data of the baseline variant.\nIt must be a valid LAPIS filter object.",
2315
+ "attribute": "denominatorFilter"
2183
2316
  },
2184
2317
  {
2185
2318
  "kind": "field",
@@ -2218,7 +2351,7 @@
2218
2351
  "text": "string"
2219
2352
  },
2220
2353
  "default": "'100%'",
2221
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
2354
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2222
2355
  "attribute": "width"
2223
2356
  },
2224
2357
  {
@@ -2228,7 +2361,7 @@
2228
2361
  "text": "string"
2229
2362
  },
2230
2363
  "default": "'700px'",
2231
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
2364
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2232
2365
  "attribute": "height"
2233
2366
  },
2234
2367
  {
@@ -2240,26 +2373,46 @@
2240
2373
  "default": "'date'",
2241
2374
  "description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nThe values will be used on the x-axis of the diagram.\nMust be a field of type `date` in LAPIS.",
2242
2375
  "attribute": "lapisDateField"
2376
+ },
2377
+ {
2378
+ "kind": "field",
2379
+ "name": "yAxisMaxLinear",
2380
+ "type": {
2381
+ "text": "'maxInData' | 'limitTo1' | number"
2382
+ },
2383
+ "default": "1",
2384
+ "description": "The maximum value for the y-axis on all graphs in linear view.\nIf set to a number, the maximum value is set to this number.\nIf set to `maxInData`, the maximum value is set to the maximum value in the data.\nIf set to `limitTo1`, the maximum value is set to `min(1, the maximum value in the data)`.\nIf not set, the maximum value is set to the default value (1).",
2385
+ "attribute": "yAxisMaxLinear"
2386
+ },
2387
+ {
2388
+ "kind": "field",
2389
+ "name": "yAxisMaxLogarithmic",
2390
+ "type": {
2391
+ "text": "'maxInData' | 'limitTo1' | number"
2392
+ },
2393
+ "default": "1",
2394
+ "description": "The maximum value for the y-axis on all graphs in logarithmic view.\nIf set to a number, the maximum value is set to this number.\nIf set to `maxInData`, the maximum value is set to the maximum value in the data.\nIf set to `limitTo1`, the maximum value is set to `min(1, the maximum value in the data)`.\nIf not set, the maximum value is set to the default value (1).",
2395
+ "attribute": "yAxisMaxLogarithmic"
2243
2396
  }
2244
2397
  ],
2245
2398
  "attributes": [
2246
2399
  {
2247
- "name": "numerator",
2400
+ "name": "numeratorFilter",
2248
2401
  "type": {
2249
2402
  "text": "Record<string, string | number | null | boolean>"
2250
2403
  },
2251
2404
  "default": "{}",
2252
- "description": "Required.\n\nThe LAPIS filter for the focal variant.",
2253
- "fieldName": "numerator"
2405
+ "description": "Required.\n\nLAPIS filter to select the data of the focal variant.\nIt must be a valid LAPIS filter object.",
2406
+ "fieldName": "numeratorFilter"
2254
2407
  },
2255
2408
  {
2256
- "name": "denominator",
2409
+ "name": "denominatorFilter",
2257
2410
  "type": {
2258
2411
  "text": "Record<string, string | number | null | boolean>"
2259
2412
  },
2260
2413
  "default": "{}",
2261
- "description": "Required.\n\nThe LAPIS filter for the variant that the focal variant (`numerator`) should be compared to.",
2262
- "fieldName": "denominator"
2414
+ "description": "Required.\n\nLAPIS filter to select the data of the baseline variant.\nIt must be a valid LAPIS filter object.",
2415
+ "fieldName": "denominatorFilter"
2263
2416
  },
2264
2417
  {
2265
2418
  "name": "generationTime",
@@ -2294,7 +2447,7 @@
2294
2447
  "text": "string"
2295
2448
  },
2296
2449
  "default": "'100%'",
2297
- "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
2450
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2298
2451
  "fieldName": "width"
2299
2452
  },
2300
2453
  {
@@ -2303,7 +2456,7 @@
2303
2456
  "text": "string"
2304
2457
  },
2305
2458
  "default": "'700px'",
2306
- "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
2459
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2307
2460
  "fieldName": "height"
2308
2461
  },
2309
2462
  {
@@ -2314,6 +2467,24 @@
2314
2467
  "default": "'date'",
2315
2468
  "description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nThe values will be used on the x-axis of the diagram.\nMust be a field of type `date` in LAPIS.",
2316
2469
  "fieldName": "lapisDateField"
2470
+ },
2471
+ {
2472
+ "name": "yAxisMaxLinear",
2473
+ "type": {
2474
+ "text": "'maxInData' | 'limitTo1' | number"
2475
+ },
2476
+ "default": "1",
2477
+ "description": "The maximum value for the y-axis on all graphs in linear view.\nIf set to a number, the maximum value is set to this number.\nIf set to `maxInData`, the maximum value is set to the maximum value in the data.\nIf set to `limitTo1`, the maximum value is set to `min(1, the maximum value in the data)`.\nIf not set, the maximum value is set to the default value (1).",
2478
+ "fieldName": "yAxisMaxLinear"
2479
+ },
2480
+ {
2481
+ "name": "yAxisMaxLogarithmic",
2482
+ "type": {
2483
+ "text": "'maxInData' | 'limitTo1' | number"
2484
+ },
2485
+ "default": "1",
2486
+ "description": "The maximum value for the y-axis on all graphs in logarithmic view.\nIf set to a number, the maximum value is set to this number.\nIf set to `maxInData`, the maximum value is set to the maximum value in the data.\nIf set to `limitTo1`, the maximum value is set to `min(1, the maximum value in the data)`.\nIf not set, the maximum value is set to the default value (1).",
2487
+ "fieldName": "yAxisMaxLogarithmic"
2317
2488
  }
2318
2489
  ],
2319
2490
  "superclass": {