September 26, 2007, 02:12 PM
NailzzWhite Spacing around a Graph save as a JPEG
Hi all I am looking for the API set commamd that decreases the whitespace around a graph. I am also looking to decrease the space in between the x axis. For example may range is
0 20 40 60 80 100 which is what I want but the gap between them are quite wide what set command shrinks this. I am using the Focus Graph Documentation, but I don't see how to do this.
September 26, 2007, 02:40 PM
dhagenThe gap - to the best of my knowledge - is dictated by the width of the graph. Mess with the following to change it.
ON GRAPH SET VAXIS 17
ON GRAPH SET HAXIS 210
The following will help you change the white space around the graph. I can't remember what does what, you'll just have to read and play.
setExtendToFrameEdge(true); // Extend graph to use entire presentation area.
setFootnoteDisplay(false);
setSubtitleDisplay(false);
setTitleDisplay(false);
setToolTipDisplay(false); // Turn off tool tips
setFrameDisplay(false); // Turn off graph frame display
setLegendDisplay(false); // Turn off legend
setLegendAutomatic(false);
setRect(getFrame(), new Rectangle(-16000,-16000,32000,32000));
setPlace(true);
September 28, 2007, 04:55 PM
NailzzThanks dhagen, I will have to keep playing with the setRect(getFrame(), new Rectangle(-16000,-16000,32000,32000)).
Do you know how to change the color of the background not of the graph but the whitespace behind the graph?
September 29, 2007, 09:28 AM
dhagenSetting background colour:
setFillColor(getChartBackground(), new Color(255 255 204)); // chart background stuff
Please read the doc. This is all there.