25.05.2018, 06:39
Docs on how to upload .lp files:
https://forum.logicmachine.net/showthread.php?tid=85
.lp file is a Lua script which is accessible from HTTP. Here's a minimal example that outputs data in JSON format:
Then, in Custom JavaScript you can load data from .lp like this (in callback function passed to google.charts.setOnLoadCallback). Once data is loaded you can create new chart and draw it.
https://forum.logicmachine.net/showthread.php?tid=85
.lp file is a Lua script which is accessible from HTTP. Here's a minimal example that outputs data in JSON format:
Code:
<?
data = { 1, 2, 3 }
print(json.encode(data))
Then, in Custom JavaScript you can load data from .lp like this (in callback function passed to google.charts.setOnLoadCallback). Once data is loaded you can create new chart and draw it.
Code:
$.getJSON('/user/data.lp', function(data) {
console.log(data);
// draw chart here
});