- $pg->x[] = _('Calculated Return');
- $pg->y[] = abs($calc_open);
- $pg->z[] = abs($calc_period);
- global $decseps, $graph_skin;
- $pg->title = $rep->title;
- $pg->axis_x = _("Group");
- $pg->axis_y = _("Amount");
- $pg->graphic_1 = $headers[2];
- $pg->graphic_2 = $headers[3];
- $pg->type = $graphics;
- $pg->skin = $graph_skin;
- $pg->built_in = false;
- $pg->latin_notation = ($decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()] != ".");
+ $labels[] = _('Calculated Return');
+ $serie1[] = abs($calc_period);
+ $serie2[] = abs($calc_open + $calc_period);
+ $pg->setStream('png');
+ $pg->setLabels($labels);
+ $pg->addSerie($headers[3], $serie1);
+ $pg->addSerie($headers[4], $serie2);
+ $pg->setTitle($rep->title);
+ $pg->setXTitle(_("Group"));
+ $pg->setYTitle(_("Amount"));
+ $pg->setDTitle(number_format2(abs($calc_open + $calc_period)));
+ $pg->setValues(true);
+ $pg->latin_notation = ($SysPrefs->decseps[user_dec_sep()] != ".");