Siendo nuevo en todo esto quiero que me ayuden a entender como puedo "transformar" los ejemplos de google code, especificamente "Visualizations", ( http://code.google.com/apis/ajax/pla...d/#combo_chart ) que sirven para graficar datos. El punto es que tengo una tabla en MySQL pero no se como llevarla a los ejemplos. No se si me doy a entender, aqui hay un ejemplo de codigo:
Código:
Puede alguien explicarme como llevo mi tabla .sql a un paralelo de este ejemplo? si alguien pudiera hacerme un ejemplo guia lo agradeceria en el alma.function drawVisualization() { // Some raw data (not necessarily accurate) var rowData = [['Month', 'Bolivia', 'Ecuador', 'Madagascar', 'Papua Guinea', 'Rwanda', 'Average'], ['2004/05', 165, 938, 522, 998, 450, 614.6], ['2005/06', 135, 1120, 599, 1268, 288, 682], ['2006/07', 157, 1167, 587, 807, 397, 623], ['2007/08', 139, 1110, 615, 968, 215, 609.4], ['2008/09', 136, 691, 629, 1026, 366, 569.6]]; // Create and populate the data table. var data = google.visualization.arrayToDataTable(rowData); // Create and draw the visualization. var ac = new google.visualization.ComboChart(document.getElementById('visualization')); ac.draw(data, { title : 'Monthly Coffee Production by Country', width: 600, height: 400, vAxis: {title: "Cups"}, hAxis: {title: "Month"}, seriesType: "bars", series: {5: {type: "line"}} }); }
Aqui dejo el contenido de mi tabla .sql:
Código:
Gracias! /* SQLyog Ultimate v8.82 MySQL - 5.1.33-community : Database - codedb ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; CREATE DATABASE /*!32312 IF NOT EXISTS*/`codedb` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `codedb`; /*Table structure for table `colecturias` */ DROP TABLE IF EXISTS `colecturias`; CREATE TABLE `colecturias` ( `LOCALIZACIÓN` varchar(255) DEFAULT NULL, `7/29/2011` varchar(255) DEFAULT NULL, `7/30/2011` varchar(255) DEFAULT NULL, `7/31/2011` varchar(255) DEFAULT NULL, `8/1/2011` varchar(255) DEFAULT NULL, `8/2/2011` varchar(255) DEFAULT NULL, `8/3/2011` varchar(255) DEFAULT NULL, `8/4/2011` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*Data for the table `colecturias` */ insert into `colecturias`(`LOCALIZACIÓN`,`7/29/2011`,`7/30/2011`,`7/31/2011`,`8/1/2011`,`8/2/2011`,`8/3/2011`,`8/4/2011`) values ('COLECTURIA 1','9,137,774.58','1,238,864.86',NULL,'2,491,681.56','21,691,728.29','4,063,033.30','936,899.93'),('COLECTURIA 2','72,644,501.16','30,674,655.35',NULL,'42,190,610.49','41,781,859.78','27,448,003.57','44,683,163.06'),('COLECTURIA 3','242,949.96',NULL,NULL,'200.00','4,242,468.36','516,501.57','290,364.41'),('COLECTURIA 4','15,564,744.75','1,399,280.63',NULL,'5,010,774.48','10,267,027.46','7,869,208.64','6,881,622.53'),('COLECTURIA 5','1,770,838.60','202,941.54',NULL,'894,942.02','3,435,742.20','414,127.92','1,314,406.98'),('COLECTURIA 6','6,665,877.20','1,821,246.75',NULL,'2,257,651.40','7,574,072.00',NULL,'5,564,714.46'),('COLECTURIA 7','100.00',NULL,NULL,'3,000.00','1,226.05',NULL,'4,881.20'),('COLECTURIA 8','2,526,181.66','87,694.19',NULL,'3,692,180.87','1,776,215.57',NULL,'7,622,348.17'),('COLECTURIA 9','242,148.01','111,396.00','94,618.00','202,640.00','135,086.94',NULL,'218,887.19'),('COLECTURIA 10','662,085.44','286,986.38','219,456.00','647,276.32','263,508.40','249,098.00','183,148.75'),('COLECTURIA 11','50,132.00','251,396.49',NULL,'33,992.80','52,999.00',NULL,'34,379.40'),('COLECTURIA 12',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('COLECTURIA 13','268,302.48','2,286.00','6,858.00','22,395.20','13,386.60',NULL,'837,677.56'),('COLECTURIA 14','50,857,582.64','26,736,607.00',NULL,'40,683,442.47','60,889,171.19','28,658,329.32','57,006,876.86'),('COLECTURIA 12',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('COLECTURIA 16','63,861,045.39','6,306,273.56',NULL,'42,444,394.97','43,392,497.22','32,639,810.09','24,069,976.59'),('COLECTURIA 17','1,129,256.44',NULL,NULL,'229,416.65','1,445,838.80','1,504,095.87','979,342.31'),('COLECTURIA 18','18,060,250.39',NULL,NULL,'101,005.13','6,085,748.19','23,695,079.51','5,945,172.85'),('COLECTURIA 19','23,848,807.75','1,485,444.10',NULL,'9,676,776.56','11,705,953.39','6,573,889.34','17,091,252.29'),('COLECTURIA 20','29,376.50',NULL,NULL,'19,974.89','300.00',NULL,'72,603.32'),('COLECTURIA 21','173,800.44',NULL,NULL,NULL,NULL,NULL,NULL),('COLECTURIA 22','47,265.10',NULL,NULL,NULL,NULL,'19,160.00',NULL),('COLECTURIA 12',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('COLECTURIA 24',NULL,NULL,NULL,'23,970.72',NULL,NULL,NULL),('COLECTURIA 25','1,299,487.44',NULL,NULL,'32,412.22','3,006.00',NULL,NULL),('COLECTURIA 12',NULL,NULL,NULL,NULL,NULL,NULL,NULL),('COLECTURIA 27',NULL,NULL,NULL,'60,859.30',NULL,NULL,'57,481.62'),('COLECTURIA 28',NULL,NULL,NULL,NULL,NULL,'300.00',NULL),('COLECTURIA 29','269,082,507.93','70,605,072.85','320,932.00','150,719,598.05','214,757,835.44','133,650,637.13','173,795,199.48'); /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;