Skip to content

Commit

Permalink
Fix data cards and radius issue with charts in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafasaifee42 committed Nov 26, 2024
1 parent 2ef1894 commit 94b835a
Show file tree
Hide file tree
Showing 8 changed files with 329 additions and 214 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@undp-data/undp-visualization-library",
"version": "1.0.11",
"version": "1.0.12",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"browser": "./dist/index.umd.js",
Expand Down
2 changes: 2 additions & 0 deletions src/Components/Dashboard/GraphEl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2525,6 +2525,8 @@ function GraphEl(props: Props) {
cardBackgroundColor: settings?.cardBackgroundColor,
cardFilters: settings?.cardFilters,
cardSortingOptions: settings?.cardSortingOptions,
cardSearchColumns: settings?.cardSearchColumns,

Check failure on line 2528 in src/Components/Dashboard/GraphEl.tsx

View workflow job for this annotation

GitHub Actions / publish

Property 'cardSearchColumns' does not exist on type 'GraphSettingsDataType'.
cardMinWidth: settings?.cardMinWidth,

Check failure on line 2529 in src/Components/Dashboard/GraphEl.tsx

View workflow job for this annotation

GitHub Actions / publish

Property 'cardMinWidth' does not exist on type 'GraphSettingsDataType'.
};
default:
return {};
Expand Down
5 changes: 4 additions & 1 deletion src/Components/Dashboard/MultiGraphDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,10 @@ export function MultiGraphDashboard(props: Props) {
...el.settings,
width: undefined,
height: undefined,
radius: undefined,
radius:
el.graphType === 'donutChart'
? undefined
: el.settings?.radius,
size:
el.graphType === 'unitChart'
? el.settings.size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ export function MultiGraphDashboardWideToLongFormat(props: Props) {
...el.settings,
width: undefined,
height: undefined,
radius: undefined,
radius:
el.graphType === 'donutChart'
? undefined
: el.settings?.radius,
size:
el.graphType === 'unitChart'
? el.settings.size
Expand Down
Loading

0 comments on commit 94b835a

Please sign in to comment.