ArrowFormat not showing

48 views
Skip to first unread message

Greg Sommerville

unread,
Jun 24, 2016, 11:22:53 AM6/24/16
to Google Visualization API
I've got some pretty simple code to use an ArrowFormat, but the arrows simply don't show up.  Anyone have an idea of what's wrong here?

    var rawArray = [
        ['Aardvarks', 12],
        ['Badgers', 16],
        ['Cougars', -22],
        ['Donkeys', 76],
        ['Elephants', 2]
    ];

    var data = google.visualization.arrayToDataTable(rawArray, true);

    var formatter = new google.visualization.ArrowFormat();
    formatter.format(data, 1);

    var options = {
        width: 300,
        showRowNumber: false,
        allowHtml: true
    };

    var chart = new google.visualization.Table(document.getElementById('divChart'));
    chart.draw(data, options);


Daniel LaLiberte

unread,
Jun 25, 2016, 6:00:27 PM6/25/16
to Google Visualization API
Hi Greg,

The format.css is not being loaded properly in recent versions.  Sorry about that, and thanks for reporting it.  

You can work around this by changing 'current' to '42', or you can explicitly load the format.css file by adding this to your html:  

  <link  rel="stylesheet" type="text/css"     href="https://www.gstatic.com/charts/44/css/util/format.css"/>


--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/c4cf8233-dfb1-420e-8223-138936a20d95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Greg Sommerville

unread,
Jun 27, 2016, 8:19:37 PM6/27/16
to Google Visualization API
Thanks.  The advice about using an older version definitely helped.

Just for reference, I saw the following problems in the 'current' version:
- NumberFormat did not display colored text for a negative number, even though I specified negativeColor: 'red'
- ArrowFormat did not display arrows
- BarFormat did not display bars

-Greg


On Saturday, June 25, 2016 at 6:00:27 PM UTC-4, Daniel LaLiberte wrote:
Hi Greg,

The format.css is not being loaded properly in recent versions.  Sorry about that, and thanks for reporting it.  

You can work around this by changing 'current' to '42', or you can explicitly load the format.css file by adding this to your html:  

  <link  rel="stylesheet" type="text/css"     href="https://www.gstatic.com/charts/44/css/util/format.css"/>

On Fri, Jun 24, 2016 at 11:22 AM, Greg Sommerville <gregsomm...@gmail.com> wrote:
I've got some pretty simple code to use an ArrowFormat, but the arrows simply don't show up.  Anyone have an idea of what's wrong here?

    var rawArray = [
        ['Aardvarks', 12],
        ['Badgers', 16],
        ['Cougars', -22],
        ['Donkeys', 76],
        ['Elephants', 2]
    ];

    var data = google.visualization.arrayToDataTable(rawArray, true);

    var formatter = new google.visualization.ArrowFormat();
    formatter.format(data, 1);

    var options = {
        width: 300,
        showRowNumber: false,
        allowHtml: true
    };

    var chart = new google.visualization.Table(document.getElementById('divChart'));
    chart.draw(data, options);


--
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 google-visualization-api+unsub...@googlegroups.com.



--
Reply all
Reply to author
Forward
0 new messages