1 2 /** 3 * @fileoverview Simple column chart implementation. 4 * @version 1.0.1 5 * @see https://google.github.io/styleguide/jsguide.html 6 * @see https://github.com/google/closure-compiler/wiki 7 */ 8 9 10 11 /** 12 * ColumnChart constructor. 13 * @param {string|Element} container The HTML container. 14 * @constructor 15 * @extends {charts.BarChart} charts.BarChart 16 * @example 17 * <b>var</b> chart = <b>new</b> charts.ColumnChart('container_id'); 18 * chart.draw([['Year', 'Sales', 'Expenses', 'Profit'], 19 * [2011, 80, 30, 45], [2012, 65, 130, 90], [2013, 45, 100, 60]]); 20 * 21 * <div id="chart-container" 22 * style="width: 560px; height: 200px; margin: 0 0 20px 20px;"></div> 23 * <script src="https://greylock.js.org/greylock.js"></script> 24 * <script> 25 * var chart = new charts.ColumnChart('chart-container'); 26 * chart.draw([['Year', 'Sales', 'Expenses', 'Profit'], 27 * [2011, 80, 30, 45], [2012, 65, 130, 90], [2013, 45, 100, 60]]); 28 * </script> 29 */ 30 charts.ColumnChart = function(container) { 31 charts.BarChart.apply(this, arguments); 32 33 /** 34 * @private 35 */ 36 function init_() { 37 self_.defaults['direction'] = charts.Grid.DIRECTION.BOTTOM_TO_TOP; 38 } 39 40 /** 41 * The reference to current class instance. Used in private methods. 42 * @type {!charts.ColumnChart} 43 * @private 44 */ 45 var self_ = this; 46 47 init_(); 48 }; 49 50 // Export for closure compiler. 51 charts['ColumnChart'] = charts.ColumnChart; 52