I tried the following, but the data is not put correctly into the QR code - and nothing is stated in the documentation about QR codes.

$chart = array(
  '#chart_id' => 'test_chart',
  '#type' => CHART_TYPE_QR,
  '#size' => chart_size(200, 200),
  '#data' => 'http://vih.dk'
);
theme('chart', array('chart' => $chart));
$qr_file = chart_copy($chart, 'my_chart');

Comments

13rac1’s picture

Component: Documentation » Code

QR quotes are a newer feature of the Chart API. They may not be supported correctly in this module.

Can you post the generated URL?

lsolesen’s picture

Category: feature » bug
lsolesen’s picture

Do you need more info on this one?

13rac1’s picture

I simply haven't had the time to look into it. Got pulled into a giant D6->D7 upgrade project. I'll look into it as soon as I can.

lsolesen’s picture

Status: Active » Closed (fixed)
    $chart = array(
            '#chart_id' => 'test_chart',
            '#type' => CHART_TYPE_QR,
            '#size' => chart_size(200, 200) 
        );
        
        $chart['#data'][] = '';
        $chart['#labels'][] = $data;

It doesn't quite make sense, but the code above will put the data correctly in the QR-type.

lsolesen’s picture

Category: bug » support