Template Repeater for a button -Vision


I would like to create a template button with parameters like name, buttoncolor and other tag path names.
I have a static 4 buttons in a window. whenever i click on a button (say “Speed”), button template will be repeated for tags under speed (Line speed, actual speed, set speed etc). And when i click on line speed, corresponding chart will be displayed.
When i click on another button other than speed (say “Pressure”), buttons created under speed will be vanished and new buttons will be displayed under Pressure.
I wish to add a template repeater , so whenever i click on a button, params will be passed and chart will be displayed.
For eg:

I have added the below script under speed,

event.source.parent.getComponent('Template Repeater').repeatCount =3

repeater = event.source.parent.getComponent('Template Repeater')

templateList = repeater.getLoadedTemplates()

Now, i am stuck up with this. I dont knoe how to move further to accomplish the above functinality.

Your ideas are most welcome.

I like the idea of using an Easy Chart to achieve the functionality you are looking for. With an Easy Chart, the Tag Pen editor allows you to divide your options into selectable groups that can be toggled on and off via checkboxes in one single chart. See the example below:
EZ Chart Setup Example
The preceding setup will render as follows:

Notice how the group boxes to the left of the chart neatly keep the categories separate with their suboptions individually selectable


Thanks for your idea. I am currently looking for a normal chart in which, for eg: i will be clicking on speed, line speed and other speed buttons will be displayed. Once i select start and end date, click on line speed (for eg), chart will be displayed after clicking the load button.

under Speed btn:

btnTemplate =event.source.parent.getComponent('Template Repeater')
btnTemplate.visible = True
#btnTemplate.repeatCount =3
#numtmps =3

check =updParam.getRowCount()
if check == 0:
	newRow =[["Line Speed","actual_machinespeed","set_machinespeed","line_speed_lcl","line_speed_ucl"]]

	updParam = system.dataset.addRows(updParam,newRow)


Under Load btn:

event.source.parent.getComponent('Label').visible = True

event.source.parent.StDate =event.source.parent.getComponent('Group').getComponent('stDate').date
event.source.parent.EndDate =event.source.parent.getComponent('Group').getComponent('endDate').date

event.source.parent.Actual = event.source.parent.ActChart
event.source.parent.Set = event.source.parent.SetChart
event.source.parent.LCL = event.source.parent.LCLChart
event.source.parent.UCL = event.source.parent.UCLChart

chartData =event.source.parent.getComponent('Chart').Data
def checkValue():
	if  chartData!= None:

		event.source.parent.getComponent('Label').visible = False
		event.source.parent.getComponent('Label').visible = True

Now i could get data in Template parameter dataset, but it is not reflecting in the template parameter in the window after the click.

I see you edited this yesterday, so I assume you are still looking for a solution.

Perhaps you can adapt this example for this use case: