BarGraph Stacked Percent Values - Can't change color o legend

15 views
Skip to first unread message

Luís Cláudio Veiga

unread,
Nov 1, 2017, 11:55:14 AM11/1/17
to Google Visualization API
Hello Guys,

i really appreciate if someone can find the answer for my issue. At the following lines, I want to use  transparent background(comment), and the html body background is black. The bar's legend showing on "$data_x" is also black by default.
How can I change the color of the legend bellow each bar ? 

      function drawChart() {
        var data = google.visualization.arrayToDataTable([

          ['Data', 'Invites Exceed', 'Chamadas NOk', 'Chamadas OC/NR', 'Chamadas Ok', 'Erro 500', {role:'style'}],

          ['$data_7', $str37, $str27, $str47, $str17, $str67, '#991010'],
          ['$data_6', $str36, $str26, $str46, $str16, $str66, '#991010'],
          ['$data_5', $str35, $str25, $str45, $str15, $str65, '#991010'],
          ['$data_4', $str34, $str24, $str44, $str14, $str64, '#991010'],
          ['$data_3', $str33, $str23, $str43, $str13, $str63, '#991010'],
          ['$data_2', $str32, $str22, $str42, $str12, $str62, '#991010'],
          ['$data_1', $str31, $str21, $str41, $str11, $str61, '#991010']
        ]);

        var options_fullStacked = {

          isStacked: 'percent',
            width: 1100,
            height: 550,

          // backgroundColor: 'transparent',   <- I need transparent here, but when set it, the bar legends disapear, same color

          textStyle: {color: '#ffffff'}, showColorCode: true,
          legend: {textStyle: {color: '#a00010'}, position: 'none'},

          vAxis: {
            textStyle: {color: 'white'}, showColorCode: true,
            title: 'Percentual',                                              <-- How to change the text color of title here ?
            minValue: 0,
            ticks: [0, 0.1, 0.2, 0.3, 0.4, 0.5 , 0.6, 0.7, 0.8, 0.9, 1]
          },
        };



Best Regards,
Luis Veiga
Reply all
Reply to author
Forward
0 new messages