Skip to content

Commit a06e612

Browse files
committed
chore: backport to 9.24
1 parent 909ca12 commit a06e612

File tree

7 files changed

+11
-23
lines changed

7 files changed

+11
-23
lines changed

packages/pluggableWidgets/charts-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"packagePath": "com.mendix.widget.web",
3030
"marketplace": {
31-
"minimumMXVersion": "9.6.0.27784",
31+
"minimumMXVersion": "9.24.0.2965",
3232
"appNumber": 105695,
3333
"appName": "Charts",
3434
"reactReady": true

packages/pluggableWidgets/pie-doughnut-chart-web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Breaking
10+
11+
- We remove listened to selection in order for charts to works on Studio Pro 9.24.
12+
913
## [6.0.0] - 2025-02-28
1014

1115
### Changed

packages/pluggableWidgets/pie-doughnut-chart-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"packagePath": "com.mendix.widget.web",
2020
"marketplace": {
21-
"minimumMXVersion": "9.6.0",
21+
"minimumMXVersion": "9.24.0",
2222
"appName": "Pie Chart"
2323
},
2424
"testProject": {

packages/pluggableWidgets/pie-doughnut-chart-web/src/PieChart.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ export function PieChart(props: PieChartContainerProps): ReactElement | null {
3939
seriesSortOrder: props.seriesSortOrder,
4040
seriesValueAttribute: props.seriesValueAttribute,
4141
onClickAction: props.onClickAction,
42-
tooltipHoverText: props.tooltipHoverText,
43-
seriesItemSelection: props.seriesItemSelection
42+
tooltipHoverText: props.tooltipHoverText
4443
});
4544

46-
const isPieClickable = props.seriesItemSelection?.type === "Single" || props.onClickAction;
45+
const isPieClickable = props.onClickAction;
4746

4847
return (
4948
<ChartWidget

packages/pluggableWidgets/pie-doughnut-chart-web/src/PieChart.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@
5151
<description />
5252
<returnType type="String" />
5353
</property>
54-
<property key="seriesItemSelection" type="selection" dataSource="seriesDataSource">
55-
<caption>Selection type</caption>
56-
<description />
57-
<selectionTypes>
58-
<selectionType name="None" />
59-
<selectionType name="Single" />
60-
</selectionTypes>
61-
</property>
6254
</propertyGroup>
6355
<propertyGroup caption="General">
6456
<property key="enableAdvancedOptions" type="boolean" defaultValue="false">

packages/pluggableWidgets/pie-doughnut-chart-web/src/hooks/data.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type PieChartDataSeriesHooks = Pick<
1818
| "seriesSortOrder"
1919
| "seriesValueAttribute"
2020
| "tooltipHoverText"
21-
| "seriesItemSelection"
2221
>;
2322

2423
type LocalPieChartData = {
@@ -39,8 +38,7 @@ export const usePieChartDataSeries = ({
3938
seriesSortOrder,
4039
seriesValueAttribute,
4140
onClickAction,
42-
tooltipHoverText,
43-
seriesItemSelection
41+
tooltipHoverText
4442
}: PieChartDataSeriesHooks): ChartWidgetProps["data"] => {
4543
const [pieChartData, setPieChartData] = useState<LocalPieChartData[]>([]);
4644

@@ -76,11 +74,8 @@ export const usePieChartDataSeries = ({
7674
const onClick = useCallback(
7775
(item: ObjectItem) => {
7876
executeAction(onClickAction?.get(item));
79-
if (seriesItemSelection && seriesItemSelection.type === "Single") {
80-
seriesItemSelection.setSelection(item);
81-
}
8277
},
83-
[onClickAction, seriesItemSelection]
78+
[onClickAction]
8479
);
8580

8681
return useMemo<ChartWidgetProps["data"]>(

packages/pluggableWidgets/pie-doughnut-chart-web/typings/PieChartProps.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @author Mendix Widgets Framework Team
55
*/
66
import { ComponentType, CSSProperties, ReactNode } from "react";
7-
import { ListValue, ListActionValue, ListAttributeValue, ListExpressionValue, SelectionSingleValue } from "mendix";
7+
import { ListValue, ListActionValue, ListAttributeValue, ListExpressionValue } from "mendix";
88
import { Big } from "big.js";
99

1010
export type SeriesSortOrderEnum = "asc" | "desc";
@@ -24,7 +24,6 @@ export interface PieChartContainerProps {
2424
seriesSortAttribute?: ListAttributeValue<string | boolean | Date | Big>;
2525
seriesSortOrder: SeriesSortOrderEnum;
2626
seriesColorAttribute?: ListExpressionValue<string>;
27-
seriesItemSelection?: SelectionSingleValue;
2827
enableAdvancedOptions: boolean;
2928
showPlaygroundSlot: boolean;
3029
playground?: ReactNode;
@@ -59,7 +58,6 @@ export interface PieChartPreviewProps {
5958
seriesSortAttribute: string;
6059
seriesSortOrder: SeriesSortOrderEnum;
6160
seriesColorAttribute: string;
62-
seriesItemSelection: "None" | "Single";
6361
enableAdvancedOptions: boolean;
6462
showPlaygroundSlot: boolean;
6563
playground: { widgetCount: number; renderer: ComponentType<{ children: ReactNode; caption?: string }> };

0 commit comments

Comments
 (0)