0
votes

I've created this pie chart: http://jsfiddle.net/r9wtfwzy/.

The size of elements is the way I want, but the spacement is too big.

  • I tried changing margins:

    marginTop:-150,
    marginBottom:0,
    

But it whether approaches the title or the legend,it depends on which margin I change.

  • If reduce the height, the chart decreases.
  • If I change the size (e.g. 200%) in plotOptions, when there is less itens in the legend the chart gets too big, as you can see below. enter image description here

I don't know what else to do.

1
Use size parameter and center - Sebastian Bochan
@SebastianBochan I'm not sure about what you meant, but I added an image ilustrating the problem I face when changing the 'size' property. - carla
ok so what is wrong in the first image? - Sebastian Bochan
@SebastianBochan nothing at all. However, the number of itens in the legend is variable, so if I set things (size: 200%) to be good for 8 elements, when I have 6 elements the chart looks too big. - carla
You are right, anyway the solitin with size/center parameter doesnt work in your case? Can you replicate this issue as live demo ? - Sebastian Bochan

1 Answers

0
votes

It was not the perfect solution, since the spacement is still big sometimes, but what I ended up doing was to chose the appropriate parameters to a given situation and I changed the height depending on the number of elements in the legend:

$height_graph = 400 +20*$n_elements_legend;