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:

AttachmentSize
691904.patch 0 bytes

#2

Whoops. Here's a patch file that actually has data in it:

AttachmentSize
691904.patch 1.15 KB

#3

This patch produces a Hunk error at line 274.

#4

Version:6.x-1.2» 6.x-1.x-dev
Assigned to:axlroach» Anonymous
Status:needs review» patch (to be ported)

Functionality and support function chart_margins() committed to 7.x-1.x. Patch needs to be ported to 6.x-1.x.

AttachmentSize
add_margins-691904-4.patch 2.45 KB

#5

Status:patch (to be ported)» fixed

Manually applied to 6.x-1.x-dev.

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.