I'm thinking you should be binding the dataSources
property to your dropdown value
instead.
It makes things easier to follow, as populating it with a script is "invisible" when looking at the chart component, and figuring out where the data comes from can be a pain.
self.parent.parent.getChild("cntr_DowntimeReasons").getChild("DowntimeReasonsChart").props.dataSources.example= None
->
self.parent.parent.getChild("cntr_DowntimeReasons").getChild("DowntimeReasonsChart").props.dataSources = {}
And it should show you this:
edit:
I'm not sure what the dropdown role is as I don't see any of the self, previousValue, currentValue, origin, missedEvents
parameters in your script... But, binding dataSources
to dropdown.props.value
instead of using a value change script and adding a transform, you could do something like this:
ds_down = system.optebiz.getdowntimeDataSetNew(vDataPoints,vWhereClause,vGroupBy,vOrderBy,vNoofRows,vNoofRowsOf,vLineAutoId,vProcessAutoId,vEquipAutoId,str(vStartDate),str(vEndDate),vArea,vDataSource,vUser)
headerChart = ['Process', 'down Time']
rowsProcess = []
if ds_down:
for row in range(ds_Down.rowCount):
vProcess = ds_Down.getValueAt(row,'Description')
vDownTime = round(ds_Down.getValueAt(row,'TotalDowntimeM'),2)
rowsProcess.append([vProcess,vDownTime])
return {
'data': system.dataset.toDataSet(headerChart, rowsProcess)
}