Hey all.  I'm having troubles with the Google Chart - Gantt code.

I have also noticed that the fontColor doesn't seem to work.  It doesn't 
break anything, but it doesn't change the color, either.

I made a fiddle:  https://jsfiddle.net/no49xzkd/

Here's my source code:
<html>
<head>
  <script type="text/javascript" 
src="https://www.gstatic.com/charts/loader.js";></script>
  <script type="text/javascript">
    google.charts.load('current', {'packages':['gantt']});
    google.charts.setOnLoadCallback(drawChart);

    function daysToMilliseconds(days) { return days * 24 * 60 * 60 * 1000;  
}

    function drawChart() {
      var data = new google.visualization.DataTable();
      data.addColumn('string', 'Task ID');
      data.addColumn('string', 'Task Name');
      data.addColumn('string', 'Resource');
      data.addColumn('date', 'Start Date');
      data.addColumn('date', 'End Date');
      data.addColumn('number', 'Duration');
      data.addColumn('number', 'Percent Complete');
      data.addColumn('string', 'Dependencies');

      data.addRows([
          ["20E1EB9656C9", "Admin", "3F79DBE5", new Date (2021, 10, 6), 
null, 243000000, 0, null]
        , ["BCF1D33486DA", "Task2", "3F79DBE5", new Date (2021, 10, 7), 
null, 21600000, 0, null]
        , ["8AC89CD0F30C", "Task3", "3F79DBE5", new Date (2021, 10, 6), 
null, 108000000, 0, null]
        , ["A239BA5A4375", "Task4", "3F79DBE5", new Date (2021, 10, 11), 
null, 69120000, 0, null]
]);
      var options = {
        height: 350,
        gantt: {
          criticalPathEnabled: false,
          innerGridHorizLine: {
                stroke: '#ffe0b2',
                strokeWidth: 2
            },
            innerGridTrack: {fill: '#fff3e0'},
            innerGridDarkTrack: {fill: '#ffcc80'},
            labelStyle: {
              fontName: 'Tahoma',
              fontSize: 18,
              color: '#ffffff'
            }
          } 
      };

      var chart = new 
google.visualization.Gantt(document.getElementById('chart_div'));

      chart.draw(data, options);
    }
  </script>
</head>
<body>
  <div id="chart_div"></div>
</body>
</html>
  


-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/fe608c9f-b5b9-42dc-a328-45cc4b1538a9n%40googlegroups.com.

Reply via email to