Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/area-chart-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the underlying charting library (Plotly.js) to version 4, which includes security fixes. Chart text colors on filled areas may be chosen slightly differently to improve contrast.

## [6.4.0] - 2026-10-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/area-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.5.1",
"plotly.js-dist-min": "^3.0.0"
"plotly.js-dist-min": "^4.2.0"
},
"devDependencies": {
"@happy-dom/jest-environment": "^19.0.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/bar-chart-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the underlying charting library (Plotly.js) to version 4, which includes security fixes. Chart text colors on filled areas may be chosen slightly differently to improve contrast.

## [6.4.0] - 2026-10-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/bar-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.5.1",
"plotly.js-dist-min": "^3.0.0"
"plotly.js-dist-min": "^4.2.0"
},
"devDependencies": {
"@happy-dom/jest-environment": "^19.0.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/bubble-chart-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the underlying charting library (Plotly.js) to version 4, which includes security fixes. Chart text colors on filled areas may be chosen slightly differently to improve contrast.

## [6.4.0] - 2026-10-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/bubble-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.5.1",
"plotly.js-dist-min": "^3.0.0"
"plotly.js-dist-min": "^4.2.0"
},
"devDependencies": {
"@happy-dom/jest-environment": "^19.0.2",
Expand Down
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/column-chart-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the underlying charting library (Plotly.js) to version 4, which includes security fixes. Chart text colors on filled areas may be chosen slightly differently to improve contrast.

## [6.4.0] - 2026-10-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/column-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.5.1",
"plotly.js-dist-min": "^3.0.0"
"plotly.js-dist-min": "^4.2.0"
},
"devDependencies": {
"@happy-dom/jest-environment": "^19.0.2",
Expand Down
5 changes: 5 additions & 0 deletions packages/pluggableWidgets/custom-chart-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the underlying charting library (Plotly.js) to version 4, which includes security fixes. Chart text colors on filled areas may be chosen slightly differently to improve contrast.
- Breaking: Plotly.js 4 removed Mapbox map traces (use `scattermap`, `choroplethmap` and `densitymap` instead), changed how color strings are parsed (for example `rgb()` with fractional values and `hsv()` colors are no longer valid), removed the Chart Studio configuration options (`showLink`, `linkText`, `sendData`, `showSources`, `showEditInChartStudio`), and changed the defaults of `layout.geo.fitbounds` and `splom.axis.matches`. Review any custom Plotly JSON in your charts. See the [Plotly.js v4 migration guide](https://plotly.com/javascript/guides/migrating-to-v4/).

## [6.3.2] - 2026-07-27

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/custom-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"classnames": "^2.5.1",
"deepmerge": "^4.3.1",
"mobx-react-lite": "4.0.7",
"plotly.js-dist-min": "^3.0.0"
"plotly.js-dist-min": "^4.2.0"
},
"devDependencies": {
"@happy-dom/jest-environment": "^19.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { computed } from "mobx";
import type { Config, Layout } from "plotly.js-dist-min";

import { EditableChartStore, EditableChartStoreProps } from "@mendix/shared-charts/main";
import { ComputedAtom, DerivedPropsGate, SetupHost } from "@mendix/widget-plugin-mobx-kit/main";
Expand Down Expand Up @@ -32,8 +33,8 @@ function viewModelAtom(store: EditableChartStore, adapter: ChartPropsController)
return computed(() => {
return {
data: toPlotlyData(store.data),
layout: store.layout,
config: store.config,
layout: store.layout as Partial<Layout>,
config: store.config as Partial<Config>,
onClick: adapter.chartOnClick
};
});
Expand Down
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/heatmap-chart-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the underlying charting library (Plotly.js) to version 4, which includes security fixes. Chart text colors on filled areas may be chosen slightly differently to improve contrast.

## [6.4.0] - 2026-10-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/heatmap-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.5.1",
"date-fns": "^2.30.0",
"plotly.js-dist-min": "^3.0.0"
"plotly.js-dist-min": "^4.2.0"
},
"devDependencies": {
"@happy-dom/jest-environment": "^19.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { Annotations } from "plotly.js-dist-min";
import type { Annotation } from "plotly.js-dist-min";

export function createHeatMapAnnotation(
x?: string,
y?: string,
text?: string,
colorValue?: string
): Partial<Annotations> {
): Partial<Annotation> {
return {
xref: "x",
yref: "y",
Expand Down
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/line-chart-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the underlying charting library (Plotly.js) to version 4, which includes security fixes. Chart text colors on filled areas may be chosen slightly differently to improve contrast.

## [6.4.0] - 2026-10-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/line-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.5.1",
"plotly.js-dist-min": "^3.0.0"
"plotly.js-dist-min": "^4.2.0"
},
"devDependencies": {
"@happy-dom/jest-environment": "^19.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the underlying charting library (Plotly.js) to version 4, which includes security fixes. Chart text colors on filled areas may be chosen slightly differently to improve contrast.

## [6.4.0] - 2026-10-28

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.5.1",
"date-fns": "^2.30.0",
"plotly.js-dist-min": "^3.0.0"
"plotly.js-dist-min": "^4.2.0"
},
"devDependencies": {
"@happy-dom/jest-environment": "^19.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- We updated the underlying charting library (Plotly.js) to version 4, which includes security fixes. Chart text colors on filled areas may be chosen slightly differently to improve contrast.

## [6.4.0] - 2026-10-28

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.5.1",
"plotly.js-dist-min": "^3.0.0"
"plotly.js-dist-min": "^4.2.0"
},
"devDependencies": {
"@happy-dom/jest-environment": "^19.0.2",
Expand Down
7 changes: 3 additions & 4 deletions packages/shared/charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"classnames": "^2.5.1",
"deepmerge": "^4.3.1",
"mobx": "6.12.3",
"plotly.js-dist-min": "^3.0.0",
"react-plotly.js": "^2.6.0"
"plotly.js-dist-min": "^4.2.0",
"react-plotly.js": "^4.1.0"
},
"devDependencies": {
"@mendix/eslint-config-web-widgets": "workspace:*",
Expand All @@ -55,9 +55,8 @@
"@rollup/plugin-replace": "^6.0.2",
"@rollup/plugin-terser": "^0.4.4",
"@types/jest": "^30.0.0",
"@types/plotly.js-dist-min": "^2.3.4",
"@types/react-plotly.js": "^2.6.3",
"copy-and-watch": "^0.1.6",
"plotly.js": "^4.2.0",
"rimraf": "^4.4.1",
"rollup": "*",
"rollup-plugin-copy": "^3.5.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/shared/charts/src/hooks/usePlotChartDataSeries.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Big from "big.js";

Check warning on line 1 in packages/shared/charts/src/hooks/usePlotChartDataSeries.ts

View workflow job for this annotation

GitHub Actions / Run code quality check

Using exported name 'Big' as identifier for default export
import {
DynamicValue,
EditableValue,
Expand All @@ -8,7 +8,7 @@
ListValue,
ObjectItem
} from "mendix";
import { Datum, PlotData } from "plotly.js-dist-min";
import { Data, Datum } from "plotly.js-dist-min";
import { useEffect, useState } from "react";
import { executeAction } from "@mendix/widget-plugin-platform/framework/execute-action";
import { ensure } from "@mendix/widget-plugin-platform/utils/ensure";
Expand All @@ -22,10 +22,10 @@
x: Datum[];
y: Datum[];
hovertext: string[] | undefined;
hoverinfo: PlotData["hoverinfo"];
hoverinfo: Extract<Data, { hoverinfo?: unknown }>["hoverinfo"];
dataSourceItems: ObjectItem[];
// We want this optional.
name?: PlotData["name"];
name?: Extract<Data, { name?: unknown }>["name"];
};

interface DataSourceItemGroup {
Expand Down Expand Up @@ -63,7 +63,7 @@
): DynamicValue<T>["value"];
};

export type SeriesMapper<T> = (serie: T, dataPoints: PlotChartDataPoints, helpers: MapperHelpers) => Partial<PlotData>;
export type SeriesMapper<T> = (serie: T, dataPoints: PlotChartDataPoints, helpers: MapperHelpers) => Partial<Data>;

export function usePlotChartDataSeries<T extends PlotDataSeries>(
series: T[],
Expand Down
8 changes: 4 additions & 4 deletions packages/shared/charts/src/utils/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export const getModelerSeriesOptions = (...customSeries: Array<Partial<Data>>):

export interface CustomLayoutProps {
showLegend: Layout["showlegend"];
xAxisLabel: Layout["xaxis"]["title"];
yAxisLabel: Layout["yaxis"]["title"];
xAxisLabel: NonNullable<Layout["xaxis"]>["title"];
yAxisLabel: NonNullable<Layout["yaxis"]>["title"];
gridLinesMode: "horizontal" | "vertical" | "none" | "both";
}

Expand All @@ -69,11 +69,11 @@ export const getCustomLayoutOptions = ({
}: CustomLayoutProps): Partial<Layout> => ({
showlegend: showLegend,
xaxis: {
title: { text: xAxisLabel } as Layout["xaxis"]["title"],
title: { text: xAxisLabel } as NonNullable<Layout["xaxis"]>["title"],
showgrid: gridLinesMode === "both" || gridLinesMode === "vertical"
},
yaxis: {
title: { text: yAxisLabel } as Layout["yaxis"]["title"],
title: { text: yAxisLabel } as NonNullable<Layout["yaxis"]>["title"],
showgrid: gridLinesMode === "both" || gridLinesMode === "horizontal"
}
});
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/charts/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"outDir": "./dist",
"rootDir": "./src",
"jsx": "react-jsx",
"jsxFactory": ""
"jsxFactory": "",
"moduleResolution": "bundler"
},
"references": [{ "path": "./rollup/tsconfig.json" }]
}
Loading
Loading