
Dear all,
I've been trying to set prepare a grid with different charts for comparisons. The issue I have is that the first row of the grid has the legend distorted. The issue does not occur for subsequent rows. (see the elongated legend boxes?).
I defined a function to create a combination of two charts, then created a grid and exported it to pdf.
chartTrends[country_, percent_] := Module[
{a, b},
a = salesTrend[country, percent];
b = Table[
Labeled[Last[a][[i]],
If[Mod[i, 4] == 1, Rotate[headings[[i]], 90 Degree], None]], {i,
Range@Length@headings}];
Grid[{{BarChart[b, ChartLayout -> "Percentile",
ChartStyle -> ColorData[35, "ColorList"],
PlotRegion -> {{0.10, 0.90}, {0.10, 0.90}}, ImageSize -> 1000,
ChartLegends ->
Placed[Style[#, FontSize -> Small] & /@ First[a], Right]],
BarChart[b, ChartStyle -> ColorData[35, "ColorList"],
PlotRegion -> {{0.10, 0.90}, {0.10, 0.90}},
ChartLayout -> "Stacked", ImageSize -> 1000]}} ]]
This is what I used to create the grid and export it to pdf.
myGrid = Grid[
Partition[
Column[{"", Style[#, Bold, FontSize -> 36], "",
chartTrends[#, 0.9]}, Alignment -> Center] & /@ countryList,
4], Alignment -> Center, Frame -> All,
FrameStyle -> Directive[LightGray]];
Export["myGrid2.pdf", myGrid]
I've tried with GraphicsGrid instead of Grid, but that creates other problems such as cropping the legend box.
Any clues?


