Skip to content

Commit

Permalink
Merge pull request #1173 from visualize-admin/fix/table-docs
Browse files Browse the repository at this point in the history
fix: Table docs
  • Loading branch information
bprusinowski authored Sep 12, 2023
2 parents 615675d + 6570c8f commit 5987542
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ You can also check the [release page](https://github.com/visualize-admin/visuali

## Unreleased

Nothing yet.
- Fixes
- Table docs now work correctly again

# [3.22.5] - 2023-09-12

Expand Down
39 changes: 21 additions & 18 deletions app/docs/data-table.docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,34 @@ import {
tableObservations,
} from "@/docs/fixtures";
import { DimensionMetadataFragment } from "@/graphql/query-hooks";
import { InteractiveFiltersProvider } from "@/stores/interactive-filters";

export const Docs = () => markdown`
## Data Table
${(
<ReactSpecimen span={6}>
<TableChart
observations={tableObservations}
dimensions={tableDimensions as DimensionMetadataFragment[]}
dimensionsByIri={keyBy(
tableDimensions as DimensionMetadataFragment[],
(d) => d.iri
)}
measures={tableMeasures as DimensionMetadataFragment[]}
measuresByIri={keyBy(
tableMeasures as DimensionMetadataFragment[],
(d) => d.iri
)}
chartConfig={tableConfig}
>
<ChartContainer>
<Table></Table>
</ChartContainer>
</TableChart>
<InteractiveFiltersProvider>
<TableChart
observations={tableObservations}
dimensions={tableDimensions as DimensionMetadataFragment[]}
dimensionsByIri={keyBy(
tableDimensions as DimensionMetadataFragment[],
(d) => d.iri
)}
measures={tableMeasures as DimensionMetadataFragment[]}
measuresByIri={keyBy(
tableMeasures as DimensionMetadataFragment[],
(d) => d.iri
)}
chartConfig={tableConfig}
>
<ChartContainer>
<Table />
</ChartContainer>
</TableChart>
</InteractiveFiltersProvider>
</ReactSpecimen>
)}
`;
Expand Down

1 comment on commit 5987542

@vercel
Copy link

@vercel vercel bot commented on 5987542 Sep 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

visualization-tool – ./

visualization-tool-ixt1.vercel.app
visualization-tool-alpha.vercel.app
visualization-tool-git-main-ixt1.vercel.app

Please sign in to comment.