diff --git a/packages/jsActions/mobile-resources-native/package.json b/packages/jsActions/mobile-resources-native/package.json index c003ad8ab..960c8bc25 100644 --- a/packages/jsActions/mobile-resources-native/package.json +++ b/packages/jsActions/mobile-resources-native/package.json @@ -54,4 +54,4 @@ "rimraf": "^4.4.1", "rollup": "^2.79.2" } -} \ No newline at end of file +} diff --git a/packages/pluggableWidgets/pie-doughnut-chart-native/CHANGELOG.md b/packages/pluggableWidgets/pie-doughnut-chart-native/CHANGELOG.md index 2dda05db7..3d04991f3 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-native/CHANGELOG.md +++ b/packages/pluggableWidgets/pie-doughnut-chart-native/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [2.2.0] - 2025-5-16 + +### Changed + +- We added the option to add spacing between slices. + ## [2.1.1] - 2025-3-18 ### Fixed diff --git a/packages/pluggableWidgets/pie-doughnut-chart-native/package.json b/packages/pluggableWidgets/pie-doughnut-chart-native/package.json index 6a660df24..7f781ff9d 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-native/package.json +++ b/packages/pluggableWidgets/pie-doughnut-chart-native/package.json @@ -1,7 +1,7 @@ { "name": "pie-doughnut-chart-native", "widgetName": "PieDoughnutChart", - "version": "2.1.1", + "version": "2.2.0", "license": "Apache-2.0", "copyright": "© Mendix Technology BV 2022. All rights reserved.", "repository": { diff --git a/packages/pluggableWidgets/pie-doughnut-chart-native/src/PieDoughnutChart.tsx b/packages/pluggableWidgets/pie-doughnut-chart-native/src/PieDoughnutChart.tsx index 5ff2243c6..7c17858f5 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-native/src/PieDoughnutChart.tsx +++ b/packages/pluggableWidgets/pie-doughnut-chart-native/src/PieDoughnutChart.tsx @@ -7,7 +7,7 @@ import { ChartStyle, defaultStyle } from "./ui/Styles"; import { useSeries } from "./utils/SeriesLoader"; export function PieDoughnutChart(props: PieDoughnutChartProps): ReactElement | null { - const { series: chartSeries, style, name, sortOrder, ...rest } = props; + const { series: chartSeries, style, name, sortOrder,slicespace, ...rest } = props; const series = useSeries(chartSeries, name); if (!series) { @@ -17,6 +17,7 @@ export function PieDoughnutChart(props: PieDoughnutChartProps): Reac return ( _series.slices) .sort((a, b) => (sortOrder === "ascending" ? a.y - b.y : b.y - a.y))} diff --git a/packages/pluggableWidgets/pie-doughnut-chart-native/src/PieDoughnutChart.xml b/packages/pluggableWidgets/pie-doughnut-chart-native/src/PieDoughnutChart.xml index 731dde6fd..7e988b85c 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-native/src/PieDoughnutChart.xml +++ b/packages/pluggableWidgets/pie-doughnut-chart-native/src/PieDoughnutChart.xml @@ -1,8 +1,5 @@ - + Pie Doughnut Chart Render a series of data in a Pie or Doughnut chart. Charts @@ -12,7 +9,7 @@ Presentation - + Pie Doughnut @@ -29,34 +26,31 @@ Data source Data points for individual series. - + X attribute - + - - - + + + - + Y attribute - + - - - + + + Dynamic styling key Configure which attribute is used as the key that matches with styling defined in Atlas. - - + + - @@ -73,12 +67,16 @@ Show labels - + + + + Space between slices + - - + + diff --git a/packages/pluggableWidgets/pie-doughnut-chart-native/src/components/PieDoughnutChart.tsx b/packages/pluggableWidgets/pie-doughnut-chart-native/src/components/PieDoughnutChart.tsx index c563f7434..a25dad6b3 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-native/src/components/PieDoughnutChart.tsx +++ b/packages/pluggableWidgets/pie-doughnut-chart-native/src/components/PieDoughnutChart.tsx @@ -16,6 +16,7 @@ export interface ChartProps { style: ChartStyle; presentation: string; showLabels: boolean; + slicespace: number; } export type DataPoints = Array>; @@ -26,7 +27,7 @@ export interface Slice { stylingKey: Option; } -export function PieDoughnutChart({ name, presentation, series, style, showLabels }: ChartProps): ReactElement | null { +export function PieDoughnutChart({ name, presentation, series, style, showLabels,slicespace }: ChartProps): ReactElement | null { // due to the nature of the chart type, we only reply on the width, as the chart is always a square const [chartDimensions, setChartDimensions] = useState<{ width?: number }>(); // Chart user-styling may be missing for certain slices. A palette is passed, any missing colours @@ -94,6 +95,7 @@ export function PieDoughnutChart({ name, presentation, series, style, showLabels : undefined } colorScale={normalizedSliceColors} + padAngle={slicespace} /> ) : null} diff --git a/packages/pluggableWidgets/pie-doughnut-chart-native/typings/PieDoughnutChartProps.d.ts b/packages/pluggableWidgets/pie-doughnut-chart-native/typings/PieDoughnutChartProps.d.ts index d01cf0145..0f6b4a0e8 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-native/typings/PieDoughnutChartProps.d.ts +++ b/packages/pluggableWidgets/pie-doughnut-chart-native/typings/PieDoughnutChartProps.d.ts @@ -32,6 +32,7 @@ export interface PieDoughnutChartProps