/* PSPP - a program for statistical analysis.
- Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009, 2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
-#include <output/charts/piechart.h>
+#include "output/charts/piechart.h"
#include <stdlib.h>
-#include <libpspp/cast.h>
-#include <libpspp/str.h>
-#include <output/chart-item-provider.h>
+#include "libpspp/cast.h"
+#include "libpspp/str.h"
+#include "output/chart-item-provider.h"
#include "gl/xalloc.h"
struct slice *dst = &pie->slices[i];
ds_init_string (&dst->label, &src->label);
+
+ /* Chomp any whitespace from the RHS of the label.
+ Doing this ensures that those labels to the right
+ of the pie, appear right justified. */
+ ds_rtrim (&dst->label, ss_cstr (" \t"));
dst->magnitude = src->magnitude;
}
pie->n_slices = n_slices;