Skip to content

Commit caa52d7

Browse files
author
Ahmed Elsayed Mohamed Abdelaaty
committed
fix(column-chart-widget): crash with Mx10
1 parent 452047a commit caa52d7

4 files changed

Lines changed: 13 additions & 9 deletions

File tree

packages/pluggableWidgets/column-chart-native/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+
### Fixed
10+
11+
- We fixed an issue when running with Mx10 crashes the app.
12+
913
## [2.0.1] - 2023-5-17
1014

1115
### Fixed

packages/pluggableWidgets/column-chart-native/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "column-chart-native",
33
"widgetName": "ColumnChart",
4-
"version": "2.0.1",
4+
"version": "2.0.2",
55
"license": "Apache-2.0",
66
"copyright": "© Mendix Technology BV 2022. All rights reserved.",
77
"repository": {
@@ -32,4 +32,4 @@
3232
"detox": "^19.7.1",
3333
"eslint": "^7.20.0"
3434
}
35-
}
35+
}

packages/pluggableWidgets/column-chart-native/src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="ColumnChart" version="2.0.1" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="ColumnChart" version="2.0.2" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="ColumnChart.xml" />
66
</widgetFiles>

packages/pluggableWidgets/column-chart-native/src/utils/SeriesLoader.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ function extractDataPoints(series: ColumnSeriesType, dataSourceItems?: ObjectIte
196196
const dataPointsExtraction: DataPointsExtraction = { dataPoints: [] };
197197

198198
for (const item of dataSourceItems) {
199-
const x = (series.dataSet === "static" ? ensure(series.staticXAttribute) : ensure(series.dynamicXAttribute))(
200-
item
201-
);
202-
const y = (series.dataSet === "static" ? ensure(series.staticYAttribute) : ensure(series.dynamicYAttribute))(
203-
item
204-
);
199+
const x = (
200+
series.dataSet === "static" ? ensure(series.staticXAttribute) : ensure(series.dynamicXAttribute)
201+
).get(item);
202+
const y = (
203+
series.dataSet === "static" ? ensure(series.staticYAttribute) : ensure(series.dynamicYAttribute)
204+
).get(item);
205205

206206
if (!x.value || !y.value) {
207207
return null;

0 commit comments

Comments
 (0)