Skip to content

Inheritance for displays do not work with a depth of 2 #781

@tnguyenh

Description

@tnguyenh

Describe the bug
Using inheritance for displays (eg charts), elements at depth 2 or more are not shown.

To Reproduce
Use the following code:

model test

global{
	
	list<int> values <- [4,1,7,3,12,1,1,5,3];
}

experiment e1 type:gui virtual: true{
	output{
		display infos type: 2d virtual: true{
			chart name: "Chart" type: series{
				data "data" value: values;
			} 
		}
	}
}

experiment e2 type:gui parent: e1 virtual: true{
	output{
		display infos2 parent: infos virtual: true{
//			chart name: "Chart2" type: series{
//				data "data" value: values color: #green;
//			} 
		}
	}
}


experiment e3 type:gui parent: e2{
	output{
		display infos3 parent: infos virtual: false {}
	}
}

experiment e3b type:gui parent: e2{
	output{
		display infos3 parent: infos2 virtual: false {}
	}
	
}

In experiment e3, the display inheritated from e1 is displayed correctly.

In e3b, the display inherits from e2, which inherits from e1. Nothing is displayed.

Uncommenting lines in e2 illustrates that elements from e2 can be displayed.

Expected behavior
I would expect that all elements in e1 and e2 are displayed.

Desktop (please complete the following information):

  • OS: Win 10
  • GAMA version: Gamma 2025.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    About ChartsThis issue concerns the display of charts😱 BugThe issue reveals a bug in GAMA

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions