X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fpiechart.c;h=366e729e7cd16b4811dbbcb42b0a76f9578f7fb2;hb=76d65a89851d142dc58a34bee3123fcb9acba0c8;hp=aac8bfbf8d03429517987e4c52e4d03f7f4d85cf;hpb=aef3ea74ea405190380776f562d41704825d110a;p=pspp diff --git a/src/output/charts/piechart.c b/src/output/charts/piechart.c index aac8bfbf8d..366e729e7c 100644 --- a/src/output/charts/piechart.c +++ b/src/output/charts/piechart.c @@ -43,6 +43,11 @@ piechart_create (const char *title, const struct slice *slices, int n_slices) 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;