How to Change font color of the title in an option as variable?

35 views
Skip to first unread message

zeeshan...@gmail.com

unread,
Jun 27, 2016, 1:38:05 AM6/27/16
to Google Visualization API
Enter code here.
var data4 = google.visualization.arrayToDataTable([
          ['Passion to Succeed', 'Percentage'],
          ['Achieved Percentage',    <?php echo $p_t_sPer; ?>],
          ['',      (<?php echo 100 - $p_t_sPer; ?>)],
          
        ]);     


var options4 = {
          title: 'Passion To Succeed',
          legend: {position: 'bottom'},
          backgroundColor: '',
          titleFontSize:'14',
          slices: {
            0: { color: '#8DC540' },
            1: { color: 'transparent' }
          }

As here, i want to change font color of the title : 'Passion to Succeed'. how can i? it appears black by default

perspektive42

unread,
Jun 27, 2016, 9:07:27 AM6/27/16
to Google Visualization API
Assuming you're using a Pie Chart: Fill in the titleTextStyle object in the options object.

zeeshan...@gmail.com

unread,
Jun 28, 2016, 1:53:06 AM6/28/16
to Google Visualization API
@perspektive42  Thanks. It works :)
Reply all
Reply to author
Forward
0 new messages