Thank you, Jon!

Just to be sure - I was asking about this part. Are we allowed to change 
the position of the elements, using their coordinates?

google.visualization.events.addListener(chartErrorDetails, 'ready', function () 
{
    var circles = container.getElementsByTagName('circle');
    var labels = container.getElementsByTagName('text');
    var labelIndex = -1;
    var fontSize;
    var radius;
    var xCoordCircle;
    var xCoordLabel;
    var yCoordLabel;
    var yCoordCircle;
    Array.prototype.forEach.call(labels, function(label) {
      if ((label.getAttribute('text-anchor') === 'start') && 
(label.getAttribute('fill') !== '#ffffff')) {
        labelIndex++;
        if (labelIndex === 0) {
          radius = parseFloat(circles[labelIndex].getAttribute('r'));
          xCoordCircle = circles[labelIndex].getAttribute('cx');
          xCoordLabel = label.getAttribute('x');
        } else {
          fontSize = parseFloat(label.getAttribute('font-size')) * labelIndex;
          yCoordLabel = parseFloat(label.getAttribute('y'));
          label.setAttribute('x', xCoordLabel);
          label.setAttribute('y', (yCoordLabel - fontSize - (radius * 
labelIndex)));
          yCoordCircle = parseFloat(circles[labelIndex].getAttribute('cy'));
          circles[labelIndex].setAttribute('cx', xCoordCircle);
          circles[labelIndex].setAttribute('cy', yCoordCircle - fontSize - 
(radius * labelIndex));
        }
      }
    });
  });



вторник, 23 юли 2019 г., 17:05:26 UTC+3, orw...@google.com написа:
>
> Yes.
>
> Jon
>
> On Tue, Jul 23, 2019 at 9:13 AM Daniela <trying...@gmail.com <javascript:>> 
> wrote:
>
>> Hello guys,
>>
>> I need to customize Chart Legend position to align it vertically.
>>
>> I would like to ask you - is what is described here allowed by Google 
>> Charts license?
>>
>>
>> https://stackoverflow.com/questions/52183282/new-line-for-legend-in-google-chart-piechart
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google Visualization API" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-visualization-api+unsubscr...@googlegroups.com 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-visualization-api/586db069-3387-4ead-9819-3dfd1de7f041%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-visualization-api/586db069-3387-4ead-9819-3dfd1de7f041%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/9327ce80-c2ed-48cb-80cf-35b79a902907%40googlegroups.com.

Reply via email to