Jump 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.

Chart with multiple Y axis

Featured Replies

Hi,

Is it possible to set two different axis on a graph?

I have a table with a serie of dates, that are my X axis (timeline).

Every record has a Quantity values, starting from, for example 50 000, and varying upon variation values

Some records have variation values, ranging from -1000 to 1000

For examples, the table could have those values for date; quantity; variation:

2012-02-01 ; 50000 ; 0

2012-02-02 ; 50000 ; 100

2012-02-03 ; 50100 ; 0

2012-02-04 ; 50100 ; 0

2012-02-05 ; 50100 ; -500

2012-02-06 ; 49600 ; 0

... and so on. I would like a graph that shows a line for the variations, and a line showing the Quantity, on the same graph. The range difference is so high that there is only a flat line near 50000 and a flat line near 0. I could solve the problem by putting two different Y axis. Is it possible?

There can be only one Y axis with one scale. Perhaps you could overlay two charts, or multiply one of the values by a constant.

You can generate the plot within the WebViewer. The advantage of doing this is that you can use tools such as Google Visualization to render the data, which are more flexible than FM's klunky plotting. e.g. when you mouse over a data point, its value will be displayed, and you can opt to generate smooth curves between data points, generate a wide range of chart types, etc. The series data are inserted into a data URL, and Google renders the plot. Alternately a library such as Dygraph can be used with webviewer. Dygraph also reads off data points, and allows you to zoom in and out on the plot. A simple example is attached which dumps the series and JS into a data URL and generates the plots. A 3rd option might be to use JFreechart with 360Works Scriptmaster. The example simply inserts the data points/series looping through every record of the table, into the Javascript, and then renders the resulting plot. For details on changes of plot type, markers, scrolling, annotations, etc see the API for Google or Dygraph and simply modify the Javascript accordingly.

WebViewer_Google_Charts.zip

Create an account or sign in to comment

Important Information

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

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.