Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeSeries chart for JSON data #54

Open
eeshamca opened this issue Mar 6, 2013 · 4 comments
Open

TimeSeries chart for JSON data #54

eeshamca opened this issue Mar 6, 2013 · 4 comments

Comments

@eeshamca
Copy link

eeshamca commented Mar 6, 2013

Hi, I am creating chart for TimeSeries Data, I have done code for getting JSON output as below.
([{ "first": "12.35", "second": "34.5", "third": "04.34"}])
But this output will not prepare a chart of TimeSeries in Graphene.
Is it worked for PHP coding ? My code was written in PHP and made json_encode and call the GET request to PHP file and get the response as JSON data as above mentioned.
If it works for PHP, then How to pass these data to Graphene chart and how it could be possible to make changes dynamically ?

@jondot
Copy link
Owner

jondot commented Mar 20, 2013

Hi,
Graphene works best with Graphite, but if you are not using Graphite and want to use Graphene, it is still possible to build a server-side endpoint that mimics how Graphite exposes data. I advise to take a look at the discussion here:

#39

Thanks

@jondot
Copy link
Owner

jondot commented Apr 18, 2013

@eeshamca hey there - did it work out for you eventually? anything I can help out with?

@danielme85
Copy link

hey @jondot, I´m trying to accomplish the same as @eeshamca is talking about.
I need to fake the Graphite structure based on some Apple plist xml data.
have a url delivering the following json data:
[{"target":"name","datapoints":[[1406801041,341],[1406800983,399]]}]
The object is built and i get a: "Starting to poll at * " console message, but nothings happening.
It works with the g.demo() hook enabled.

Thanks!

@danielme85
Copy link

I got it working, the json data needed to be wrapped in a jsonp callback request from Graphene.
I use php on the server that handles the request, if you happen to be in the same situation i found the solution here: http://www.geekality.net/2010/06/27/php-how-to-easily-provide-json-and-jsonp/
$json = json_encode($output); echo isset($_GET['jsonp']) ? "{$_GET['jsonp']}($json)" : $json;

Got some fancy graphs now, nice work @jondot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants