Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Multi-Series Google Bar Charts

Featured Replies

  • 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: bar-chart1.png
...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 by brendan_mahe

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:

  1. You'll clearly see what data you generated in the variable while debugging your script
  2. 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

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 by rivet

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.