Hi again - it seems that chart_size accepts maximum 400,200.

I saw http://code.google.com/apis/chart/#chart_size that tells about size limits, but even if I set the permitted 800,375 or 600,500, or in fact anything beyond 400,200, the chart size becomes 300x150 pixels.

Is that normal or am I doing something wrong?

My test code's snippet:

$chart = array(
      '#chart_id' => 'test_chart',
      '#title' => chart_title(t('Test'), 'cc0000', 15),
      '#type' => CHART_TYPE_LINE,
      '#size' => chart_size(800, 375),
    );

Also, what are your further plans about developing Chart API for Drupal 5? (I cannot yet upgrade to Drupal 6, and I assume many people are in the same situation.)

Thanks!

Comments

tjholowaychuk’s picture

I am not certain is Google has changed this lately, but they did have a limit on the total number of pixels rendered, which is scaled down by this module so that devs dont just end up seeing some blank screen thinking what did i do! I have not bothered to begin porting my modules yet but hopefully soon when I have time, as for D5 thats a possibility, I have not personally come across any other need for the chart module yet but if anyone has additional suggestions im sure myself or the community could whip up some code

vacilando’s picture

The URL I posted above (for some reason it does not show properly, so here it is again: http://code.google.com/apis/chart/#chart_size) mentions that pixel limit, but 400,200 is way below that.

Have you ever done any tests that rendered images larger than that? Are you able to generate a large image now? If you answer 'yes' and then 'no', then Google has lowered the limit. If you answer 'no' and 'no', well, then perhaps there's a reason to mark this as a possible bug :-)

tjholowaychuk’s picture

Assigned: Unassigned » tjholowaychuk
Category: support » bug

I am sure I did at the time, they may have changed the size I cannot remember, I will flag it as a bug for now ( probably is ).

Bobuido’s picture

Subscribing

boombatower’s picture

Status: Active » Closed (cannot reproduce)

Seems to support this in 6.x and 7.x (which are all that is supported). Please reopen if not the case and change the version.

Pierre.Vriens’s picture

Title: chart_size accepts maximum 400,200 » Maximum chart_size for all charts
Version: 5.x-1.2 » 7.x-1.0
Component: Code » Documentation
Assigned: tjholowaychuk » Unassigned
Category: Bug report » Support request
Issue summary: View changes
Status: Closed (cannot reproduce) » Closed (works as designed)
Parent issue: » #2369883: Create chart documentation

The correct ink these days is https://developers.google.com/chart/image/docs/chart_params#gcharts_chs which also details the various restrictions, i.e.: Maximum chart size for all charts except maps is 300,000 pixels total, and maximum width or length is 1,000 pixels. Maximum size for maps is 440x220.