Jump to content
Server Maintenance This Week. ×

Chart with multiple Y axis


desta

This topic is 4452 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

  • Like 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 4452 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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