Is this possible to change pie stroke color?

1,277 views
Skip to first unread message

heaven

unread,
Oct 19, 2011, 5:21:40 AM10/19/11
to Google Visualization API, ahea...@gmail.com
Hi, I'm trying to find a way to change pie stroke color. In previous
versions there was an option called borderColor, but currently it
doesn't seem to work.

Thanks in advance,
Alex

heaven

unread,
Oct 19, 2011, 6:12:27 AM10/19/11
to Google Visualization API
This is what I mean - http://oi54.tinypic.com/9rq4bb.jpg (I've changed
it in chrome console)

Viz Kid

unread,
Oct 23, 2011, 4:38:14 AM10/23/11
to google-visua...@googlegroups.com

This is currently not supported.
Just to understand better what you are asking for, you want to be able to control the border color of each slice separately?

  Viz Kid

On Wed, Oct 19, 2011 at 12:12 PM, heaven <ahea...@gmail.com> wrote:
This is what I mean - http://oi54.tinypic.com/9rq4bb.jpg (I've changed
it in chrome console)

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


heaven

unread,
Oct 24, 2011, 2:48:50 AM10/24/11
to Google Visualization API
Hi, yes, I want to have a possibility to set border color, but single
for whole pie, it's enough for me.Also I want to ask, is this possible
to remove scrolling from the legend and just wrap it to the next line?
This will be useful with narrow and high graphs.Seems like booth these
features are available in older version (in piechart)
Best,Alex
On 23 окт, 11:38, Viz Kid <viz...@google.com> wrote:
> This is currently not supported.
> Just to understand better what you are asking for, you want to be able to
> control the border color of each slice separately?
>
>   Viz Kid
>
>
>
>
>
>
>
> On Wed, Oct 19, 2011 at 12:12 PM, heaven <aheave...@gmail.com> wrote:
> > This is what I mean -http://oi54.tinypic.com/9rq4bb.jpg(I've changed

Viz Kid

unread,
Oct 24, 2011, 3:47:40 AM10/24/11
to google-visua...@googlegroups.com

Actually, changing the border color of all the slices to the same color is possible. You can set it using the option pieSliceBorderColor (which we haven't documented yet).
Regarding the legend, we are considering additional options like the one you suggested but we haven't made a final decision on how it should look. In the meanwhile, you can try play with it using the option legend.maxLines (i.e. {legend: {maxLines: 5}} for allowing at most 5 lines). Notice that this doesn't change the spacing of the chart, so if you did not have enough white space you would still result in pagination before reaching this number of lines.

Hope this helps,
  Viz Kid

heaven

unread,
Oct 25, 2011, 7:17:53 AM10/25/11
to Google Visualization API
Hi, thank you very much, your response was very helpful for me.
Doesn't seems that maxLines: 5 take any effect:chart.draw(data, {     
width: 250,      height: 250,      fontSize: 12,      fontName:
'\'Droid Sans\', Arial, sans-serif',      colors: colors,     
pieSliceBorderColor: '#000',      legend: {position: 'bottom',
maxLines: 3},      legendTextStyle: {color: '#000', fontSize: 11},   
  pieSliceTextStyle: {color: '#fff'},      backgroundColor: {fill:
'#fff'},      chartArea: {top: 0, width: "85%", height: 125}    });But
I still got the scrolling.Also, you accidentally don't know, does
other charts have option like pieSliceBorderColor?
Thanks again,Alex

Viz Kid

unread,
Oct 25, 2011, 7:46:57 AM10/25/11
to google-visua...@googlegroups.com

It works for me. Take a look at this example: http://savedbythegoog.appspot.com/?id=4e84e903360abb20f2f3d71e9d2265c119689196
As I said, you need to have enough space to allow more than 1 line, and also, if the number of lines that fits there are not enough, you would still have paging (where each page has several lines).

I'm not sure what you meant by "if other charts has option like pieSliceBorderColor". PieChart is the only visualization which has pie slices :)

  Viz Kid

heaven

unread,
Oct 26, 2011, 6:35:37 AM10/26/11
to Google Visualization API
Haha, I mean that other graphs could have option like *BorderColor
(colBarBorderColor, etc) :)

About maxLines, it's really works when legend were placed at top, but
doesn't works when it placed at bottom. I've tested it here --
http://code.google.com/apis/ajax/playground/?type=visualization#pie_chart
with this attributes:
new
google.visualization.PieChart(document.getElementById('visualization')).draw(data,
{title: "So, how was your day?", width: 400, height: 500,legend:
{position: 'bottom', maxLines: 2}});

heaven

unread,
Oct 26, 2011, 6:58:50 AM10/26/11
to Google Visualization API
http://oi42.tinypic.com/30bd5i8.jpgBut it works if place it at top.

heaven

unread,
Oct 26, 2011, 8:42:53 AM10/26/11
to Google Visualization API
Also it should truncate labels only when there is not enough free
lines or if 1 label doesn't fit in row.
I tried to make whole graph higher, but it doesn't create a new line
and prefer to truncate the labels instead:
http://oi40.tinypic.com/ibjkig.jpg

On 26 окт, 13:58, heaven <aheave...@gmail.com> wrote:
> http://oi42.tinypic.com/30bd5i8.jpgButit works if place it at top.

Viz Kid

unread,
Oct 26, 2011, 8:51:13 AM10/26/11
to google-visua...@googlegroups.com

As I said before, we are not completely satisfies with this feature and you indicate yourself some reasons for it. This is why we haven't documented it yet and also haven't implemented it for bottom legend for example.

Regarding the border color, in the other charts we have no border for the elements so there is also no option to change its color.

  Viz Kid

heaven

unread,
Oct 27, 2011, 5:00:04 AM10/27/11
to Google Visualization API
Okay, I've placed the legend at the top and everything fine, my
problem has been resolved.
Thank you, google charts are awesome! ;)

On 26 окт, 15:51, Viz Kid <viz...@google.com> wrote:
> As I said before, we are not completely satisfies with this feature and you
> indicate yourself some reasons for it. This is why we haven't documented it
> yet and also haven't implemented it for bottom legend for example.
>
> Regarding the border color, in the other charts we have no border for the
> elements so there is also no option to change its color.
>
>   Viz Kid
>
>
>
>
>
>
>
> On Wed, Oct 26, 2011 at 2:42 PM, heaven <aheave...@gmail.com> wrote:
> > Also it should truncate labels only when there is not enough free
> > lines or if 1 label doesn't fit in row.
> > I tried to make whole graph higher, but it doesn't create a new line
> > and prefer to truncate the labels instead:
> >http://oi40.tinypic.com/ibjkig.jpg
>
> > On 26 окт, 13:58, heaven <aheave...@gmail.com> wrote:
> > >http://oi42.tinypic.com/30bd5i8.jpgButitworks if place it at top.
Reply all
Reply to author
Forward
0 new messages