Posted by axlroach on January 21, 2010 at 8:33pm
| Project: | Google chart API |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
When chart labels are long (or there are several different labels), they often times are truncated as if they go off the edge of the image. One work-around for this is to add margins to your chart URI like so: &chma=50,50,50,50.
I thought it would be great if you could add margins to a chart URL like this:
<?php
$my_chart['awesome_chart'] = array('#chart_id' => 'awesome_chart',
'#title' => t('What a great chart'),
'#type' => CHART_TYPE_PIE_3D,
'#size' => chart_size(500, 300),
'#margins' => '50, 50, 50, 50',
);
?>I patched the chart.module to allow for this. Patch attachment forthcoming.
Comments
#1
Here's the patch file:
#2
Whoops. Here's a patch file that actually has data in it:
#3
This patch produces a Hunk error at line 274.
#4
Functionality and support function chart_margins() committed to 7.x-1.x. Patch needs to be ported to 6.x-1.x.
#5
Manually applied to 6.x-1.x-dev.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.