diff --git a/chart.module b/chart.module
index 76e177b..4a7de84 100644
--- a/chart.module
+++ b/chart.module
@@ -656,6 +656,9 @@ function _chart_append($attr, $value, &$data) {
       if (count($positions)) {
         foreach ($positions as $i => $position) {
           if ($position['set'] == TRUE) {
+            if (!isset($data['chxp'])) {
+              $data['chxp'] = '';
+            }
             $data['chxp'] .= $i . ',' . implode(',', $position['data']) .  '|';
           }
         }
