Conversation
41ef887 to
eb27151
Compare
eb27151 to
a06e612
Compare
c99cb3c to
35acb82
Compare
15771b6 to
74bd68b
Compare
74bd68b to
5ac6dd8
Compare
…en attribute is empty
…d parseConfig functions
There was a problem hiding this comment.
Pull Request Overview
This pull request backports charts functionality from a newer version to make it compatible with Mendix 9.24. The changes include version downgrades, minimum version requirement updates, feature removals, and bug fixes to ensure compatibility with the target Mendix runtime.
Key changes include:
- Version downgrades across all chart packages to align with LTS requirements
- Removal of selection functionality from pie charts to maintain 9.24 compatibility
- Enhanced error handling for chart click events and heatmap interactions
- Improved data parsing and merging logic in custom charts
Reviewed Changes
Copilot reviewed 48 out of 51 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/shared/charts/src/helpers/useEditorStore.ts | Reorders imports and changes data initialization from fallback pattern to JSON.stringify |
| packages/shared/charts/src/components/types.ts | Adds PlotDatum import and extends interface with z property, updates onClick signature |
| packages/shared/charts/src/components/ChartView.tsx | Adds try-catch error handling for chart click events with fallback behavior |
| packages/shared/charts/package.json | Downgrades version from 2.2.0 to 2.1.1 |
| packages/pluggableWidgets/pie-doughnut-chart-web/src/hooks/data.ts | Removes seriesItemSelection functionality from pie chart data hooks |
| packages/pluggableWidgets/pie-doughnut-chart-web/src/PieChart.xml | Removes seriesItemSelection property configuration from XML schema |
| packages/pluggableWidgets/pie-doughnut-chart-web/src/PieChart.tsx | Removes seriesItemSelection parameter from component props |
| packages/pluggableWidgets/heatmap-chart-web/src/hooks/data.ts | Adds comprehensive click handling with object mapping and data lookup for heatmaps |
| packages/pluggableWidgets/heatmap-chart-web/src/HeatMap.xml | Adds dataSource attribute to onClickAction property |
| packages/pluggableWidgets/custom-chart-web/src/utils/utils.ts | Refactors parsing functions and adds mergeChartProps utility with improved error handling |
| packages/pluggableWidgets/custom-chart-web/src/controllers/ChartPropsController.ts | Simplifies chart props merging logic and fixes event data attribute handling |
| packages/pluggableWidgets/custom-chart-web/src/hooks/useCustomChart.ts | Removes event data attribute useEffect handler |
| Multiple package.json and CHANGELOG.md files | Consistent version downgrades and minimum Mendix version updates across all chart widgets |
| Multiple package.xml files | Updates widget version numbers to match package.json changes |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| layout: pprint(fallback("")), | ||
| config: pprint(fallback("")), | ||
| data: data.map(trace => pprint(fallback(trace.name))) | ||
| data: data.map(trace => pprint(JSON.stringify(trace))) |
There was a problem hiding this comment.
The data mapping logic has changed from using fallback(trace.name) to JSON.stringify(trace). This could break functionality if the trace object contains circular references or non-serializable data, and loses the fallback behavior for trace names. Consider preserving the original fallback logic or adding proper error handling for JSON.stringify.
| data: data.map(trace => pprint(JSON.stringify(trace))) | |
| data: data.map(trace => pprint(fallback(trace.name))) |
| const item = dataSourceItems[itemIndex]; | ||
| onClick?.(item); | ||
| } catch (_e: any) { | ||
| // let the chart handle it's own onClick |
There was a problem hiding this comment.
Grammatical error in comment: 'it's' should be 'its' (possessive form, not contraction).
| // let the chart handle it's own onClick | |
| // let the chart handle its own onClick |
| (item: ObjectItem, data: PlotDatum) => { | ||
| let selectedObjectItem: ObjectItem | undefined = item; | ||
| if (selectedObjectItem === null || selectedObjectItem === undefined) { | ||
| const selectedLocalHeatmapData = heatmapChartData.values().find(heatMapPointData => { |
There was a problem hiding this comment.
Calling .values() on an array is incorrect. Arrays don't have a .values() method that returns an array to chain .find() on. This should be just heatmapChartData.find() since heatmapChartData is already an array.
| const selectedLocalHeatmapData = heatmapChartData.values().find(heatMapPointData => { | |
| const selectedLocalHeatmapData = heatmapChartData.find(heatMapPointData => { |
|
|
||
| ## [6.1.0] - 2025-06-04 | ||
|
|
||
| ## # Breaking |
There was a problem hiding this comment.
Invalid markdown header format. Should be ### Breaking or ## Breaking instead of ## # Breaking.
| ## # Breaking | |
| ### Breaking |
54a9760 to
d57a32e
Compare
Pull request type
Description