change the colors of data array in combo chart

63 views
Skip to first unread message

Mai Mostafa

unread,
May 6, 2014, 9:07:26 PM5/6/14
to google-visua...@googlegroups.com
I used role:'style' to change the colors of combo chart's bars but I want to remove the small blue rectangle 
i tried to use annotations.boxStyle but nothig happened 

also the font-size of numbers of Vaxis is not the same 

var data = google.visualization.arrayToDataTable([
         
          ['Status', 'Number Of Students', { role:'style' }],
          ['Pass', 10,style='fill-color: #109618'],
          ['Pending', 14,style ='fill-color: #ff9900'],
          ['Fail', 16,style ='fill-color:#dc3912;'],
         
        ]);

problem.png

Andrew Gallant

unread,
May 6, 2014, 11:07:50 PM5/6/14
to google-visua...@googlegroups.com
Set the legend.position option to "none" to remove the legend (which is what the blue box [the default color of that data series] is part of).

Mai Mostafa

unread,
May 15, 2014, 2:43:30 AM5/15/14
to google-visua...@googlegroups.com
 i set it to noun but the blue box is still there
any way thank u :)

i tried another way to change the color of both bars and rectangles 
var data = google.visualization.arrayToDataTable([
         
        
          ['Staus','Pass', 'Pending', 'Fail'],
          [ ,10, 40,30],
       
        ]);

        var options = {
            title: 'Status',
            vAxis: { title: "Test Scenarios"},
            hAxis: { title: "Test Result" },
            bar:   { groupWidth:'30%'},
            seriesType: "bars",
            chartArea: { width: '20%', height: '60%' },
            colors: ['#109618', '#ff9900', '#dc3912']
          legend
        };




--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/g-XUapYEHA8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Andrew Gallant

unread,
May 15, 2014, 10:56:53 AM5/15/14
to google-visua...@googlegroups.com
It should be:


var options = {
    title: 'Status',
    vAxis: { title: "Test Scenarios"},
    hAxis: { title: "Test Result" },
    bar: { groupWidth:'30%'},
    seriesType: "bars",
    chartArea: { width: '20%', height: '60%' },
    colors: ['#109618', '#ff9900', '#dc3912'],
    legend: 'none'
};
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages