Skip to content

Commit 3943b59

Browse files
committed
feat(line-chart-native): add design property
- Add chart size design property to easily make chart grids visible inside a scroll container
1 parent 632445c commit 3943b59

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

settings-native.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,23 @@
14121412
]
14131413
}
14141414
],
1415+
"com.mendix.widget.native.linechart.LineChart": [
1416+
{
1417+
"name": "Chart size",
1418+
"type": "Dropdown",
1419+
"description": "Size of the chart.",
1420+
"options": [
1421+
{
1422+
"name": "Square",
1423+
"class": "lineChartSquare"
1424+
},
1425+
{
1426+
"name": "Maximum space",
1427+
"class": "lineChartMaxSpace"
1428+
}
1429+
]
1430+
}
1431+
],
14151432
"com.mendix.widget.native.listviewswipe.ListViewSwipe": [
14161433
{
14171434
"name": "Panel size",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export const lineChartSquare = {
2+
chart: {
3+
aspectRatio: 1
4+
}
5+
};
6+
export const lineChartMaxSpace = {
7+
chart: {
8+
flex: 1,
9+
aspectRatio: undefined
10+
}
11+
};

styles/native/js/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export * from "./core/helpers/images";
3030
export * from "./core/widgets/introscreen";
3131
export * from "./core/widgets/layoutgrid";
3232
export * from "./core/widgets/linechart";
33+
export * from "./core/helpers/linechart";
3334
export * from "./core/widgets/listviews";
3435
export * from "./core/helpers/listviews";
3536
export * from "./core/widgets/listviewswipe";
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export const lineChartSquare = {
2+
chart: {
3+
aspectRatio: 1
4+
}
5+
};
6+
7+
export const lineChartMaxSpace = {
8+
chart: {
9+
flex: 1,
10+
aspectRatio: undefined
11+
}
12+
};

styles/native/ts/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export * from "./core/helpers/images";
3030
export * from "./core/widgets/introscreen";
3131
export * from "./core/widgets/layoutgrid";
3232
export * from "./core/widgets/linechart";
33+
export * from "./core/helpers/linechart";
3334
export * from "./core/widgets/listviews";
3435
export * from "./core/helpers/listviews";
3536
export * from "./core/widgets/listviewswipe";

0 commit comments

Comments
 (0)