Does anyone know how to change the space between the y-axis and the left edge of the chart? When I have y-axis labels with more than 3 significant digits, there is no longer enough room for the y-axis title, and it is partially cropped.
Chart.SetPlotArea
Thanks Karen
Better yet might be to use XYChart.packPlotArea
That should automatically give you enough space.
- Karen
Ooohhh…I might have to try this on a few problem charts.
If I had one complaint about Chart Directory it’s that the plot area always seems to be a pain and hard to adjust. My second complaint is documentation. I’m sure I could come up with others as we tend to use it a lot.
Thanks! I used the code below, and it works perfectly now.
call c.setPlotArea(65, 65, me.Width-100, me.Height-150, &hffffff, -1, &hc0c0c0, &hc0c0c0, -1)
The first 65 is the padding to the left side of the plot area, and the second 65 is the padding above the plot area.
Does anyone have a XYchart.packPlotArea example? I cannot get past a syntax error.
A couple examples have it:
https://www.monkeybreadsoftware.net/example-chartdirector-markbar.shtml
Here:
// Adjust the plot area size, such that the bounding box (inclusive of axes) is
// 10 pixels from the left edge, just below the title, 15 pixels from the right
// edge, and 10 pixels above the legend box.
c.packPlotArea(10, title.getHeight, c.getWidth - 15, c.layoutLegend.getTopY - 10)