/* Creates and returns a chart that will render a piechart with
the of VAR and the N_SLICES described in SLICES. */
/* Creates and returns a chart that will render a piechart with
the of VAR and the N_SLICES described in SLICES. */
piechart_create (const struct variable *var, const struct freq *slices, int n_slices)
{
struct piechart *pie;
int i;
pie = xmalloc (sizeof *pie);
piechart_create (const struct variable *var, const struct freq *slices, int n_slices)
{
struct piechart *pie;
int i;
pie = xmalloc (sizeof *pie);
pie->slices = xnmalloc (n_slices, sizeof *pie->slices);
for (i = 0; i < n_slices; i++)
{
pie->slices = xnmalloc (n_slices, sizeof *pie->slices);
for (i = 0; i < n_slices; i++)
{
ds_assign_cstr (&dst->label, _("*MISSING*"));
else
var_append_value_name (var, &src->values[0], &dst->label);
ds_assign_cstr (&dst->label, _("*MISSING*"));
else
var_append_value_name (var, &src->values[0], &dst->label);