Google Charts 'upcoming' release of v46

2,148 views
Skip to first unread message

Daniel LaLiberte

unread,
Aug 29, 2017, 2:46:42 PM8/29/17
to Google Visualization API, charts-announce

You can now load Google Charts version '46' by loading 'upcoming'.  Please test this version and let us know if you experience any new problems.  


At this time, 'current' is still '45.2'.  You can continue to load version '45.2' by specifying that version.

Anticipated production release date: Sept 19

  On this date, loading 'current' or 'upcoming' will load '46'. 

This version includes a few bug fixes, but primarily, there are many changes to the gridlines and tick generation for corecharts.


Summary of changes for v46:


  • Corecharts
    • All gridline and tick generation now computes the number of gridlines based on other options (see below).  If you specify a number for gridlines.count, it will only be used as an approximation. 
    • Minor gridlines are even more dynamic since the appropriate number of minor gridlines depends on the interval between the major gridlines.  The default for numeric axes is no minor gridlines, but for dates and times, minor gridlines may be shown if they fit. Specify '{ minorGridlines: { count: 0 }}' to force no minor gridlines, or '{ minorGridlines: { count: 1 }}' to enable minor gridlines if they fit.
    • New 'gridlines.minSpacing' option lets you specify the minimum screen space between major gridlines in pixels.  Default is 40 for linear scales, 15 for log scales.
    • New 'gridlines.interval' option lets you specify an array of sizes of the gridlines as data values. The default for linear scales is { interval: [1, 2, 2.5, 5] } means the gridline values can fall on every unit (1), on even units (2), or on multiples of 2.5 or 5.  Any power of 10 of these values are also considered.   For log scales, the default is [1, 2, 5]. This option is only for numeric axes at this time, and it is analogous to the 'gridlines.units.<unit>.interval' options which is used only for dates and times.
    • Currently, the minor gridline minimum spacing and intervals are determined automatically. These will probably be customizable in the future.
    • Gridlines will usually be rejected if formatted tick labels for numbers are duplicated, so you can specify 'format:"#"' to only show integer ticks without risking generation of duplicate ticks.  But if all alternatives fail, the best case will still be used.  
    • New 'viewWindow.maxMargin' lets you specify the maximum screen space before or after the data range, in percentage of the data range (as a string, e.g. '50%') or number of pixels.  The default is 30%.  Note that the data might extend beyond the first or last gridline occasionally, if it is not too much.
    • The timeofday formatting is fixed to use 24 hour (HH) values for the hours by default instead of 12 hour (hh) values. 
    • Many changes to the log scale and mirror log scale are included in this release.
    • Fix for explorer mode which was disabled after the first redraw.

--

Daniel LaLiberte

unread,
Sep 6, 2017, 4:23:46 PM9/6/17
to Google Visualization API, charts-announce
I have updated the 'upcoming' v46 release.   Please try it and post any problems or questions.

Here are the updates (and some additional previous changes).
  • Corecharts
    • The main visible change is that I renamed the 'viewWindow.maxMargin' option to 'viewWindow.maxPadding'.  
    • Fixed explorer mode interference with ScatterChart.
    • Fixed ChartWrapper refreshInterval to actually refresh.
    • Trendline equations now use column labels instead of just 'x' and 'y'.
  • Histogram chart
    • Domain axis gridlines and baseline default color is 'none'.
    • Target axis ticks default format is now '#'.
  • ColumnChart and BarChart
    • Fixed detection of minimum bar size (the difference between adjacent values) to work with dates and times.
  • Table
    • Support 'className' property for rows.

Daniel LaLiberte

unread,
Sep 19, 2017, 1:36:40 PM9/19/17
to Google Visualization API, charts-announce
The 'current' version of Google Charts is now '46'.   Post if you notice any problems.

Note that you continue using the previous version by changing 'current' to '45.2'.

David Burton

unread,
Sep 20, 2017, 1:20:58 AM9/20/17
to Google Visualization API
Yikes!  Version 46 horribly mangled my graphs!

Thank you, Daniel, for telling us how to use the old version, by changing:

google.charts.load('current', {'packages':['corechart']});

to:

google.charts.load('45.2', {'packages':['corechart']});

It's 1 a.m. here. I didn't want to spend all night trying to fix my site. Loading the old version is a quick solution, for now.

Here's an example of what went wrong in 46.

First, here's a graph drawn with version 45.2:

http://sealevel.info/MSL_graph.php?id=Sydney
(Nice and pretty.)

Now, here's the same graph drawn with version 46:
http://sealevel.info/MSL_graph1.php?id=Sydney
(Mangled!)

Dave

--



--



--

Daniel LaLiberte

unread,
Sep 20, 2017, 9:08:09 AM9/20/17
to Google Visualization API
Hi David,

Thanks for reporting this, with pointers to your pages.  The main thing that is causing problems here is that the explicit ticks behavior has changed to not assume your viewWindow min and max are the first and last tick values, but instead, nice viewWindow bounds are found, and then your ticks are applied.  I think you can fix most of the problem here by adding viewWindow min and max values, set to your first and last tick values.

I will probably restore the previous behavior of explicit ticks.  There is not much point in what it is doing now since the nice viewWindow values will not matter much if you can't see them.  The exception is the expansion to include the baseline value if it is close enough.

The other problem is the horizontal axis.  The 'showTextEvery: 2' option is being ignored.  But also, most of your tick values are ignored for ticks, though used for gridlines. 

I guess we don't have enough tests regarding explicit ticks.  I'll probably rollback the release, but I want to let others report problems first.  It seems hardly anyone is testing the 'upcoming' version.

--
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.
To post to this group, send email to google-visualization-api@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/6fe6b7b2-c969-4a13-a98a-f1ef171c8c6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel LaLiberte

unread,
Sep 20, 2017, 12:25:59 PM9/20/17
to Google Visualization API, charts-announce
I have rolled back the release of '46', so 'current' is now (again) '45.2'.

You can continue testing the 'upcoming' version ('46'), which I hope people will do more of before the actual release.

To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com.
--

David Burton

unread,
Sep 20, 2017, 1:13:15 PM9/20/17
to Google Visualization API
On Wednesday, September 20, 2017 at 12:25:59 PM UTC-4, Daniel LaLiberte wrote:
I have rolled back the release of '46', so 'current' is now (again) '45.2'.

Thanks, but it doesn't seem to have "taken."  The current version still seems to be 46.

Here's "current" version:
http://sealevel.info/MSL_graph_v_current.php?id=Sydney




 

You can continue testing the 'upcoming' version ('46'), which I hope people will do more of before the actual release.

Thanks. Until last night I wasn't even aware of the 'upcoming' option.

I'll try to fix my code to work with 46 this evening. I'll let you know how it goes.


Regards,
Dave

Daniel LaLiberte

unread,
Sep 20, 2017, 1:31:12 PM9/20/17
to Google Visualization API
It may take an hour to update due to caching.  Looks like 'current' is correct now.

--
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.

For more options, visit https://groups.google.com/d/optout.

David Burton

unread,
Sep 20, 2017, 1:39:25 PM9/20/17
to Google Visualization API
Yes, it's back to 45.2 behavior, now.  Thanks!

Is there a way to check the version number, in javascript?

Dave



On Wednesday, September 20, 2017 at 1:31:12 PM UTC-4, Daniel LaLiberte wrote:
It may take an hour to update due to caching.  Looks like 'current' is correct now.

Daniel LaLiberte

unread,
Sep 20, 2017, 1:55:51 PM9/20/17
to Google Visualization API
There is an undocumented way to check the version number:  google.visualization.Version

--
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.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

David Burton

unread,
Sep 20, 2017, 3:36:46 PM9/20/17
to Google Visualization API
Merci!

John Wood

unread,
Sep 22, 2017, 7:20:52 AM9/22/17
to Google Visualization API
Looks like slanted text doesn't work in 46:

Manmohan Soni

unread,
Oct 11, 2017, 7:56:24 AM10/11/17
to Google Visualization API
Do this charts also work on Android platform on native apps.?
Is there any google api for the same..?

Michal Patera

unread,
Oct 20, 2017, 5:48:25 AM10/20/17
to Google Visualization API
Hello I have some problem with last column in the bar graph, it should be bigger thn it actually is. Could you please check it? https://jsfiddle.net/wnzyvftn/

Dne úterý 29. srpna 2017 20:46:42 UTC+2 Daniel LaLiberte napsal(a):

Daniel LaLiberte

unread,
Oct 20, 2017, 8:36:28 AM10/20/17
to Google Visualization API
Hi Michal,

You are actually using the current version, which is still 45.2.

It is not clear what you mean by a problem with the last column.  I would think all columns have the same problem.  Perhaps you want to include 0 in your chart, which you can do by adding a minValue option.  

  'vAxis': { 'minValue': 0 }


--
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.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

For more options, visit https://groups.google.com/d/optout.

Michal Patera

unread,
Oct 20, 2017, 9:34:23 AM10/20/17
to Google Visualization API
hello Daniel,
thank you for help, vaxis is the way.

P.S. I was using this graph for some time and it looked good for some values (for example 200 in the last column) without Vaxis https://jsfiddle.net/wnzyvftn/3/ but few days ago the value has increased and the graph did not start at zero. I was writing it by some example, so my mistke. Thanks again.

Dne pátek 20. října 2017 14:36:28 UTC+2 Daniel LaLiberte napsal(a):
To post to this group, send email to google-visua...@googlegroups.com.



--

Ajinkya Loke

unread,
Nov 23, 2017, 12:36:55 AM11/23/17
to Google Visualization API
I have started using Googlecharts for my sharepoint site and using javascript I am trying to display charts.
I am current not able to customize it if I want to change the colors of the bars or even legend on the left. I am not able to do that inspite of providing it in the options parameter.
Not sure abt the issue. Can anyone guide. Default color scheme and legend on right is displayed well. but no customization works
Here is my code.

<script src="https://www.gstatic.com/charts/loader.js" type="text/javascript"></script>
<script type="text/javascript">
 google.charts.load('current', {'packages':['bar','line']});
 google.charts.setOnLoadCallback(visualizeData);
function visualizeData() { 
var data1 = new google.visualization.DataTable();
 data1.addColumn('string', 'Weekly Status');
 data1.addColumn('number', 'AL 2');
 data1.addColumn('number', 'AL 3');
 data1.addColumn('number', 'AL 4');
 data1.addColumn('number', 'AL 5');
for (var i=SummALDate.length-1; i>=0; i--)
         {
 var row1 = [];
 row1.push(SummALDate[i]);
 row1.push(SummAL2[i]);
 row1.push(SummAL3[i]);
 row1.push(SummAL4[i]);
 row1.push(SummAL5[i]);
 data1.addRow(row1);
}

   
var options123 = {
  legend:'left',
  title:'My Big Chart',
  'is3D':true,
  'width':400,
  'height':300
}
 var barChart = new google.charts.Bar(document.getElementById('BarChart'));
 
 barChart.draw(data1, options123);
</script>
Message has been deleted

Daniel LaLiberte

unread,
Jan 21, 2018, 3:44:18 PM1/21/18
to Google Visualization API
I've updated v46 (aka 'upcoming') with the following changes, in addition to the previously announced changes:
  • Corecharts
    • Rename viewWindow.maxMargin to viewWindow.maxPadding.
    • Fix defaults for Histogram domain axis gridlines and baselineColor, and targetAxis should display integers with format: '#'
    • Add options for gridlines.multiple and minorGridlines.multiple, such that gridline and ticks values must be a multiple of this option's value.  E.g. To force ticks to be integers, specify gridlines.multiple = 1.
    • Change axis tick and gridline generation to allow tighter packing of ticks that don't overlap.
      • Allow negative slanted angle, to slant the 'other' way.  
      • Disable skipping and alternating (i.e. multiple staggered lines) for dates and times, by default.
    • Expand viewWindow to include explicit ticks, if outside the data range.  Explicit viewWindow min or max options can override.  This is a change to the previous behavior which acted more like 'maximized' mode with explicit ticks.
    • Fix polynomial trendlines to fail silently if there is no data.
    • Add option to specify legend default page index (legend.pageIndex). 
    • Add event (legendpagination) to receive updates of legend pagination changes; data given to event handler is         'currentPageIndex' and 'totalPages'.
  • Table
    • Add user specified column and cell className properties to default properties (rather than replace them), similar to row properties.
  • Data
    • Fix the data.group function to fix multiple aggregations using the same column.

Please try this version out and post any new problems you encounter, particularly with the axis ticks and gridlines.  If this appears to be stable I will try again in a couple weeks to push it to 'current'.



On Fri, Jan 12, 2018 at 10:21 AM, Sean Larson <industr...@gmail.com> wrote:
Ajinkya, your option123 is not configured correctly. Try:

var options = { 
title: 'My Big Chart', 
width: 400,
height: 300,
legend: { position: 'left' }
}

I am not sure which charts support 3d, look in the reference documents, https://developers.google.com/chart/interactive/docs/gallery/barchart

--
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.
To post to this group, send email to google-visualization-api@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

François

unread,
Jan 26, 2018, 8:36:39 AM1/26/18
to Google Visualization API
Neither the hAxis.format nor the hAxis.gridlines.units.<unit>.format option works with version 46.

François

unread,
Jan 26, 2018, 11:24:13 AM1/26/18
to Google Visualization API
More issues with version 46.

I define 4 ticks for gridlines. I set gridlines color to red and minorGridlines to blue to demonstrate.
With version 45.2 I get what is expected:


I change the version to 46:



On Tuesday, August 29, 2017 at 8:46:42 PM UTC+2, Daniel LaLiberte wrote:

Tri Do

unread,
Mar 12, 2018, 7:30:10 PM3/12/18
to Google Visualization API
I am sure it is a right email thread. Can someone give me a hint how to insert text/html in the treemap leave node or block?

Thanks,
-Tri

Greg Slocum

unread,
Aug 23, 2018, 3:43:20 PM8/23/18
to Google Visualization API
Noticed that you'd commented on someone's question on dual y charts, so I'm hoping you can help with this.

I have a chart with units and dollars on separate axis.  One is a constant times the other, so the lines fall close to on top of each other.  I want to set the scale on one of the axes in order to offset the lines.  Tried a couple of things, but can't figure out how to use the viewWindow with two axes:

      var options = {
        chart: {
title:           'Inventory versus Safety Stock Level for , , at ',
subtitle:           'in Base Unit of Measure'
        },
        width: 900,
        height: 500,
           series: {
               0: {targetAxisIndex: 0},
               1: {targetAxisIndex: 0},
               2: {targetAxisIndex: 1},
               3: {targetAxisIndex: 1}
                   },
//    viewWindowMode: 'explicit',
//        0: viewwindow: {
//    max: 1000,
//    min: 0
//   },
           vAxes: {
               0: {title: 'Units (BUn)'},
               1: {title: 'Vaue (USD)'}
                   },
           hAxis: {
           format:             'M/d/yy',
                       gridlines: {count: 15}
                     }
      };
Removing the //'s cause the chart not to display.


On Wednesday, September 20, 2017 at 1:31:12 PM UTC-4, Daniel LaLiberte wrote:
It may take an hour to update due to caching.  Looks like 'current' is correct now.
On Wed, Sep 20, 2017 at 1:13 PM, David Burton <ncdav...@gmail.com> wrote:
On Wednesday, September 20, 2017 at 12:25:59 PM UTC-4, Daniel LaLiberte wrote:
I have rolled back the release of '46', so 'current' is now (again) '45.2'.

Thanks, but it doesn't seem to have "taken."  The current version still seems to be 46.

Here's "current" version:
http://sealevel.info/MSL_graph_v_current.php?id=Sydney




 

You can continue testing the 'upcoming' version ('46'), which I hope people will do more of before the actual release.

Thanks. Until last night I wasn't even aware of the 'upcoming' option.

I'll try to fix my code to work with 46 this evening. I'll let you know how it goes.


Regards,
Dave

--
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.
To post to this group, send email to google-visua...@googlegroups.com.



--
214-187-RM.htm

Daniel LaLiberte

unread,
Aug 23, 2018, 3:51:45 PM8/23/18
to Google Visualization API
Each axis gets its own viewWindow options.  So add one viewWindow option in each of the two vAxes.

vAxes: {
    0: {viewWindow: {min: .., max: ...},
    1: {viewWindow: {min: .., max: ...},
 }

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.



--

--
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.

For more options, visit https://groups.google.com/d/optout.


--

Greg Slocum

unread,
Aug 25, 2018, 10:09:28 AM8/25/18
to Google Visualization API
Can you guide me on the syntax for multiple options for the axes?

vAxes: {
      0: {title: 'Units', viewWindow: {min: 0, max: 400},
      1: {title: 'Dollars', viewWindow: {min: 0, max: 20000},
?
Commas in between or not?  Another closing bracket or not?

Can't seem to make it work.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@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.



--

--
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.


--

Greg Slocum

unread,
Aug 25, 2018, 4:18:19 PM8/25/18
to Google Visualization API
got it - it was under the hAxis configuration options:

           vAxes: {
               0: {title: 'Units (BUn)',
     viewWindow: {
   min: 0, max: 50

    }
    },
               1: {title: 'Vaue (USD)',
     viewWindow: {
   min: 0, max: 5500
    }
    }
                   },
Reply all
Reply to author
Forward
0 new messages