Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
19151d1
fix: fixed Add Metrics to Tree Chart (#29158)
SBIN2010 Oct 22, 2024
35aaeb6
fix: clear modal after CSS templates is added
SBIN2010 Oct 22, 2024
db3afda
Revert "fix: clear modal after CSS templates is added"
SBIN2010 Oct 23, 2024
9eea2e6
fix: tree metrics exclude validator
SBIN2010 Nov 25, 2024
3930c95
Merge branch 'apache:master' into master
SBIN2010 Mar 11, 2025
b355212
Merge branch 'apache:master' into master
SBIN2010 Mar 18, 2025
7200d6c
Merge branch 'apache:master' into master
SBIN2010 Mar 20, 2025
3049a3d
Merge branch 'apache:master' into master
SBIN2010 Mar 25, 2025
247aef8
Merge branch 'apache:master' into master
SBIN2010 Apr 2, 2025
b4678ec
Merge branch 'apache:master' into master
SBIN2010 Apr 4, 2025
0ae844d
Merge branch 'apache:master' into master
SBIN2010 Jul 1, 2025
49fc529
Merge branch 'apache:master' into master
SBIN2010 Jul 10, 2025
601dde2
fix: revert #30679
SBIN2010 Mar 25, 2025
66823a5
Merge branch 'apache:master' into master
SBIN2010 Jul 12, 2025
4f59629
Merge branch 'apache:master' into master
SBIN2010 Jul 16, 2025
a7ce4e9
Merge branch 'apache:master' into master
SBIN2010 Jul 20, 2025
1bf4fdd
fix
SBIN2010 Jul 20, 2025
1241867
Merge branch 'apache:master' into master
SBIN2010 Jul 31, 2025
045cf6b
Merge branch 'apache:master' into master
SBIN2010 Aug 2, 2025
acdba8a
Merge branch 'apache:master' into master
SBIN2010 Aug 10, 2025
4fb89c2
Merge branch 'apache:master' into master
SBIN2010 Aug 15, 2025
f47d28b
Merge branch 'apache:master' into master
SBIN2010 Aug 18, 2025
3bdf337
Merge branch 'apache:master' into master
SBIN2010 Aug 19, 2025
780a5d6
Merge branch 'apache:master' into master
SBIN2010 Aug 24, 2025
3c339df
Merge branch 'apache:master' into master
SBIN2010 Aug 25, 2025
798b7a6
Merge branch 'apache:master' into master
SBIN2010 Aug 30, 2025
2db564e
Merge branch 'apache:master' into master
SBIN2010 Sep 3, 2025
a58cfad
Merge branch 'apache:master' into master
SBIN2010 Sep 5, 2025
347e579
fix: add legend margin to MixedTimeseries chart
SBIN2010 Sep 5, 2025
32c8ebb
fix: add test
SBIN2010 Sep 5, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default function transformProps(
theme,
inContextMenu,
emitCrossFilters,
legendState,
} = chartProps;

let focusedSeries: string | null = null;
Expand Down Expand Up @@ -157,6 +158,7 @@ export default function transformProps(
timeShiftColor,
contributionMode,
legendOrientation,
legendMargin,
legendType,
legendSort,
logAxis,
Expand Down Expand Up @@ -553,7 +555,7 @@ export default function transformProps(
legendOrientation,
addYAxisTitleOffset,
zoomable,
null,
legendMargin,
addXAxisTitleOffset,
yAxisTitlePosition,
convertInteger(yAxisTitleMargin),
Expand Down Expand Up @@ -716,6 +718,8 @@ export default function transformProps(
showLegend,
theme,
zoomable,
legendState,
chartPadding,
),
// @ts-ignore
data: series
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,66 @@ describe('legend sorting', () => {
]);
});
});

it('legend margin: top orientation sets grid.top correctly', () => {
const chartPropsConfigWithoutIdentifiers = {
...chartPropsConfig,
formData: {
...formData,
legendMargin: 250,
showLegend: true,
},
};
const chartProps = new ChartProps(chartPropsConfigWithoutIdentifiers);
const transformed = transformProps(chartProps as EchartsMixedTimeseriesProps);

expect((transformed.echartOptions.grid as any).top).toEqual(270);
});

it('legend margin: bottom orientation sets grid.bottom correctly', () => {
const chartPropsConfigWithoutIdentifiers = {
...chartPropsConfig,
formData: {
...formData,
legendMargin: 250,
showLegend: true,
legendOrientation: LegendOrientation.Bottom,
},
};
const chartProps = new ChartProps(chartPropsConfigWithoutIdentifiers);
const transformed = transformProps(chartProps as EchartsMixedTimeseriesProps);

expect((transformed.echartOptions.grid as any).bottom).toEqual(270);
});

it('legend margin: left orientation sets grid.left correctly', () => {
const chartPropsConfigWithoutIdentifiers = {
...chartPropsConfig,
formData: {
...formData,
legendMargin: 250,
showLegend: true,
legendOrientation: LegendOrientation.Left,
},
};
const chartProps = new ChartProps(chartPropsConfigWithoutIdentifiers);
const transformed = transformProps(chartProps as EchartsMixedTimeseriesProps);

expect((transformed.echartOptions.grid as any).left).toEqual(270);
});

it('legend margin: right orientation sets grid.right correctly', () => {
const chartPropsConfigWithoutIdentifiers = {
...chartPropsConfig,
formData: {
...formData,
legendMargin: 270,
showLegend: true,
legendOrientation: LegendOrientation.Right,
},
};
const chartProps = new ChartProps(chartPropsConfigWithoutIdentifiers);
const transformed = transformProps(chartProps as EchartsMixedTimeseriesProps);

expect((transformed.echartOptions.grid as any).right).toEqual(270);
});
Loading