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: Add dashboard text blocks and Markdown editor #1913

Merged
merged 123 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
7de988b
refactor: Clean up
bprusinowski Nov 25, 2024
2ba43c0
fix: Ids
bprusinowski Nov 26, 2024
e457f61
feat: Set up LayoutBlocksConfigurator skeleton and translations
bprusinowski Nov 26, 2024
7d25094
refactor: Extract AddButton
bprusinowski Nov 26, 2024
5216108
feat: Add an "Add text" button
bprusinowski Nov 26, 2024
6f89752
feat: Only render LayoutBlocksConfigurator for dashboard canvas layout
bprusinowski Nov 26, 2024
ae08935
refactor: createChartId -> createId
bprusinowski Nov 26, 2024
0d94c3c
feat: Add a way to add and remove text blocks
bprusinowski Nov 26, 2024
05aee14
chore: Update translations
bprusinowski Nov 26, 2024
4738068
refactor: Base dashboard rendering on blocks
bprusinowski Nov 28, 2024
bd5a871
chore: Update translations
bprusinowski Dec 11, 2024
6c55e07
feat: AddLayoutBlocks
bprusinowski Dec 11, 2024
5d567d7
chore: Add react-markdown
bprusinowski Dec 11, 2024
9a4e710
feat: Use react-markdown for text blocks
bprusinowski Dec 11, 2024
d54732c
refactor: Rename
bprusinowski Dec 11, 2024
f717de6
feat: Add initial LayoutBlocksSelector
bprusinowski Dec 11, 2024
6583d1e
style: Put ellipsis after second line for main label in ControlTab
bprusinowski Dec 11, 2024
c09502e
feat: Better align block control tabs with the design
bprusinowski Dec 11, 2024
ce1a5b1
feat: Make it possible to remove text blocks + align better with design
bprusinowski Dec 11, 2024
17c7e38
refactor: Extract useOrderedLocales
bprusinowski Dec 12, 2024
02dec5c
feat: Add a way to edit text blocks content
bprusinowski Dec 12, 2024
f33b522
feat: Text blocks can be defined per locale
bprusinowski Dec 12, 2024
7a4a1b2
feat: Make Input multiline
bprusinowski Dec 12, 2024
69873be
feat: Make Title and Description Markdown-compatible
bprusinowski Dec 12, 2024
703b84a
refactor: Consolidate Markdown usage
bprusinowski Dec 12, 2024
7113eab
style: Use white background for ReactGridItems
bprusinowski Dec 12, 2024
6717b0a
chore: Update MUI
bprusinowski Dec 16, 2024
311e3b7
chore: Update TypeScript
bprusinowski Dec 16, 2024
d5df39a
style: Keep vertical padding in textarea
bprusinowski Dec 16, 2024
34621d5
fix: TypeScript errors
bprusinowski Dec 16, 2024
ca72ff3
feat: Improve Markdown text styles
bprusinowski Dec 16, 2024
b9fe6cb
fix: Ignore MUI theme TypeScript errors
bprusinowski Dec 16, 2024
e93bb40
fix: Use allowed fontWeight value
bprusinowski Dec 16, 2024
3771d3e
refactor: Extract to useStyles
bprusinowski Dec 16, 2024
1324cb9
style: Remove border bottom from last child
bprusinowski Dec 16, 2024
5cb3710
style: Remove background
bprusinowski Dec 16, 2024
7bf0126
feat: Open text block editing panel on text click
bprusinowski Dec 16, 2024
b926755
style: Use pointer when makes sense
bprusinowski Dec 16, 2024
d987794
chore: Add Markdown plugins
bprusinowski Dec 16, 2024
0e83f88
feat: Add keydown handler for most popular actions (b, i, u)
bprusinowski Dec 16, 2024
d4495d0
feat: Allow re-doing actions
bprusinowski Dec 16, 2024
68326c1
refactor: Improve types
bprusinowski Dec 16, 2024
c0f848f
chore: Only use one prettier
bprusinowski Dec 16, 2024
75ac7a5
fix: Syntax TypeScript error
bprusinowski Dec 16, 2024
cba2f77
fix: Type issues
bprusinowski Dec 16, 2024
6a50cf1
docs: Update CHANGELOG
bprusinowski Dec 16, 2024
3360e4b
chore: Add pull request template
bprusinowski Dec 16, 2024
049c364
style: Improve styles
bprusinowski Dec 16, 2024
f3324a8
refactor: Apply class name directly in the component
bprusinowski Dec 16, 2024
e70159a
chore: Remove default text initialization
bprusinowski Dec 16, 2024
bfc43ac
feat: Add a way to drag text blocks in free canvas layout
bprusinowski Dec 16, 2024
b0e37e9
chore: Update translations
bprusinowski Dec 16, 2024
a7e454c
refactor: Improve types
bprusinowski Dec 16, 2024
8ccc3a5
feat: Improve ChartGridLayout
bprusinowski Dec 16, 2024
02e7ebd
feat: Add initial auto-sizing text blocks logic
bprusinowski Dec 16, 2024
6078d5c
fix: Types
bprusinowski Dec 16, 2024
091874f
chore: Update ts-jest
bprusinowski Dec 16, 2024
9057252
fix: Mocking Markdown packages in tests
bprusinowski Dec 16, 2024
6068422
fix: Condition
bprusinowski Dec 16, 2024
dfa3285
refactor: Names
bprusinowski Dec 16, 2024
eea0afb
chore: Add translations
bprusinowski Dec 16, 2024
31d77be
chore: Comments
bprusinowski Dec 16, 2024
74abe47
Merge branch 'main' of github.com:visualize-admin/visualization-tool …
bprusinowski Jan 13, 2025
91bd2cc
chore: yarn.lock
bprusinowski Jan 13, 2025
e128dec
chore: Downgrade TS
bprusinowski Jan 13, 2025
bb6a7a5
chore: Remove not needed
bprusinowski Jan 13, 2025
cc8adee
chore: Downgrade MUI
bprusinowski Jan 13, 2025
68a2c83
chore: yarn.lock
bprusinowski Jan 13, 2025
2886ae0
feat: Immediately open new text blocks
bprusinowski Jan 13, 2025
bf159ff
feat: Ensure dashboard layout is correct when changing layout
bprusinowski Jan 14, 2025
161f971
feat: Update ensureDashboardLayoutIsCorrect to be based on blocks
bprusinowski Jan 14, 2025
9dfe9a9
feat: Ensure blocks are in sync with reality
bprusinowski Jan 14, 2025
993c5c7
feat: Disable immer's autoFreeze
bprusinowski Jan 14, 2025
b3ea23b
feat: Improve default cell selection logic
bprusinowski Jan 14, 2025
033b768
fix: Displaying of text blocks in tall dashboard
bprusinowski Jan 14, 2025
4644ad7
Merge branch 'main' of github.com:visualize-admin/visualization-tool …
bprusinowski Jan 14, 2025
ce6803a
feat: Sync text blocks' height across all breakpoints
bprusinowski Jan 14, 2025
31519e0
chore: Add unlisted dependency to package.json
bprusinowski Jan 14, 2025
11822c4
fix: Test
bprusinowski Jan 14, 2025
0b79e6d
feat: Show Objects panel for every dashboard type
bprusinowski Jan 14, 2025
9349d77
feat: Only allow horizontal resizing for text blocks
bprusinowski Jan 14, 2025
7f43c14
refactor: Extract ActionElementsContainer
bprusinowski Jan 14, 2025
f5d4b76
fix: Remove not needed blocks from layouts
bprusinowski Jan 15, 2025
23f847b
feat: Add BlockMoreButton
bprusinowski Jan 15, 2025
9957a8c
fix: Do not open panel when shouldn't
bprusinowski Jan 15, 2025
ca8c945
feat: Add a CTA to empty text blocks
bprusinowski Jan 15, 2025
f720bec
style: Do not let ActionElementsContainer grow
bprusinowski Jan 15, 2025
e340116
fix: Stop event propagation
bprusinowski Jan 15, 2025
491883f
fix: Pass props to Markdown components
bprusinowski Jan 15, 2025
210cbe0
fix: Add missing dependency
bprusinowski Jan 15, 2025
0e99b59
chore: Add @mdxeditor/editor
bprusinowski Jan 16, 2025
5aa34b8
feat: Add basic MarkdownInput
bprusinowski Jan 16, 2025
9cf68c6
style: Improve MarkdownInput margins
bprusinowski Jan 16, 2025
83f36e7
feat: Move label below toolbar
bprusinowski Jan 16, 2025
35f7b56
feat: Add and update icons
bprusinowski Jan 16, 2025
307f266
feat: Add BlockTypeMenu
bprusinowski Jan 16, 2025
511a103
refactor: Extract BlockTypeMenu to mdx-editor folder
bprusinowski Jan 16, 2025
0ee9045
refactor: Extract ToolbarIconButton
bprusinowski Jan 16, 2025
e71c660
feat: Add custom BoldItalicUnderlineToggles
bprusinowski Jan 16, 2025
e4d4035
feat: Add custom ListToggles
bprusinowski Jan 16, 2025
1b0c9e3
fix: Jest mocks
bprusinowski Jan 16, 2025
a3df432
fix: Swapping between text blocks when editing
bprusinowski Jan 16, 2025
44898a8
style: Fix focused input style
bprusinowski Jan 19, 2025
8d3c7fb
feat: Add LinkDialog, linkDialogPlugin and LinkDialogToggle
bprusinowski Jan 20, 2025
fb3caac
feat: Render markdown in field preview
bprusinowski Jan 20, 2025
f3d3bbe
fix: Do not forget about new blocks when switching layouts
bprusinowski Jan 20, 2025
eb7f763
Merge branch 'main' of github.com:visualize-admin/visualization-tool …
bprusinowski Jan 20, 2025
583e980
fix: Typos
bprusinowski Jan 20, 2025
02d078b
refactor: Extract block rendering logic up
bprusinowski Jan 20, 2025
14b82dc
feat: Add initial drag and drop logic for text blocks
bprusinowski Jan 20, 2025
06b1b24
fix: Disable resizing in published mode
bprusinowski Jan 20, 2025
7836738
refactor: Extract TextBlock related logic
bprusinowski Jan 20, 2025
b78e34e
feat: Use MarkdownInput in annotators (title, description, tab label)
bprusinowski Jan 20, 2025
76e8b7d
docs: Update CHANGELOG
bprusinowski Jan 20, 2025
e707928
fix: Adding links in the middle of the text
bprusinowski Jan 20, 2025
5fe1380
chore: Add unlisted dependencies
bprusinowski Jan 21, 2025
ffa9b5d
fix: Use correct import
bprusinowski Jan 21, 2025
247a22a
refactor: Remove unused exports
bprusinowski Jan 21, 2025
faf7cc5
refactor: Rename
bprusinowski Jan 21, 2025
8002e6b
Merge branch 'main' of github.com:visualize-admin/visualization-tool …
bprusinowski Jan 22, 2025
5ebb645
chore: yarn.lock
bprusinowski Jan 22, 2025
ce4b9d0
refactor: Simplify
bprusinowski Jan 22, 2025
0f873ac
chore: Update translation
bprusinowski Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--- Link this pull request to an issue (fixes or closes #issue_number) -->

Closes #

<!--- Describe the changes -->

This PR...

<!--- Test instructions -->

## How to test

1. Go to...

<!--- Reproduction steps, in case of a bug -->

---

- [ ] Add a CHANGELOG entry
bprusinowski marked this conversation as resolved.
Show resolved Hide resolved
18 changes: 12 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ You can also check the
# Unreleased

- Features
- Added a way to add text objects to dashboard layouts
- Added Markdown support in chart titles and descriptions
- Centered x-axis labels
- Added y-axis labels
- Added a new option to the vertical axis on the line chart, allowing users to
Expand Down Expand Up @@ -46,6 +48,9 @@ You can also check the
inputs
- Opening a temporal dimension with timezone in table chart configurator
doesn't crash the application anymore
- Themes fetching is now done by using standard SPARQL iris (starting with
https://), so that it behaves consistently across different SPARQL database
engines
- Styles
- Updated dataset result borders to match the design
- Maintenance
Expand All @@ -62,6 +67,7 @@ You can also check the
- Removed unused dependencies and dead code
- Updated several outdated packages
- Added knip as a new CI task
- Implemented Content Security Policy (CSP)
- Performance
- Introduced sharding to improve performance of basic CI checks (unit tests,
type checks, linting, knip)
Expand Down Expand Up @@ -560,7 +566,7 @@ introduced since v3.0.0 🎉
- Implemented initial version of merging the cubes (not yet exposed through
UI)
- Fixes
- Conslidated behavior of setting initial filters (top-most hierarchy value)
- Consolidated behavior of setting initial filters (top-most hierarchy value)
when filter was not present and multi-filter was removed
- Fixed switching between segmentation dimensions in column charts
- Added UTF-8 formatting to CSV and XLSX files (data download)
Expand All @@ -574,7 +580,7 @@ introduced since v3.0.0 🎉
- We now only fetch hierarchies defined in cube's shape
- Hierarchy names are now correctly retrieved
- Performance
- We no longer fetch shape when initalizing the cube, as we might need to
- We no longer fetch shape when initializing the cube, as we might need to
re-fetch it again if a newer cube is required
- Vastly improved performance of dataset preview by using a new version of
`cube-view-query` library (`View.preview`)
Expand Down Expand Up @@ -1070,7 +1076,7 @@ Note: We will try in the future to better follow semantic versioning.

## [3.7.4] - 2022-05-31

- Do not show "Run SPARQL query" button if SPARL_EDITOR variable not set
- Do not show "Run SPARQL query" button if SPARQL_EDITOR variable not set
- Add link top opendata.swiss when the cube is published there (chart
footnotes + chart preview info panel)
- Repair homepage examples on test
Expand All @@ -1088,7 +1094,7 @@ Note: We will try in the future to better follow semantic versioning.
- Maps: Use neutral map style
- Interactive filters: time brush is more stable
- Tables: Column names contain unit if its there by @ptbrowne in #552
- Tables: Support for monthtly period formatting
- Tables: Support for monthly period formatting
- Tables: Bar chart in cells are fixed
- Navigation: Back button in editor 1st screen brings back to dataset preview
- Add status page link in the footer
Expand All @@ -1105,7 +1111,7 @@ Note: We will try in the future to better follow semantic versioning.
- Only the top 7 nav items are shown in the search nav bar (design alignment), a
button is there to display more
- Added the footer in the search page
- Maps chloropleth are shown under map labels. Maps symbols are shown over most
- Maps choropleth are shown under map labels. Maps symbols are shown over most
map features. When zooming via the buttons, we now have a smooth transition
- Removed chart selection step; selection of a chart type can now be done at any
point when creating a chart (added a new chart selection tabs UI)
Expand Down Expand Up @@ -1246,7 +1252,7 @@ not shown at first but can be added via a menu.
[#265](https://github.com/visualize-admin/visualization-tool/pull/265)
- _beta_ Hierarchical filters are available behind a flag on the "red list"
dataset [#233](https://github.com/visualize-admin/visualization-tool/pull/233)
- 🐛 Links from openswissdata should work correctly
- 🐛 Links from OpenDataSwiss should work correctly
[#303](https://github.com/visualize-admin/visualization-tool/pull/303)
[#314](https://github.com/visualize-admin/visualization-tool/pull/314)

Expand Down
4 changes: 2 additions & 2 deletions app/charts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import {
import { theme } from "@/themes/federal";
import { bfs } from "@/utils/bfs";
import { CHART_CONFIG_VERSION } from "@/utils/chart-config/constants";
import { createChartId } from "@/utils/create-chart-id";
import { createId } from "@/utils/create-id";
import { isMultiHierarchyNode } from "@/utils/hierarchy";
import { unreachableError } from "@/utils/unreachable";

Expand Down Expand Up @@ -374,7 +374,7 @@ export const getInitialConfig = (
activeField: string | undefined;
} => {
return {
key: key ?? createChartId(),
key: key ?? createId(),
version: CHART_CONFIG_VERSION,
meta: meta ?? META,
// Technically, we should scope filters per cube; but as we only set initial
Expand Down
23 changes: 23 additions & 0 deletions app/components/action-elements-container.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Theme } from "@mui/material";
import { makeStyles } from "@mui/styles";
import { ReactNode } from "react";

const useStyles = makeStyles<Theme>((theme) => ({
root: {
display: "flex",
alignItems: "center",
gap: theme.spacing(2),
height: "fit-content",
marginTop: "-0.33rem",
},
}));

export const ActionElementsContainer = ({
children,
}: {
children: ReactNode;
}) => {
const classes = useStyles();

return <div className={classes.root}>{children}</div>;
};
22 changes: 22 additions & 0 deletions app/components/add-button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Button, ButtonProps } from "@mui/material";

import { Icon } from "@/icons";

export const AddButton = (props: ButtonProps) => {
const { sx, ...rest } = props;

return (
<Button
color="primary"
variant="contained"
startIcon={<Icon name="add" />}
sx={{
width: "fit-content",
ml: "0.5rem",
px: 3,
...sx,
}}
{...rest}
/>
);
};
35 changes: 15 additions & 20 deletions app/components/chart-panel-layout-grid.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import clsx from "clsx";
import { fold } from "fp-ts/lib/Either";
import { pipe } from "fp-ts/lib/function";
import { useState } from "react";
import { Layouts } from "react-grid-layout";

import { ChartPanelLayoutTypeProps } from "@/components/chart-panel";
Expand Down Expand Up @@ -33,26 +32,25 @@ const decodeLayouts = (layouts: Layouts) => {
);
};

const ChartPanelLayoutCanvas = (props: ChartPanelLayoutTypeProps) => {
const { chartConfigs } = props;
export const ChartPanelLayoutCanvas = ({
blocks,
renderBlock,
className,
}: ChartPanelLayoutTypeProps) => {
const [state, dispatch] = useConfiguratorState(hasChartConfigs);
const [layouts, setLayouts] = useState<Layouts>(() => {
assert(
state.layout.type === "dashboard" && state.layout.layout === "canvas",
"ChartPanelLayoutGrid should be rendered only for dashboard layout with canvas"
);

return state.layout.layouts;
});

const layout = state.layout;
assert(
layout.type === "dashboard" && layout.layout === "canvas",
"ChartPanelLayoutGrid should be rendered only for dashboard layout with canvas"
);
const handleChangeLayouts = (layouts: Layouts) => {
const layout = state.layout;
assert(
layout.type === "dashboard" && layout.layout === "canvas",
"ChartPanelLayoutGrid should be rendered only for dashboard layout with canvas"
);

const parsedLayouts = decodeLayouts(layouts);

if (!parsedLayouts) {
return;
}
Expand All @@ -64,22 +62,19 @@ const ChartPanelLayoutCanvas = (props: ChartPanelLayoutTypeProps) => {
layouts: parsedLayouts,
},
});
setLayouts(layouts);
};

return (
<ChartGridLayout
key={state.state}
className={clsx(chartPanelLayoutGridClasses.root, props.className)}
layouts={layouts}
className={clsx(chartPanelLayoutGridClasses.root, className)}
layouts={layout.layouts}
resize={state.state === "LAYOUTING"}
draggableHandle={`.${chartPanelLayoutGridClasses.dragHandle}`}
onLayoutChange={(_l, allLayouts) => handleChangeLayouts(allLayouts)}
onLayoutChange={(_, allLayouts) => handleChangeLayouts(allLayouts)}
breakpoints={FREE_CANVAS_BREAKPOINTS}
>
{chartConfigs.map((chartConfig) => props.renderChart(chartConfig))}
{blocks.map(renderBlock)}
</ChartGridLayout>
);
};

export default ChartPanelLayoutCanvas;
62 changes: 26 additions & 36 deletions app/components/chart-panel-layout-tall.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import { Box, useMediaQuery } from "@mui/material";
import { useMemo } from "react";

import { ChartPanelLayoutTypeProps } from "@/components/chart-panel";
import classes from "@/components/chart-panel-layout-tall.module.css";
import { ChartConfig } from "@/config-types";
import { LayoutBlock } from "@/config-types";
import { useTheme } from "@/themes";

type ChartPanelLayoutTallProps = {
chartConfigs: ChartConfig[];
renderChart: (chartConfig: ChartConfig) => JSX.Element;
};

export const ChartPanelLayoutTall = (props: ChartPanelLayoutTallProps) => {
const { chartConfigs, renderChart } = props;
export const ChartPanelLayoutTall = ({
blocks,
renderBlock,
}: ChartPanelLayoutTypeProps) => {
const rows = useMemo(() => {
return getChartPanelLayoutTallRows(chartConfigs, renderChart);
}, [chartConfigs, renderChart]);
return getChartPanelLayoutTallRows({ blocks, renderBlock });
}, [blocks, renderBlock]);

return (
<>
Expand All @@ -24,67 +22,59 @@ export const ChartPanelLayoutTall = (props: ChartPanelLayoutTallProps) => {
</>
);
};
type ChartPanelLayoutTallRowProps = {
row: ChartPanelLayoutTallRow;
};

const ChartPanelLayoutTallRow = (props: ChartPanelLayoutTallRowProps) => {
const { row } = props;
const ChartPanelLayoutTallRow = ({ row }: { row: ChartPanelLayoutTallRow }) => {
const theme = useTheme();
const isMobile = useMediaQuery(theme.breakpoints.down("md"));

switch (row.type) {
case "wide":
return row.renderChart(row.chartConfig);
return row.renderBlock(row.block);
case "narrow":
if (isMobile) {
return <>{row.chartConfigs.map(row.renderChart)}</>;
return <>{row.blocks.map(row.renderBlock)}</>;
}

return (
<Box className={classes.root}>
{row.chartConfigs.map(row.renderChart)}
</Box>
<Box className={classes.root}>{row.blocks.map(row.renderBlock)}</Box>
);
}
};
type ChartPanelLayoutTallRow = {
renderChart: (chartConfig: ChartConfig) => JSX.Element;
renderBlock: (block: LayoutBlock) => JSX.Element;
} & (
| {
type: "wide";
chartConfig: ChartConfig;
block: LayoutBlock;
}
| {
type: "narrow";
chartConfigs: [ChartConfig] | [ChartConfig, ChartConfig];
blocks: [LayoutBlock] | [LayoutBlock, LayoutBlock];
}
);

const getChartPanelLayoutTallRows = (
chartConfigs: ChartConfig[],
renderChart: (chartConfig: ChartConfig) => JSX.Element
): ChartPanelLayoutTallRow[] => {
const getChartPanelLayoutTallRows = ({
blocks,
renderBlock,
}: ChartPanelLayoutTypeProps): ChartPanelLayoutTallRow[] => {
const rows: ChartPanelLayoutTallRow[] = [];

for (let i = 0; i < chartConfigs.length; i += 1) {
for (let i = 0; i < blocks.length; i += 1) {
if (i % 3 === 0) {
rows.push({
type: "wide",
chartConfig: chartConfigs[i],
renderChart,
block: blocks[i],
renderBlock,
});
}

if (i % 3 === 1) {
const currentConfig = chartConfigs[i];
const nextConfig = chartConfigs[i + 1];
const block = blocks[i];
const nextBlock = blocks[i + 1];
rows.push({
type: "narrow",
chartConfigs: nextConfig
? [currentConfig, nextConfig]
: [currentConfig],
renderChart,
blocks: nextBlock ? [block, nextBlock] : [block],
renderBlock,
});
}
}
Expand Down
8 changes: 5 additions & 3 deletions app/components/chart-panel-layout-vertical.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { ChartPanelLayoutTypeProps } from "@/components/chart-panel";

export const ChartPanelLayoutVertical = (props: ChartPanelLayoutTypeProps) => {
const { chartConfigs, renderChart } = props;
return <>{chartConfigs.map(renderChart)}</>;
export const ChartPanelLayoutVertical = ({
blocks,
renderBlock,
}: ChartPanelLayoutTypeProps) => {
return <>{blocks.map(renderBlock)}</>;
};
Loading
Loading