manoaj 12 Denunciar post Postado Outubro 31, 2012 pessoal eu to querendo gerar graficos apartir de informações do meu banco de dados mas sem usar bibliotecas do tipo gd pq muitos servidores nao aceitam ela ou nao tem a ativa em seus servidores , eu tentei um tuto que tem aqui no imasters mas sem sorte nao conssegui faser funcionar :/ http://imasters.com.br/artigo/8350/php/gerando-graficos-flash-em-php-com-fusion-charts alguem tem alguma outra alternativa para que eu possa gerar estes graficos:D Compartilhar este post Link para o post Compartilhar em outros sites
William Bruno 1501 Denunciar post Postado Outubro 31, 2012 existem libs javascript que fazem gráficos tb. Compartilhar este post Link para o post Compartilhar em outros sites
Ricardo Barantini 33 Denunciar post Postado Outubro 31, 2012 Eu uso o Google Charts. Compartilhar este post Link para o post Compartilhar em outros sites
shini 318 Denunciar post Postado Outubro 31, 2012 em php o melhor q ja usei foi o libchart. em javascript com certeza o extjs esta entre os melhores, se n for o melhor. Compartilhar este post Link para o post Compartilhar em outros sites
Cacilds 18 Denunciar post Postado Outubro 31, 2012 Em um projeto recente eu utilizei o Highcharts, muito bom! []'s Compartilhar este post Link para o post Compartilhar em outros sites
manoaj 12 Denunciar post Postado Outubro 31, 2012 Em um projeto recente eu utilizei o Highcharts, muito bom! []'s de que forma vcs usaram esses exemplos pegaram os dados do banco para gerar o grafico ou de outra forma baixei o libchart e o highcharts , algum de vcs tem exemplos de como gerar o graficos usando o banco de dados? Compartilhar este post Link para o post Compartilhar em outros sites
shini 318 Denunciar post Postado Outubro 31, 2012 ja exemplos em alguma pasta ai Compartilhar este post Link para o post Compartilhar em outros sites
manoaj 12 Denunciar post Postado Outubro 31, 2012 no libchart 1.3 tem um exemplo assim <?php /* Libchart - PHP chart library * Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ /* * Vertical bar chart demonstration * */ include "../libchart/classes/libchart.php"; $chart = new VerticalBarChart(); $dataSet = new XYDataSet(); $dataSet->addPoint(new Point("Jan 2005", 1000)); $dataSet->addPoint(new Point("Feb 2005", 1000)); $dataSet->addPoint(new Point("March 2005", 1000)); $dataSet->addPoint(new Point("April 2005", 1000)); $dataSet->addPoint(new Point("May 2005", 1000)); $dataSet->addPoint(new Point("June 2005", 1500)); $dataSet->addPoint(new Point("July 2005", 2600)); $chart->setDataSet($dataSet); $chart->setTitle("Monthly usage for www.example.com"); $chart->render("generated/demo1.png"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Libchart vertical bars demonstration</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" /> </head> <body> <img alt="Vertical bars chart" src="generated/demo1.png" style="border: 1px solid gray;"/> </body> </html> eu sei que os valore do graficos sãoa queles ali $dataSet->addPoint(new Point("Jan 2005", 1000)); $dataSet->addPoint(new Point("Feb 2005", 1000)); $dataSet->addPoint(new Point("March 2005", 1000)); $dataSet->addPoint(new Point("April 2005", 1000)); $dataSet->addPoint(new Point("May 2005", 1000)); $dataSet->addPoint(new Point("June 2005", 1500)); $dataSet->addPoint(new Point("July 2005", 2600)); mas como eu faço parar subistituir eles por informações do meu banco de dados , por exemplo eu tenho uma tabela chamada users eu queria exibir no grafico a quantidade de usuarios que estao nessa tabela Compartilhar este post Link para o post Compartilhar em outros sites
shini 318 Denunciar post Postado Outubro 31, 2012 grafico de pizza, ai ele gera uma imagem no mesmo diretorio($path) $itens = $db->query(); $chart = new PieChart(700, 590); $dataSet = new XYDataSet(); $chart->setDataSet($dataSet); foreach($itens as $item){ $dataSet->addPoint(new Point($item['descricao'], $item['value'])); } $chart->render($path); Compartilhar este post Link para o post Compartilhar em outros sites
manoaj 12 Denunciar post Postado Outubro 31, 2012 $itens = $db->query(); $chart = new PieChart(700, 590); $dataSet = new XYDataSet(); $chart->setDataSet($dataSet); foreach($itens as $item){ $dataSet->addPoint(new Point($item['descricao'], $item['value'])); } $chart->render($path); a variavel $item seria como um select feito no db anteriormente $db cheguei perto ? kkk Compartilhar este post Link para o post Compartilhar em outros sites
shini 318 Denunciar post Postado Outubro 31, 2012 $itens = uma array q veio do banco. $item = a linha do array $itens. Compartilhar este post Link para o post Compartilhar em outros sites
manoaj 12 Denunciar post Postado Outubro 31, 2012 $itens = uma array q veio do banco. $item = a linha do array $itens. tendi vlw :D obrigado Compartilhar este post Link para o post Compartilhar em outros sites