0

I'm trying to figure out how to draw multiple RGraph charts on a single canvas. Not overlapped charts, but, say, one chart under another. I'd prefer to do it this way (rather than have multiple canvases on the page) as should far easier to generate a png from a single canvas rather than try to stitch a bunch of pngs together.

Suggestions? Other approaches I may be missing?

Andy Hill
  • 3
  • 5

1 Answers1

1

There's an example of using one canvas to show multiple Gauge charts in the download archive called: demos/gauge-bank.html and you can download the archive here:

https://www.rgraph.net/download.html

And here's a HOWTO showing a canvas again with three Gauge charts, not overlapping this time:

https://www.rgraph.net/canvas/howto-gauges.html

In the case of Bar charts or Line charts you would set a big left margin for one chart and a big right margin for the other chart, so each allows space for the other.

Richard
  • 4,809
  • 3
  • 27
  • 46
  • OK, the gutter kludge was what I was missing -- I was thinking there would be some way to set the origin of bar / line charts sort of like the centerx / centery of pies or gauges. Hackish, but it works. Thanks! – Andy Hill Sep 10 '14 at 14:31
  • Not hackish at all - this is the way to do it. If you don't make space - the charts will just overlap. – Richard Sep 10 '14 at 17:45