Newbies brendan_mahe Posted November 1, 2016 Newbies Posted November 1, 2016 (edited) Hi, I can't seem to get filemaker pro to plot google charts the way I want them in web viewer. I want the graph to look something like this: ...Seems it would be pretty basic at first but I can't get this particular multi-series chart to work. It needs to plot ALL the records and MORE THAN ONE series. I've created one table called 'MyTable' with 3 fields 'CarName', 'CarSpeed' and 'CarWeight'. I've populated the table with 5 records. CarName on the Y-Axis, and against this, CarSpeed and CarWeight are plotted on the X-Axis as 2 series. i.e. series one is 'CarName' vs 'CarSpeed', series 2 is 'CarName' vs 'CarWeight' I've managed to successfully create 2 graphs, first one plots the series ok but only works for one record. The second, in which I've used an ExecuteSQL command to collect the table data from FMP, shows all the records but for only one field on the X-Axis. Any help appreciated. I'm running filemaker pro 14, and I've attached the fmp file, as well as the javascript code from the web viewer of each graph. Any help greatly appreciated Google Charts-Demo File.fmp12 AllRecords-OneSeries.rtf AllSeries-OneRecord.rtf Edited November 1, 2016 by brendan_mahe
Agnes Riley Posted November 1, 2016 Posted November 1, 2016 Hi Brendan, I would not put a function into the HTML. You want to run a script and gather the data, do the substitution (to make it look like Google expects it) and then save it to a global variable and add that variable in your HTML. You'll gain two things: You'll clearly see what data you generated in the variable while debugging your script You'll clearly see what data you generated in the webviewer in layout mode, because it will show, so you can see if there's an issue with your HTML. Also, there's this useful thing called FMFiddle that you can download from here: https://cimbura.com/2016/08/29/gis-filemaker-part-1-basics/ Hope this helps, Agi
rivet Posted November 2, 2016 Posted November 2, 2016 (edited) Hi Brendan, I recently ran into the same issue. I typically use ExecuteSQL function to get my data for charting. There are some limitations of this function but with some help I was able to bend the data into shape. Have a look: https://community.filemaker.com/thread/166294. Hope that helps Edited November 2, 2016 by rivet
Newbies brendan_mahe Posted November 3, 2016 Author Newbies Posted November 3, 2016 Agnes that's what I ended up doing, Jeremy Brown over in community.filemaker.com was very helpful and pointed me in that exact direction (see link below). Thanks for the link to that filemaker file it looks really useful. Rivet, I was recommended against running an ExecuteSQL function in the html because of the fact it can run whenever it wants and it can take longer to complete the task. I'm sure I'll need to use that function soon, thanks https://community.filemaker.com/message/615327
Recommended Posts
This topic is 3204 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now