on 09-30-2016 7:54 AM
Hi
I have a json file which has nested objects,i would like to bind these objects on scatter chart when i run the application i get empty results, i have tried similar examples that i found here but still get empty results the following is my code:
<viz:VizFrame id="DueDateGridFrame" vizType="info/line" uiConfig="{applicationSet:'fiori'}"
vizProperties="{ title: { visible: true }, valueAxis: { title: { visible: true } },
categoryAxis: { title: { visible: true } },
plotArea: { colorPalette: ['#e1242b','#e1242b','#5d5d5d','#5d5d5d','#ffa500','#008000'], gap: { visible: false },
isFixedDataPointSize: false, window: { start: null, end: null }, timeAxis: { interval: { unit: 'auto' } } } }" width="100%" >
<viz:dataset>
<viz.data:FlattenedDataset data="{value}">
<viz.data:dimensions>
<viz.data:DimensionDefinition name="Status" value="{Status}" />
<viz.data:DimensionDefinition name="Time" value="{date}" />
</viz.data:dimensions>
<viz.data:measures>
<viz.data:MeasureDefinition value="{pressure}" name="Pressure" />
</viz.data:measures>
</viz.data:FlattenedDataset>
</viz:dataset>
<viz:feeds>
<viz.feeds:FeedItem uid="valueAxis" type="Measure" values="Pressure" />
<viz.feeds:FeedItem uid="categoryAxis" type="Dimension" values="Time" />
<viz.feeds:FeedItem uid="color" type="Dimension" values="Status" />
</viz:feeds>
</viz:VizFrame>
and this is my json file:
[
{
"EmployeeID": 1,
"Location": "Daveyton",
"Name": "AcquaDrive 2100",
"Model": "7252XTD-A24X",
"Rating": "Output 1500 WATSS 9.5 AMPS",
"Motor": "VOLTS 230 hz 50 PH 1 Duty s1 ip 44",
"Max.kPa": "200",
"Min.kPa": "50",
"pressures": 100,
"status": "Healthy",
"color":"Good",
"date":"07:05",
"value":[
{
"status":"CRITICAL",
"pressure": 100,
"date":"13:55",
"color":"Warning"
},
{
"status":"CRITICAL",
"pressure": 0,
"date":"06:30"
},
{
"status":"HEALTHY",
"pressure": 100,
"date":"07:05"
}
]
},
{
"EmployeeID": 2,
"Location": "Sandton",
"Name": "AcquaDrive 2100",
"Model": "7252XTD-A24X",
"Rating": "Output 1500 WATSS 9.5 AMPS",
"Motor": "VOLTS 230 hz 50 PH 1 Duty s1 ip 44",
"Max.kPa": "200",
"Min.kPa": "50",
"pressure": 180,
"status": "Healthy",
"color":"Error",
"value":[
{
"status":"CRITICAL",
"pressure": 100,
"date":"Sep 12 2016, 13:55:00",
"color":"Warning"
},
{
"status":"CRITICAL",
"pressure": 0,
"date":"Apr 1 2016, 06:30:00"
},
{
"status":"HEALTHY",
"pressure": 100,
"date":"Apr 1 2016, 07:05:00"
}
]
},
{
"EmployeeID": 3,
"Location": "Centurion",
"Name": "AcquaDrive 2100",
"Model": "7252XTD-A24X",
"Rating": "Output 1500 WATSS 9.5 AMPS",
"Motor": "VOLTS 230 hz 50 PH 1 Duty s1 ip 44",
"Max.kPa": "200",
"Min.kPa": "50",
"pressure": 40,
"status": "Healthy",
"color":"Critical",
"value":[
{
"status":"MODERATE",
"pressure": 100,
"date":"Sep 11 2016, 13:10:00",
"color":"Warning"
},
{
"status":"CRITICAL",
"pressure": 0,
"date":"Apr 1 2016, 06:30:00"
},
{
"status":"HEALTHY",
"pressure": 100,
"date":"Apr 1 2016, 07:05:00"
}
]
},
{
"EmployeeID": 4,
"Location": "Diepsloot",
"Name": "AcquaDrive 2100",
"Model": "7252XTD-A24X",
"Rating": "Output 1500 WATSS 9.5 AMPS",
"Motor": "VOLTS 230 hz 50 PH 1 Duty s1 ip 44",
"Max.kPa": "200",
"Min.kPa": "50",
"pressure": 35,
"status": "Healthy",
"color":"Critical",
"value":[
{
"status":"HEALTHY",
"pressure": 100,
"date":"Sep 10 2016, 12:40:00",
"color":"Warning"
},
{
"status":"CRITICAL",
"pressure": 0,
"date":"Apr 1 2016, 06:30:00"
},
{
"status":"HEALTHY",
"pressure": 100,
"date":"Apr 1 2016, 07:05:00"
}
]
},
{
"EmployeeID": 5,
"Location": "Tembisa",
"Name": "AcquaDrive 2100",
"Model": "7252XTD-A24X",
"Rating": "Output 1500 WATSS 9.5 AMPS",
"Motor": "VOLTS 230 hz 50 PH 1 Duty s1 ip 44",
"Max.kPa": "200",
"Min.kPa": "50",
"pressure": 101,
"status": "Healthy",
"color":"Good",
"value":[
{
"status":"HEALTHY",
"pressure": 100,
"date":"Sep 09 2016, 15:10:00",
"color":"Good"
},
{
"status":"CRITICAL",
"pressure": 0,
"date":"Apr 1 2016, 06:30:00",
"color":"Warning"
},
{
"status":"HEALTHY",
"pressure": 100,
"date":"Apr 1 2016, 07:05:00",
"color":"Good"
}
]
},
{
"EmployeeID": 6,
"Location": "Pretoria",
"Name": "AcquaDrive 2100",
"Model": "7252XTD-A24X",
"Rating": "Output 1500 WATSS 9.5 AMPS",
"Motor": "VOLTS 230 hz 50 PH 1 Duty s1 ip 44",
"Max.kPa": "200",
"Min.kPa": "50",
"pressure": 0,
"status": "Healthy",
"color":"Error",
"value":[
{
"status":"HEALTHY",
"pressure": 100,
"date":"Sep 09 2016, 14:10:00",
"color":"Good"
},
{
"status":"CRITICAL",
"pressure": 0,
"date":"Sep 12 2016, 13:30:00",
"color":"Error"
},
{
"status":"HEALTHY",
"pressure": 100,
"date":"Apr 1 2016, 07:05:00",
"color":"Good"
}
]
}
]
Discussion successfully moved from SAP HANA Cloud Platform Developer Center to SAPUI5 Developer Center
as the more appropriate community for this topic.
Regards, Mike (Moderator)
SAP Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.