November 1, 20169 yr Newbies 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, 20169 yr by brendan_mahe
November 1, 20169 yr 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
November 2, 20169 yr 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, 20169 yr by rivet
November 3, 20169 yr Author Newbies 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
Create an account or sign in to comment