Jump to content
jbrouwer

Charts in php

Recommended Posts

jbrouwer    5
jbrouwer

Hi,

 

Is it possible to use the charts shortcode in PHP? I would like to show charts of user generated data.

 

Thanks.

Share this post


Link to post
Share on other sites
catrina    103
catrina

To clarify, how do you intend on incorporating both? Like, adding the shortcode inside a PHP tag?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
jbrouwer    5
jbrouwer

Sorry for the short explanation.

 

I would like to show a chart on each post using the data which is stored in the custom fields of that post. Every post has different data to show (user generated). Is there a way I can use the chart option Pagelines offers? What is the best way to do this with Pagelines?

 

I was trying to do this with Google charts API, but I was running into trouble to get server side data into a client side generated chart. This code from Google is helpful, but I don't know how I can get custom fields (it needs the loop) using an ajax call.

 

Thanks

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

If I am totally honest, I wouldn't really have any idea how to achieve this. However, I did do a search and found this plugin which uses custom fields apparently.

 

http://wordpress.org/extend/plugins/tally-graph/

 

If the plugin isn't for you, I would recommend contacting one of our Pros, who may be able to assist you - http://www.pagelines.com/pros/


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

How did you achieve this in the end ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
jbrouwer    5
jbrouwer

I made a little plugin. It uses the wordpress buildin ajax functionality to get the metadata from the post and display it in a google chart. Let me know if you want to have the code.

 

Cheers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×