jQWidgets Forums
Forum Replies Created
-
Author
-
August 11, 2016 at 6:44 am in reply to: LIne graph and JSON, dont get it to work LIne graph and JSON, dont get it to work #86476
Thank you.
I suspected so, but hoped that it was possible to load directly. I just stick to PHP for now. I will look into beforeLoadComplete and if I get it to work – maby do the rest av my charts with that.Regards
TomAugust 10, 2016 at 1:12 pm in reply to: LIne graph and JSON, dont get it to work LIne graph and JSON, dont get it to work #86460You have my JSON in my first post.
Eg:{ "Head" : { "RequestArguments" : { "Scope" : "System", "StartDate" : "2016-07-27T00:00:00+02:00", "EndDate" : "2016-07-27T23:59:59+02:00", "Channel" : "EnergyReal_WAC_Sum_Produced", "SeriesType" : "Detail", "HumanReadable" : "True" }, "Status" : { "Code" : 0, "Reason" : "", "UserMessage" : "", "ErrorDetail" : { "Nodes" : [] } }, "Timestamp" : "2016-07-27T19:09:42+02:00" }, "Body" : { "Data" : { "inverter\/1" : { "NodeType" : 97, "DeviceType" : 122, "Start" : "2016-07-27T00:00:00+02:00", "End" : "2016-07-27T23:59:59+02:00", "Data" : { "EnergyReal_WAC_Sum_Produced" : { "_comment" : "channelId=67830024", "Unit" : "Wh", "Values" : { "-7200" : 0, "-6900" : 0, "-6600" : 0, "-6300" : 0, "-6000" : 0, "-5700" : 0, "-5400" : 0, "-5100" : 0, "-4800" : 0, "-4500" : 0, "-4200" : 0, "-3900" : 0, "-3600" : 0, "-3300" : 0, "-3000" : 0, "-2700" : 0, "-2400" : 0, "-2100" : 0, "-1800" : 0, "-1500" : 0, "-1200" : 0, "-900" : 0, "-600" : 0, "-300" : 0, "0" : 0, "300" : 0, "600" : 0, "900" : 0, "1200" : 0, "1500" : 0, "1800" : 0, "2100" : 0, "2400" : 0, "2700" : 0, "3000" : 0, "3300" : 0, "3600" : 0, "3900" : 0, "4200" : 0, "4500" : 0, "4800" : 0, "5100" : 0, "5400" : 0, "5700" : 3.745833, "6000" : 4.25, "6300" : 4.994722, "6600" : 4.845278, "6900" : 4.763611, <cut alot of values> "50100" : 43.361667, "50400" : 42.034722, "50700" : 38.844167, "51000" : 36.856944, "51300" : 31.732222, "51600" : 23.393889, "51900" : 30.634167, "52200" : 29.128333, "52500" : 26.378889, "52800" : 22.976944, "53100" : 20.695833, "53400" : 19.072222, "53700" : 16.305556, "54000" : 14.266389, "54300" : 15.381944, "54600" : 15.718611, "54900" : 16.5, "55200" : 16.526111, "55500" : 15.247778, "55800" : 11.865833, "56100" : 10.365833, "56400" : 11.649444, "56700" : 14.941944, "57000" : 16.960556, "57300" : 16.425833, "57600" : 15.263611, "57900" : 14.168333, "58200" : 12.413056, "58500" : 10.17, "58800" : 7.374444, "59100" : 6.366111, "59400" : 7.185278, "59700" : 8.324722, "60000" : 8.481111, "60300" : 8.756111, "60600" : 10.043889, "60900" : 9.540278, "61200" : 9.850833, "61500" : 10.343611 } } } } } } }
For the last value (“61500” : 10.343611) X-axis value should be 61500 and Y-axis 10.343611.
61500 is seconds from midnight GMT, and can be modified to just about anything as long as the sequence is the same.
10.343611 is kWh and can be rounded to 1 decimalI can try to export it from loadComplete when I get back home.
Regards
TomAugust 9, 2016 at 5:39 am in reply to: LIne graph and JSON, dont get it to work LIne graph and JSON, dont get it to work #86409you would probably have to apply the correct datafield mapping.
That is what I need help with
August 5, 2016 at 2:49 pm in reply to: LIne graph and JSON, dont get it to work LIne graph and JSON, dont get it to work #86370Btw, to be clear, I have changed the output in my json, I added human readable time och max output from the solarpanels. I also added values in the feature, to get the X axis to show 24h from midnight to midnigt.
August 5, 2016 at 2:44 pm in reply to: LIne graph and JSON, dont get it to work LIne graph and JSON, dont get it to work #86369Thanks Dimitar.
I got:
>Object { Head: Object, Body: Object}
>>Body: Object
>>>Data: Object
>>>>Inverter/1: Object
>>>>>Data: Object
>>>>>>EnergyReal_WAC_Sum_Produced: Object
>>>>>>>Values: Object
0:0
300:0
600:0
and so on, the values that I want to chart.So I gues that I get the values, but I don’t point them out correctly or the format is wrong, or I don’t know.
Maby I just run it through PHP and change the format to something that works eg:[ { "time": -7200, "Tid": "2016-08-05 00:00:00", "kwp": 2.32, "Wh": 0 }, { "time": -6900, "Tid": "2016-08-05 00:05:00", "kwp": 2.32, "Wh": 0 }, { "time": -6600, "Tid": "2016-08-05 00:10:00", "kwp": 2.32, "Wh": 0 }, <long list with values> { "time": 78900, "Tid": "2016-08-05 23:55:00", "kwp": 2.32, "wH": "null" } ]
August 4, 2016 at 5:36 am in reply to: LIne graph and JSON, dont get it to work LIne graph and JSON, dont get it to work #86296Hi, sorry to ask but how do I use loadComplete to show the loaded data? I am new on jqwidgets and javascript, so I am a bit lost.
loadError don’t report any errors.loadError: function (xhr, status, error) { alert(“error Occured while fetching server data – , ” + status + “, ” + error); }
August 1, 2016 at 5:38 pm in reply to: LIne graph and JSON, dont get it to work LIne graph and JSON, dont get it to work #86232Missed type: ‘date’ for the xAxis, so now the getHour is fixed
Any ideas how to read the json file directly without the need of php?
July 30, 2016 at 3:56 pm in reply to: LIne graph and JSON, dont get it to work LIne graph and JSON, dont get it to work #86205Hi.
Just wanted to say that I kind of solved it with PHP instead.
Get a error message in the chart “Z.getHouers is not a function” but I can live with that for now. Probably I have a bad dateformat.Regards
July 29, 2016 at 12:39 pm in reply to: LIne graph and JSON, dont get it to work LIne graph and JSON, dont get it to work #86187Sorry, missed the first lines in my HTML.
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> <title>Egen flödesbild från API</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" href="src/jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="src/jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="src/jqwidgets/jqxchart.js"></script> <script type="text/javascript" src="src/jqwidgets/jqxdata.js"></script> <script type="text/javascript" src="src/jqwidgets/jqxloader.js"></script> <script type="text/javascript"> $(document).ready(function(){ ...
-
AuthorPosts