Index: /sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
===================================================================
--- /sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php (revision 12097)
+++ /sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php (revision 12098)
@@ -100,5 +100,5 @@
if ( get_query_var( 'plugin_advanced' ) ) {
wp_enqueue_script( 'google-charts-loader', 'https://www.gstatic.com/charts/loader.js', array(), false, true );
- wp_enqueue_script( 'wporg-plugins-stats', get_stylesheet_directory_uri() . '/js/stats.js', array( 'jquery', 'google-charts-loader' ), '20210329b', true );
+ wp_enqueue_script( 'wporg-plugins-stats', get_stylesheet_directory_uri() . '/js/stats.js', array( 'jquery', 'google-charts-loader' ), '20220929', true );
wp_localize_script( 'wporg-plugins-stats', 'pluginStats', array(
@@ -107,5 +107,4 @@
'date' => __( 'Date', 'wporg-plugins' ),
'downloads' => __( 'Downloads', 'wporg-plugins' ),
- 'growth' => __( 'Growth', 'wporg-plugins' ),
'noData' => __( 'No data yet', 'wporg-plugins' ),
'today' => __( 'Today', 'wporg-plugins' ),
Index: /sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/js/stats.js
===================================================================
--- /sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/js/stats.js (revision 12097)
+++ /sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/js/stats.js (revision 12098)
@@ -43,62 +43,4 @@
viewWindowMode: 'explicit',
viewWindow: { min: 0 }
- },
- bar: { groupWidth: ( data.getNumberOfRows() > 100 ? '100%' : null ) },
- height: 350,
- curveType: 'function',
- trendlines: {
- 0: {
- type: 'linear',
- color: '#ffc733',
- lineWidth: 1,
- opacity: 0.4,
- showR2: false,
- visibleInLegend: false,
- tooltip: false,
- }
- }
- } );
- } );
- } );
-
- $.getJSON('https://api.wordpress.org/stats/plugin/1.0/active-installs.php?slug=' + settings.slug + '&limit=267&callback=?', function( downloads ) {
- google.charts.setOnLoadCallback( function() {
- var data = new google.visualization.DataTable(),
- count = 0,
- sml;
-
- data.addColumn( 'date', settings.l10n.date );
- data.addColumn( 'number', settings.l10n.growth );
-
- $.each( downloads, function( key, value ) {
- data.addRow();
- data.setValue( count, 0, new Date( key ) );
- data.setValue( count, 1, Number( value ) );
- count++;
- } );
-
- var formatter = new google.visualization.NumberFormat({pattern: '#,###.##\'%\''});
- formatter.format(data, 1); // format column 1
-
- sml = data.getNumberOfRows() < 36;
-
- new google.visualization.LineChart( document.getElementById( 'plugin-growth-stats' ) ).draw( data, {
- colors: ['#253578'],
- legend: { position: 'none' },
- titlePosition: 'in',
- axisTitlesPosition: 'in',
- chartArea: {
- height: 280,
- left: ( sml ? 50 : 0 ),
- width: ( sml ? 482 : '100%' )
- },
- hAxis: {
- textStyle: { color: 'black', fontSize: 9 },
- format: 'MMM y'
- },
- vAxis: {
- format: '#.##\'%\'',
- textPosition: ( sml ? 'out' : 'in' ),
- viewWindowMode: 'pretty',
},
bar: { groupWidth: ( data.getNumberOfRows() > 100 ? '100%' : null ) },