Skip to content

Commit 1dfbb3f

Browse files
authored
Plotting Improvements (#1899)
- ChartBuilderModal, ChartFieldOption, ChartFieldAggregateOptions: store state as ChartConfig - Add ChartSettingsPanel: renders chart options as left column - Add Title/Subtitle options - Add height/width options
1 parent 0992b31 commit 1dfbb3f

24 files changed

+1317
-1297
lines changed

packages/components/justfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[private]
66
default:
7-
just --list
7+
@just --list
88

99
currentBranch := `git branch --show-current`
1010
branchAsTag := replace(currentBranch, '_', '-')
@@ -129,5 +129,8 @@ patch:
129129
publish:
130130
npm publish
131131

132+
# Runs publish sleep bump
132133
pb: publish sleep bump
134+
135+
# Runs publish sleep bumpApps
133136
pba: publish sleep bumpApps

packages/components/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@labkey/components",
3-
"version": "7.0.0",
3+
"version": "7.1.0",
44
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
55
"sideEffects": false,
66
"files": [

packages/components/releaseNotes/components.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# @labkey/components
22
Components, models, actions, and utility functions for LabKey applications and pages
33

4+
### version 7.1.0
5+
*Released*: 3 December 2025
6+
- ChartBuilderModal
7+
- Update to two-column layout
8+
- Add options for axis labels
9+
- Add options for title / subtitle
10+
- Add options for height / width
11+
412
### version 7.0.0
513
*Released*: 1 December 2025
614
- Updates for new Workflow implementation

packages/components/src/internal/Checkbox.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export const CheckboxLK: FC<Props> = memo(props => {
1919
<label>
2020
<input
2121
checked={checked}
22-
className=""
2322
disabled={disabled}
2423
id={id}
2524
name={name}
@@ -30,6 +29,6 @@ export const CheckboxLK: FC<Props> = memo(props => {
3029
{children}
3130
</label>
3231
</div>
33-
)
32+
);
3433
});
3534
CheckboxLK.displayName = 'Checkbox';

packages/components/src/internal/components/chart/Chart.tsx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,28 @@ interface Dimensions {
5959
width: number;
6060
}
6161

62-
const MAX_HEIGHT = 500;
62+
const MAX_DEFAULT_HEIGHT = 500;
6363

6464
function computeDimensions(chartConfig: ChartConfig, measureStore, defaultWidth: number): Dimensions {
65-
// Issue 49754: use getChartTypeBasedWidth() to determine width
66-
const width = LABKEY_VIS.GenericChartHelper.getChartTypeBasedWidth(
67-
chartConfig.renderType,
68-
chartConfig.measures,
69-
measureStore,
70-
defaultWidth
71-
);
72-
const dimensions = {
73-
width,
74-
height: (width * 9) / 16, // 16:9 aspect ratio
75-
};
76-
if (dimensions.height > MAX_HEIGHT) dimensions.height = MAX_HEIGHT;
65+
let width = chartConfig.width;
66+
let height = chartConfig.height;
67+
68+
if (width === undefined) {
69+
// Issue 49754: use getChartTypeBasedWidth() to determine width
70+
width = LABKEY_VIS.GenericChartHelper.getChartTypeBasedWidth(
71+
chartConfig.renderType,
72+
chartConfig.measures,
73+
measureStore,
74+
defaultWidth
75+
);
76+
}
77+
78+
if (height === undefined) {
79+
height = (width * 9) / 16; // 16:9 aspect ratio
80+
if (height > MAX_DEFAULT_HEIGHT) height = MAX_DEFAULT_HEIGHT;
81+
}
7782

78-
return dimensions;
83+
return { height, width };
7984
}
8085

8186
interface Props {

0 commit comments

Comments
 (0)