## Delivery time
o = OLAP()
o.name = 'Movement'  
o.maxLen = 1000 
o.queryType = 'measurement_id' 
o.queryId = meas.id 
o.fields = ['capturetime','numeric', 'measurement_id', 'inspection_id', 'frame_id']
o.since = None
o.before = None
o.customFilter = {} 
o.statsInfo = []
o.save()

c = Chart()
c.name = 'Movement'
c.olap = o.name
c.style = 'spline'
c.minval = 0
c.maxval = None
c.xtype = 'datetime'
c.colormap = {}
c.labelmap = {}
c.accumulate = False
c.renderorder = 1
c.halfsize = False
c.realtime = True
c.dataMap = ['capturetime','numeric']
c.metaMap = ['measurement_id', 'inspection_id', 'frame_id']
c.save()

Example #2
0
o1 = OLAP()
o1.name = 'Motion'  
o1.maxLen = 1000 
o1.queryType = 'measurement_id' 
o1.queryId = meas.id 
o1.fields = ['capturetime','numeric', 'measurement_id', 'inspection_id', 'frame_id']
o1.since = None
o1.before = None
o1.customFilter = {} 
o1.statsInfo = []
o1.save()

c1 = Chart()
c1.name = 'Motion'
c1.olap = o1.name
c1.style = 'spline'
c1.minval = 0
c1.maxval = 100
c1.xtype = 'datetime'
c1.colormap = {}
c1.labelmap = {}
c1.accumulate = False
c1.renderorder = 1
c1.halfsize = False
c1.realtime = True
c1.dataMap = ['capturetime','numeric']
c1.metaMap = ['measurement_id', 'inspection_id', 'frame_id']
c1.save()

o2 = OLAP()