Skip to content

Commit 16ed836

Browse files
committed
Chart component: accept numerical values passed as strings in pie
charts.
1 parent 8a3d51f commit 16ed836

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- The same SQLPage application can now have both publicly accessible and private pages accessible to users authenticated with SSO.
1818
- This allows easily creating a "log in page" that redirects to the OIDC provider.
1919
- See the [configuration](./configuration.md) for `oidc_protected_paths`
20+
- Chart component: accept numerical values passed as strings in pie charts.
2021

2122
## v0.35.2
2223
- Fix a bug with zero values being displayed with a non-zero height in stacked bar charts.

sqlpage/apexcharts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ sqlpage_chart = (() => {
129129
series.length > 0 && typeof series[0].data[0].x === "string";
130130
if (data.type === "pie") {
131131
labels = data.points.map(([name, x, y]) => x || name);
132-
series = data.points.map(([name, x, y]) => y);
132+
series = data.points.map(([name, x, y]) => Number.parseFloat(y));
133133
} else if (categories && data.type === "bar" && series.length > 1)
134134
series = align_categories(series);
135135

0 commit comments

Comments
 (0)