JavaScript How can I make the font data BOLD for data titles on the horizontal axis in google charts?

The help that I received from other users on this forum didn't help at all ... I have a chart that is generated through google charts API on this link http://imageshack.us/f/9/capturesfn.png/

However, the titles of the data on this column chart are so small and hard to read .. How can I make it so those labels on the horizontal axis can be bold and the fonts can be changed ??? The answers I got didn't help

Below I did this but it doesnt seem to work .. where I am going wrong ? the data labels on the horizontal axis stay the same

 var options = {width: 1200, height: 800, hAxis: {textStyle: {color: 'black', fontName: 'Arial Black',fontSize: 35},is3D: true,title: 'Orders'};
chart.draw(dataTable, options);
Answer:1

Original answer:

var options = {
  hAxis: {textStyle: {
    color: 'black', 
    fontName: 'Arial Black', 
    fontSize: 16
  };

chart.draw(data, options)

Might be of some help...

EDIT Full example (can be found at http://www.floris.us/SO/boldChart.html as well):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Bold font demo</title>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <link rel="stylesheet" type="text/css" target='_blank' href="http://fonts.googleapis.com/css?family=Chango">
    <script>
      google.load("visualization", "1", {packages:["corechart"]});

      function plotChart(){
        // create some dummy data
        var myData = [["x","y"],[1,1],[2,2],[3,3],[4,4],[5,2]];
        // turn it into a table:
        var myChartData = google.visualization.arrayToDataTable(myData);
        // create the empty charts:
        var normalPlot = new google.visualization.ScatterChart(document.getElementById('normalChart'));
        var boldPlot = new google.visualization.ScatterChart(document.getElementById('boldChart'));    

        // create options for chart with bold labels:
        var chartOptionsBold = {
          title: 'Chart with bold x labels',
          titleTextStyle: {color: 'blue', fontName: 'Arial', fontSize: '18', fontWidth: 'normal'},
          hAxis: {title: 'x', 
            textStyle: {
            fontName: 'Chango', 
            }
          },
          vAxis: {title: 'y values'},
          lineWidth: 1,
          pointSize: 2
        };

        var chartOptionsNormal = {
          title: 'Chart with default axis labels',
          titleTextStyle: {color: 'black', fontName: 'Arial', fontSize: '18', fontWidth: 'normal'},
          hAxis: {title: 'x'},
          vAxis: {title: 'y'},
          lineWidth: 1,
          pointSize: 2
        };

        normalPlot.draw(myChartData, chartOptionsNormal);
        boldPlot.draw(myChartData, chartOptionsBold);

      };
    </script>
    <style>
      div.graphBox {
        height: 400px; width: 600px; 
      }
    </style>
  </head>

  <body onload="plotChart()">
  <div class="graphBox", id="normalChart">Normal chart goes here</div>
  <div class="graphBox", id="boldChart">Bold chart goes here</div>

  </body>
</html>

Screen shot of output:

enter image description here

As you can see, it is possible to change the properties of the axis labels with the example given. I did this with a Safari browser version 6.0.3; also tested with Firefox 21.0 (both on Mac). Also tested on iPhone - similar results.

Further Edit

You can make sure that the font you choose is available to the browser using something like this in the header:

<link rel="stylesheet" type="text/css" target='_blank' href="http://fonts.googleapis.com/css?family=Chango">

This particular example makes the font "Chango" available. It is a very heavy font, and thus would "bold" your text quite nicely. Obviously, you need to adjust your hAxis textStyle to match whatever font you chose. You can find a selection of fonts at http://www.google.com/fonts/

Answer:2

I am using sails.js to create a tag system that has many-to-many relations with an entity called Post. The way I am doing the association is to use a database table to correlate each tagId with the ...

I am using sails.js to create a tag system that has many-to-many relations with an entity called Post. The way I am doing the association is to use a database table to correlate each tagId with the ...

  1. using lib async

Question Is it possible to know if the function was fired by a user event or an async event (like callback) without having the original event parameter? Background I'm trying to determine the event ...

Question Is it possible to know if the function was fired by a user event or an async event (like callback) without having the original event parameter? Background I'm trying to determine the event ...

  1. javascript know event listeners

I am an Admin of a Google Spreadsheet. Several times a week me and other admins have to add new users to the spreadsheet so I thought it would be easier if we could use a custom HTML dialog to do so. ...

I am an Admin of a Google Spreadsheet. Several times a week me and other admins have to add new users to the spreadsheet so I thought it would be easier if we could use a custom HTML dialog to do so. ...

How can I determine if a string contains one of the values from an array? For example: var a = ["abc","def","ghi"]; var s = "jskljfdkljflkjk abc jskfdjklsj"; for(var i=0;i<a.length;i++){ if(...

How can I determine if a string contains one of the values from an array? For example: var a = ["abc","def","ghi"]; var s = "jskljfdkljflkjk abc jskfdjklsj"; for(var i=0;i<a.length;i++){ if(...

  1. array values exist php
  2. array_values exist
  3. javascript array values exists