Skip to content

Commit 0c6e0a5

Browse files
github-actions[bot]piotrklubabenflexcompute
authored
[HOTFIX] Fix a bug where a geometry is specified as a background of Chart2D (#1413) (#1414)
* Fix recursion issue (#1410) * bump version to 25.6.7 * fix bug with geometry in the background * formatter changes --------- Co-authored-by: piotrkluba <piotr.kluba@flexcompute.com> Co-authored-by: Ben <ben@flexcompute.com>
1 parent 5af89ef commit 0c6e0a5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

flow360/plugins/report/report_items.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,14 +1617,22 @@ def _load_data(self, cases):
16171617
def _get_background_chart(self, x_data):
16181618
if self.background == "geometry":
16191619
dimension = np.amax(x_data[0]) - np.amin(x_data[0])
1620-
if self.x == "x_slicing_force_distribution/X":
1620+
if isinstance(self.x, (DataItem, Delta)):
1621+
x_path = self.x.data
1622+
else:
1623+
x_path = self.x
1624+
1625+
if x_path.startswith("results/"):
1626+
x_path = x_path[len("results/") :]
1627+
1628+
if x_path == "x_slicing_force_distribution/X":
16211629
log.warning(
16221630
"First case is used as a background image with dimensions matched to the extent of X data"
16231631
)
16241632
camera = Camera(
16251633
position=(0, -1, 0), up=(0, 0, 1), dimension=dimension, dimension_dir="width"
16261634
)
1627-
elif self.x == "y_slicing_force_distribution/Y":
1635+
elif x_path == "y_slicing_force_distribution/Y":
16281636
log.warning(
16291637
"First case is used as a background image with dimensions matched to the extent of X data"
16301638
)

0 commit comments

Comments
 (0)