Re: [web2py] Re: charts on web2py
:) ON CONTROLLER meses_chart="['Janeiro', 'Fevereiro', 'Março']" #Change this dynamically dados_chart="[3.5, 4, 5]" #Change this dynamically title="Rajjmatthur\"s charts" stitle="web2py end highchats powered" dados_map={} dados_map["dados"]=dados_chart dados_map["meses"]=meses_chart dados_map['titulo']=title dados_map['subtitulo']=stitle chart=""" Highcharts.setOptions({ lang:{ downloadJPEG: "Download em imagem JPG", downloadPDF: "Download em documento PDF", downloadPNG: "Download em imagem PNG", downloadSVG: "Download em vetor SVG", loading: "Lendo...", noData: "Sem dados para mostrar", printChart: "Imprimir Gráfico", } }); // Build the chart $('#chart').highcharts({ chart: { type: 'column' }, title: { text: '%(titulo)s' }, subtitle: { text: '%(subtitulo)s' }, xAxis: { categories: %(meses)s, crosshair: true }, yAxis: { min: 0, title: { text: 'Variação de Preços(R$)' } }, tooltip: { headerFormat: '{point.key}
', pointFormat: '
', shared: true, useHTML: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, credits:{enabled:false}, series: [{ name: 'Produto: Batata', data: %(dados)s }] }); """ %dados_map return dict(chart=XML(chart)) ON VIEW {{extend 'layout.html'}} {{#using URL helper}} {{#using default declaration}} {{=chart}} 2016-02-23 8:41 GMT-03:00', footerFormat: ' { series.name}: ' + 'R$ {point.y:.1f} : > Junior, do you have an example of bar chart using this? > > On Friday, February 19, 2016 at 11:18:10 AM UTC-5, Junior Phanter wrote: >> >> This is the advantagem of the highchart over Google Charts. You can use >> him in local server (offline). >> >> Happy in help. >> Sorry my bad englhis. ;) >> >> 2016-02-19 11:21 GMT-03:00 Ron Chatterjee : >> >>> For a moment I thought they are downloading directly from the page. I >>> didn't notice. Thank you. >>> >>> On Thursday, February 18, 2016 at 10:22:57 PM UTC-5, Junior Phanter >>> wrote: Download the developer's site the highcharts.js and exporting.js file and place the js folder of the your application. (I put in Attached w2p example) replace YOUR_APP by the name of the your aplication (e.g. chart) >>> type="text/javascript" src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> you can do >>> type="text/javascript" src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> see changes: Attached is w2p example 2016-02-18 22:40 GMT-03:00 Ron Chatterjee : > > I stumbled into this post and I also got a blank screen. Attached is > my w2p. This is a same replication of the example you posted. Am I missing > something? > > > > On Wednesday, February 17, 2016 at 8:27:15 AM UTC-5, Carlos Cesar > Caballero wrote: > >> Highcharts is very good. I am using right now c3.js (http://c3js.org/) >> a good MIT licence option. >> >> Greetings. >> >> El 16/02/16 a las 12:54, Junior Phanter escribió: >> >> Use highcharts >> http://www.highcharts.com >> >> Example: >> >> *ON CONTROLLER* >> >> def chart(): >> >> dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: >> 8},{name: 'Mamão', y: 12}]" #Change this dynamically >> >> dados_map={} >> dados_map["dados"]=dados_chart >> >> chart=""" >> >> Highcharts.setOptions({ >> lang:{ >> downloadJPEG: "Download em imagem JPG", >> downloadPDF: "Download em documento PDF", >> downloadPNG: "Download em imagem PNG", >> downloadSVG: "Download em vetor SVG", >> loading: "Lendo...", >> noData: "Sem dados para mostrar", >> printChart: "Imprimir Gráfico", >> } >> }); >> >> // Build the chart >> $('#chart').highcharts({ >> chart: { >> plotBackgroundColor: null, >> plotBorderWidth: null, >> plotShadow: false, >> type: 'pie' >> }, >>
Re: [web2py] Re: charts on web2py
Junior, do you have an example of bar chart using this? On Friday, February 19, 2016 at 11:18:10 AM UTC-5, Junior Phanter wrote: > > This is the advantagem of the highchart over Google Charts. You can use > him in local server (offline). > > Happy in help. > Sorry my bad englhis. ;) > > 2016-02-19 11:21 GMT-03:00 Ron Chatterjee>: > >> For a moment I thought they are downloading directly from the page. I >> didn't notice. Thank you. >> >> On Thursday, February 18, 2016 at 10:22:57 PM UTC-5, Junior Phanter wrote: >>> >>> Download the developer's site the highcharts.js and exporting.js file >>> and place the js folder of the your application. (I put in Attached w2p >>> example) >>> >>> replace YOUR_APP by the name of the your aplication (e.g. chart) >>> >>> >> type="text/javascript">>> src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> >>> >>> >>> you can do >>> >>> >>> >> type="text/javascript">>> src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> >>> >>> see changes: >>> >>> >>> >>> >>> >>> Attached is w2p example >>> >>> >>> >>> 2016-02-18 22:40 GMT-03:00 Ron Chatterjee : >>> I stumbled into this post and I also got a blank screen. Attached is my w2p. This is a same replication of the example you posted. Am I missing something? On Wednesday, February 17, 2016 at 8:27:15 AM UTC-5, Carlos Cesar Caballero wrote: > Highcharts is very good. I am using right now c3.js (http://c3js.org/) > a good MIT licence option. > > Greetings. > > El 16/02/16 a las 12:54, Junior Phanter escribió: > > Use highcharts > http://www.highcharts.com > > Example: > > *ON CONTROLLER* > > def chart(): > > dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: > 8},{name: 'Mamão', y: 12}]" #Change this dynamically > > dados_map={} > dados_map["dados"]=dados_chart > > chart=""" > > Highcharts.setOptions({ > lang:{ > downloadJPEG: "Download em imagem JPG", > downloadPDF: "Download em documento PDF", > downloadPNG: "Download em imagem PNG", > downloadSVG: "Download em vetor SVG", > loading: "Lendo...", > noData: "Sem dados para mostrar", > printChart: "Imprimir Gráfico", > } > }); > > // Build the chart > $('#chart').highcharts({ > chart: { > plotBackgroundColor: null, > plotBorderWidth: null, > plotShadow: false, > type: 'pie' > }, > title: { > text: 'Meu Gráfico' > }, > tooltip: { > pointFormat: '{series.name}: > {point.percentage:.1f}%%' > }, > plotOptions: { > pie: { > allowPointSelect: true, > cursor: 'pointer', > dataLabels: { > enabled: false > }, > showInLegend: true > } > }, > credits:{enabled:false}, > series: [{ > name: 'Vendar por porcentagem', > colorByPoint: true, > data: %(dados)s > }] > }); > > > """ %dados_map > return dict(chart=XML(chart)) > > *ON VIEW* > > {{extend 'layout.html'}} > type="text/javascript"> > type="text/javascript"> > > > {{=chart}} > > 2016-02-15 12:52 GMT-03:00 : > >> I used google charts using a simple bar chart since I couldn't find a >> workable example on the slice using pygal etc. But google chart seems >> little slow in loading on the browser and I believe it may be due to >> loading the js file from the remote site. Does anyone have the same >> experience? If so, how did they resolve it. I tried to load the js file >> locally but was unable to make that to work. >> >> >> >> On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote: >>> >>> thanks! >>> >>> >>> 2016-01-22 1:10 GMT-02:00 Junior Phanter : >>> Example using just google chart api, without google-charts-plug-in on controller def chart(): title="My Chart" data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], ["watermelon", 0.5]]') #convert list in string and string in XML return dict(title=title, data=data) on view (chart.html) {{extend 'layout.html'}}
Re: [web2py] Re: charts on web2py
No, you are fine. I am sorry that my eyes fooled me and I kept thinking like google chart this one also loads up the js from external site. I wasn't paying attention. That's why google chart is slow in the browser setting. Thank you so much. This is a great help and the charts looks really nice! On Friday, February 19, 2016 at 11:18:10 AM UTC-5, Junior Phanter wrote: > > This is the advantagem of the highchart over Google Charts. You can use > him in local server (offline). > > Happy in help. > Sorry my bad englhis. ;) > > 2016-02-19 11:21 GMT-03:00 Ron Chatterjee>: > >> For a moment I thought they are downloading directly from the page. I >> didn't notice. Thank you. >> >> On Thursday, February 18, 2016 at 10:22:57 PM UTC-5, Junior Phanter wrote: >>> >>> Download the developer's site the highcharts.js and exporting.js file >>> and place the js folder of the your application. (I put in Attached w2p >>> example) >>> >>> replace YOUR_APP by the name of the your aplication (e.g. chart) >>> >>> >> type="text/javascript">>> src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> >>> >>> >>> you can do >>> >>> >>> >> type="text/javascript">>> src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> >>> >>> see changes: >>> >>> >>> >>> >>> >>> Attached is w2p example >>> >>> >>> >>> 2016-02-18 22:40 GMT-03:00 Ron Chatterjee : >>> I stumbled into this post and I also got a blank screen. Attached is my w2p. This is a same replication of the example you posted. Am I missing something? On Wednesday, February 17, 2016 at 8:27:15 AM UTC-5, Carlos Cesar Caballero wrote: > Highcharts is very good. I am using right now c3.js (http://c3js.org/) > a good MIT licence option. > > Greetings. > > El 16/02/16 a las 12:54, Junior Phanter escribió: > > Use highcharts > http://www.highcharts.com > > Example: > > *ON CONTROLLER* > > def chart(): > > dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: > 8},{name: 'Mamão', y: 12}]" #Change this dynamically > > dados_map={} > dados_map["dados"]=dados_chart > > chart=""" > > Highcharts.setOptions({ > lang:{ > downloadJPEG: "Download em imagem JPG", > downloadPDF: "Download em documento PDF", > downloadPNG: "Download em imagem PNG", > downloadSVG: "Download em vetor SVG", > loading: "Lendo...", > noData: "Sem dados para mostrar", > printChart: "Imprimir Gráfico", > } > }); > > // Build the chart > $('#chart').highcharts({ > chart: { > plotBackgroundColor: null, > plotBorderWidth: null, > plotShadow: false, > type: 'pie' > }, > title: { > text: 'Meu Gráfico' > }, > tooltip: { > pointFormat: '{series.name}: > {point.percentage:.1f}%%' > }, > plotOptions: { > pie: { > allowPointSelect: true, > cursor: 'pointer', > dataLabels: { > enabled: false > }, > showInLegend: true > } > }, > credits:{enabled:false}, > series: [{ > name: 'Vendar por porcentagem', > colorByPoint: true, > data: %(dados)s > }] > }); > > > """ %dados_map > return dict(chart=XML(chart)) > > *ON VIEW* > > {{extend 'layout.html'}} > type="text/javascript"> > type="text/javascript"> > > > {{=chart}} > > 2016-02-15 12:52 GMT-03:00 : > >> I used google charts using a simple bar chart since I couldn't find a >> workable example on the slice using pygal etc. But google chart seems >> little slow in loading on the browser and I believe it may be due to >> loading the js file from the remote site. Does anyone have the same >> experience? If so, how did they resolve it. I tried to load the js file >> locally but was unable to make that to work. >> >> >> >> On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote: >>> >>> thanks! >>> >>> >>> 2016-01-22 1:10 GMT-02:00 Junior Phanter : >>> Example using just google chart api, without google-charts-plug-in on controller def chart(): title="My Chart" data=XML('[ ["item",
Re: [web2py] Re: charts on web2py
This is the advantagem of the highchart over Google Charts. You can use him in local server (offline). Happy in help. Sorry my bad englhis. ;) 2016-02-19 11:21 GMT-03:00 Ron Chatterjee: > For a moment I thought they are downloading directly from the page. I > didn't notice. Thank you. > > On Thursday, February 18, 2016 at 10:22:57 PM UTC-5, Junior Phanter wrote: >> >> Download the developer's site the highcharts.js and exporting.js file and >> place the js folder of the your application. (I put in Attached w2p example) >> >> replace YOUR_APP by the name of the your aplication (e.g. chart) >> >> > type="text/javascript">> src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> >> >> >> you can do >> >> >> > type="text/javascript">> src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> >> >> see changes: >> >> >> >> >> >> Attached is w2p example >> >> >> >> 2016-02-18 22:40 GMT-03:00 Ron Chatterjee : >> >>> >>> I stumbled into this post and I also got a blank screen. Attached is my >>> w2p. This is a same replication of the example you posted. Am I missing >>> something? >>> >>> >>> >>> On Wednesday, February 17, 2016 at 8:27:15 AM UTC-5, Carlos Cesar >>> Caballero wrote: >>> Highcharts is very good. I am using right now c3.js (http://c3js.org/) a good MIT licence option. Greetings. El 16/02/16 a las 12:54, Junior Phanter escribió: Use highcharts http://www.highcharts.com Example: *ON CONTROLLER* def chart(): dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: 8},{name: 'Mamão', y: 12}]" #Change this dynamically dados_map={} dados_map["dados"]=dados_chart chart=""" Highcharts.setOptions({ lang:{ downloadJPEG: "Download em imagem JPG", downloadPDF: "Download em documento PDF", downloadPNG: "Download em imagem PNG", downloadSVG: "Download em vetor SVG", loading: "Lendo...", noData: "Sem dados para mostrar", printChart: "Imprimir Gráfico", } }); // Build the chart $('#chart').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, type: 'pie' }, title: { text: 'Meu Gráfico' }, tooltip: { pointFormat: '{series.name}: {point.percentage:.1f}%%' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: false }, showInLegend: true } }, credits:{enabled:false}, series: [{ name: 'Vendar por porcentagem', colorByPoint: true, data: %(dados)s }] }); """ %dados_map return dict(chart=XML(chart)) *ON VIEW* {{extend 'layout.html'}} >>> type="text/javascript"> >>> type="text/javascript"> {{=chart}} 2016-02-15 12:52 GMT-03:00 : > I used google charts using a simple bar chart since I couldn't find a > workable example on the slice using pygal etc. But google chart seems > little slow in loading on the browser and I believe it may be due to > loading the js file from the remote site. Does anyone have the same > experience? If so, how did they resolve it. I tried to load the js file > locally but was unable to make that to work. > > > > On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote: >> >> thanks! >> >> >> 2016-01-22 1:10 GMT-02:00 Junior Phanter : >> >>> Example using just google chart api, without google-charts-plug-in >>> >>> on controller >>> >>> def chart(): >>> title="My Chart" >>> data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], >>> ["watermelon", 0.5]]') #convert list in string and string in XML >>> return dict(title=title, data=data) >>> >>> on view (chart.html) >>> >>> {{extend 'layout.html'}} >>> >>> >>> >>> https://www.gstatic.com/charts/loader.js> >>> https://www.gstatic.com/charts/loader.js"> >>> >>> >>> google.charts.load('current', {'packages':['corechart']}); >>>
Re: [web2py] Re: charts on web2py
For a moment I thought they are downloading directly from the page. I didn't notice. Thank you. On Thursday, February 18, 2016 at 10:22:57 PM UTC-5, Junior Phanter wrote: > > Download the developer's site the highcharts.js and exporting.js file and > place the js folder of the your application. (I put in Attached w2p example) > > replace YOUR_APP by the name of the your aplication (e.g. chart) > > type="text/javascript"> src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> > > > you can do > > > type="text/javascript"> src="/YOUR_APP/static/js/exporting.js" type="text/javascript"> > > see changes: > > > > > > Attached is w2p example > > > > 2016-02-18 22:40 GMT-03:00 Ron Chatterjee>: > >> >> I stumbled into this post and I also got a blank screen. Attached is my >> w2p. This is a same replication of the example you posted. Am I missing >> something? >> >> >> >> On Wednesday, February 17, 2016 at 8:27:15 AM UTC-5, Carlos Cesar >> Caballero wrote: >> >>> Highcharts is very good. I am using right now c3.js (http://c3js.org/) >>> a good MIT licence option. >>> >>> Greetings. >>> >>> El 16/02/16 a las 12:54, Junior Phanter escribió: >>> >>> Use highcharts >>> http://www.highcharts.com >>> >>> Example: >>> >>> *ON CONTROLLER* >>> >>> def chart(): >>> >>> dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: 8},{name: >>> 'Mamão', y: 12}]" #Change this dynamically >>> >>> dados_map={} >>> dados_map["dados"]=dados_chart >>> >>> chart=""" >>> >>> Highcharts.setOptions({ >>> lang:{ >>> downloadJPEG: "Download em imagem JPG", >>> downloadPDF: "Download em documento PDF", >>> downloadPNG: "Download em imagem PNG", >>> downloadSVG: "Download em vetor SVG", >>> loading: "Lendo...", >>> noData: "Sem dados para mostrar", >>> printChart: "Imprimir Gráfico", >>> } >>> }); >>> >>> // Build the chart >>> $('#chart').highcharts({ >>> chart: { >>> plotBackgroundColor: null, >>> plotBorderWidth: null, >>> plotShadow: false, >>> type: 'pie' >>> }, >>> title: { >>> text: 'Meu Gráfico' >>> }, >>> tooltip: { >>> pointFormat: '{series.name}: >>> {point.percentage:.1f}%%' >>> }, >>> plotOptions: { >>> pie: { >>> allowPointSelect: true, >>> cursor: 'pointer', >>> dataLabels: { >>> enabled: false >>> }, >>> showInLegend: true >>> } >>> }, >>> credits:{enabled:false}, >>> series: [{ >>> name: 'Vendar por porcentagem', >>> colorByPoint: true, >>> data: %(dados)s >>> }] >>> }); >>> >>> >>> """ %dados_map >>> return dict(chart=XML(chart)) >>> >>> *ON VIEW* >>> >>> {{extend 'layout.html'}} >>> >> type="text/javascript"> >>> >> type="text/javascript"> >>> >>> >>> {{=chart}} >>> >>> 2016-02-15 12:52 GMT-03:00 : >>> I used google charts using a simple bar chart since I couldn't find a workable example on the slice using pygal etc. But google chart seems little slow in loading on the browser and I believe it may be due to loading the js file from the remote site. Does anyone have the same experience? If so, how did they resolve it. I tried to load the js file locally but was unable to make that to work. On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote: > > thanks! > > > 2016-01-22 1:10 GMT-02:00 Junior Phanter : > >> Example using just google chart api, without google-charts-plug-in >> >> on controller >> >> def chart(): >> title="My Chart" >> data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], >> ["watermelon", 0.5]]') #convert list in string and string in XML >> return dict(title=title, data=data) >> >> on view (chart.html) >> >> {{extend 'layout.html'}} >> >> >> >> https://www.gstatic.com/charts/loader.js> >> https://www.gstatic.com/charts/loader.js"> >> >> >> google.charts.load('current', {'packages':['corechart']}); >> google.charts.setOnLoadCallback(drawChart); >> function drawChart() { >> >> var data = google.visualization.arrayToDataTable({{=data}}); >> >> var options = { >> title: '{{=title}}' >> }; >> >> var chart = new >> google.visualization.PieChart(document.getElementById('my_chart')); >>
Re: [web2py] Re: charts on web2py
Highcharts is very good. I am using right now c3.js (http://c3js.org/) a good MIT licence option. Greetings. El 16/02/16 a las 12:54, Junior Phanter escribió: Use highcharts http://www.highcharts.com Example: *ON CONTROLLER* def chart(): dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: 8},{name: 'Mamão', y: 12}]" #Change this dynamically dados_map={} dados_map["dados"]=dados_chart chart=""" Highcharts.setOptions({ lang:{ downloadJPEG: "Download em imagem JPG", downloadPDF: "Download em documento PDF", downloadPNG: "Download em imagem PNG", downloadSVG: "Download em vetor SVG", loading: "Lendo...", noData: "Sem dados para mostrar", printChart: "Imprimir Gráfico", } }); // Build the chart $('#chart').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, type: 'pie' }, title: { text: 'Meu Gráfico' }, tooltip: {pointFormat: '{series.name <http://series.name>}: {point.percentage:.1f}%%'}, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: false }, showInLegend: true } }, credits:{enabled:false}, series: [{ name: 'Vendar por porcentagem', colorByPoint: true, data: %(dados)s }] }); """ %dados_map return dict(chart=XML(chart)) *ON VIEW* {{extend 'layout.html'}} type="text/javascript"> type="text/javascript"> {{=chart}} 2016-02-15 12:52 GMT-03:00>: I used google charts using a simple bar chart since I couldn't find a workable example on the slice using pygal etc. But google chart seems little slow in loading on the browser and I believe it may be due to loading the js file from the remote site. Does anyone have the same experience? If so, how did they resolve it. I tried to load the js file locally but was unable to make that to work. On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote: thanks! 2016-01-22 1:10 GMT-02:00 Junior Phanter : Example using just google chart api, without google-charts-plug-in on controller def chart(): title="My Chart" data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], ["watermelon", 0.5]]') #convert list in string and string in XML return dict(title=title, data=data) on view (chart.html) {{extend 'layout.html'}} https://www.gstatic.com/charts/loader.js"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable({{=data}}); var options = { title: '{{=title}}' }; var chart = new google.visualization.PieChart(document.getElementById('my_chart')); chart.draw(data, options); } 2016-01-21 18:01 GMT-03:00 Diego Tostes : i am trying to use google chart plugin, but the example at http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it is not so clear to me. anybody can show me a example with a controller and a view? i need a simple line chart. rgds diego 2016-01-21 17:36 GMT-02:00 Diego Tostes : thanks for all! 2016-01-21 14:17 GMT-02:00 Alex : my favorite chart library: https://www.amcharts.com/ very beautiful, easy to use, good documentation and friendly license (allows usage of free version even for commercial websites). Alex -- Resources: - http://web2py.com -
Re: [web2py] Re: charts on web2py
you Inserts jquery in your view? It works for me... 2016-02-16 15:40 GMT-03:00: > I got a blank screen. lol > > > On Tuesday, February 16, 2016 at 12:54:53 PM UTC-5, Junior Phanter wrote: > >> Use highcharts >> http://www.highcharts.com >> >> Example: >> >> *ON CONTROLLER* >> >> def chart(): >> >> dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: 8},{name: >> 'Mamão', y: 12}]" #Change this dynamically >> >> dados_map={} >> dados_map["dados"]=dados_chart >> >> chart=""" >> >> Highcharts.setOptions({ >> lang:{ >> downloadJPEG: "Download em imagem JPG", >> downloadPDF: "Download em documento PDF", >> downloadPNG: "Download em imagem PNG", >> downloadSVG: "Download em vetor SVG", >> loading: "Lendo...", >> noData: "Sem dados para mostrar", >> printChart: "Imprimir Gráfico", >> } >> }); >> >> // Build the chart >> $('#chart').highcharts({ >> chart: { >> plotBackgroundColor: null, >> plotBorderWidth: null, >> plotShadow: false, >> type: 'pie' >> }, >> title: { >> text: 'Meu Gráfico' >> }, >> tooltip: { >> pointFormat: '{series.name}: {point.percentage:.1f}%%' >> }, >> plotOptions: { >> pie: { >> allowPointSelect: true, >> cursor: 'pointer', >> dataLabels: { >> enabled: false >> }, >> showInLegend: true >> } >> }, >> credits:{enabled:false}, >> series: [{ >> name: 'Vendar por porcentagem', >> colorByPoint: true, >> data: %(dados)s >> }] >> }); >> >> >> """ %dados_map >> return dict(chart=XML(chart)) >> >> *ON VIEW* >> >> {{extend 'layout.html'}} >> > type="text/javascript"> >> > type="text/javascript"> >> >> >> {{=chart}} >> >> 2016-02-15 12:52 GMT-03:00 : >> >>> I used google charts using a simple bar chart since I couldn't find a >>> workable example on the slice using pygal etc. But google chart seems >>> little slow in loading on the browser and I believe it may be due to >>> loading the js file from the remote site. Does anyone have the same >>> experience? If so, how did they resolve it. I tried to load the js file >>> locally but was unable to make that to work. >>> >>> >>> >>> On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote: thanks! 2016-01-22 1:10 GMT-02:00 Junior Phanter : > Example using just google chart api, without google-charts-plug-in > > on controller > > def chart(): > title="My Chart" > data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], > ["watermelon", 0.5]]') #convert list in string and string in XML > return dict(title=title, data=data) > > on view (chart.html) > > {{extend 'layout.html'}} > > > > https://www.gstatic.com/charts/loader.js"> > > > google.charts.load('current', {'packages':['corechart']}); > google.charts.setOnLoadCallback(drawChart); > function drawChart() { > > var data = google.visualization.arrayToDataTable({{=data}}); > > var options = { > title: '{{=title}}' > }; > > var chart = new > google.visualization.PieChart(document.getElementById('my_chart')); > > chart.draw(data, options); > } > > > > 2016-01-21 18:01 GMT-03:00 Diego Tostes : > >> i am trying to use google chart plugin, but the example at >> http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it >> is not so clear to me. >> >> anybody can show me a example with a controller and a view? >> >> i need a simple line chart. >> >> rgds >> >> diego >> >> 2016-01-21 17:36 GMT-02:00 Diego Tostes : >> >>> thanks for all! >>> >>> >>> 2016-01-21 14:17 GMT-02:00 Alex : >>> my favorite chart library: https://www.amcharts.com/ very beautiful, easy to use, good documentation and friendly license (allows usage of free version even for commercial websites). Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google
Re: [web2py] Re: charts on web2py
I got a blank screen. lol On Tuesday, February 16, 2016 at 12:54:53 PM UTC-5, Junior Phanter wrote: > > Use highcharts > http://www.highcharts.com > > Example: > > *ON CONTROLLER* > > def chart(): > > dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: 8},{name: > 'Mamão', y: 12}]" #Change this dynamically > > dados_map={} > dados_map["dados"]=dados_chart > > chart=""" > > Highcharts.setOptions({ > lang:{ > downloadJPEG: "Download em imagem JPG", > downloadPDF: "Download em documento PDF", > downloadPNG: "Download em imagem PNG", > downloadSVG: "Download em vetor SVG", > loading: "Lendo...", > noData: "Sem dados para mostrar", > printChart: "Imprimir Gráfico", > } > }); > > // Build the chart > $('#chart').highcharts({ > chart: { > plotBackgroundColor: null, > plotBorderWidth: null, > plotShadow: false, > type: 'pie' > }, > title: { > text: 'Meu Gráfico' > }, > tooltip: { > pointFormat: '{series.name}: {point.percentage:.1f}%%' > }, > plotOptions: { > pie: { > allowPointSelect: true, > cursor: 'pointer', > dataLabels: { > enabled: false > }, > showInLegend: true > } > }, > credits:{enabled:false}, > series: [{ > name: 'Vendar por porcentagem', > colorByPoint: true, > data: %(dados)s > }] > }); > > > """ %dados_map > return dict(chart=XML(chart)) > > *ON VIEW* > > {{extend 'layout.html'}} > type="text/javascript"> > type="text/javascript"> > > > {{=chart}} > > 2016-02-15 12:52 GMT-03:00: > >> I used google charts using a simple bar chart since I couldn't find a >> workable example on the slice using pygal etc. But google chart seems >> little slow in loading on the browser and I believe it may be due to >> loading the js file from the remote site. Does anyone have the same >> experience? If so, how did they resolve it. I tried to load the js file >> locally but was unable to make that to work. >> >> >> >> On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote: >>> >>> thanks! >>> >>> >>> 2016-01-22 1:10 GMT-02:00 Junior Phanter : >>> Example using just google chart api, without google-charts-plug-in on controller def chart(): title="My Chart" data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], ["watermelon", 0.5]]') #convert list in string and string in XML return dict(title=title, data=data) on view (chart.html) {{extend 'layout.html'}} https://www.gstatic.com/charts/loader.js"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable({{=data}}); var options = { title: '{{=title}}' }; var chart = new google.visualization.PieChart(document.getElementById('my_chart')); chart.draw(data, options); } 2016-01-21 18:01 GMT-03:00 Diego Tostes : > i am trying to use google chart plugin, but the example at > http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it > is not so clear to me. > > anybody can show me a example with a controller and a view? > > i need a simple line chart. > > rgds > > diego > > 2016-01-21 17:36 GMT-02:00 Diego Tostes : > >> thanks for all! >> >> >> 2016-01-21 14:17 GMT-02:00 Alex : >> >>> my favorite chart library: >>> https://www.amcharts.com/ >>> very beautiful, easy to use, good documentation and friendly license >>> (allows usage of free version even for commercial websites). >>> >>> Alex >>> >>> -- >>> Resources: >>> - http://web2py.com >>> - http://web2py.com/book (Documentation) >>> - http://github.com/web2py/web2py (Source code) >>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, >>> send an email to web2py+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> > --
Re: [web2py] Re: charts on web2py
Use highcharts http://www.highcharts.com Example: *ON CONTROLLER* def chart(): dados_chart="[{name: 'Batata', y: 12},{name: 'Tomate', y: 8},{name: 'Mamão', y: 12}]" #Change this dynamically dados_map={} dados_map["dados"]=dados_chart chart=""" Highcharts.setOptions({ lang:{ downloadJPEG: "Download em imagem JPG", downloadPDF: "Download em documento PDF", downloadPNG: "Download em imagem PNG", downloadSVG: "Download em vetor SVG", loading: "Lendo...", noData: "Sem dados para mostrar", printChart: "Imprimir Gráfico", } }); // Build the chart $('#chart').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false, type: 'pie' }, title: { text: 'Meu Gráfico' }, tooltip: { pointFormat: '{series.name}: {point.percentage:.1f}%%' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: false }, showInLegend: true } }, credits:{enabled:false}, series: [{ name: 'Vendar por porcentagem', colorByPoint: true, data: %(dados)s }] }); """ %dados_map return dict(chart=XML(chart)) *ON VIEW* {{extend 'layout.html'}} {{=chart}} 2016-02-15 12:52 GMT-03:00: > I used google charts using a simple bar chart since I couldn't find a > workable example on the slice using pygal etc. But google chart seems > little slow in loading on the browser and I believe it may be due to > loading the js file from the remote site. Does anyone have the same > experience? If so, how did they resolve it. I tried to load the js file > locally but was unable to make that to work. > > > > On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote: >> >> thanks! >> >> >> 2016-01-22 1:10 GMT-02:00 Junior Phanter : >> >>> Example using just google chart api, without google-charts-plug-in >>> >>> on controller >>> >>> def chart(): >>> title="My Chart" >>> data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], >>> ["watermelon", 0.5]]') #convert list in string and string in XML >>> return dict(title=title, data=data) >>> >>> on view (chart.html) >>> >>> {{extend 'layout.html'}} >>> >>> >>> >>> https://www.gstatic.com/charts/loader.js"> >>> >>> >>> google.charts.load('current', {'packages':['corechart']}); >>> google.charts.setOnLoadCallback(drawChart); >>> function drawChart() { >>> >>> var data = google.visualization.arrayToDataTable({{=data}}); >>> >>> var options = { >>> title: '{{=title}}' >>> }; >>> >>> var chart = new >>> google.visualization.PieChart(document.getElementById('my_chart')); >>> >>> chart.draw(data, options); >>> } >>> >>> >>> >>> 2016-01-21 18:01 GMT-03:00 Diego Tostes : >>> i am trying to use google chart plugin, but the example at http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it is not so clear to me. anybody can show me a example with a controller and a view? i need a simple line chart. rgds diego 2016-01-21 17:36 GMT-02:00 Diego Tostes : > thanks for all! > > > 2016-01-21 14:17 GMT-02:00 Alex : > >> my favorite chart library: >> https://www.amcharts.com/ >> very beautiful, easy to use, good documentation and friendly license >> (allows usage of free version even for commercial websites). >> >> Alex >> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google >> Groups "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to web2py+un...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send
Re: [web2py] Re: charts on web2py
I used google charts using a simple bar chart since I couldn't find a workable example on the slice using pygal etc. But google chart seems little slow in loading on the browser and I believe it may be due to loading the js file from the remote site. Does anyone have the same experience? If so, how did they resolve it. I tried to load the js file locally but was unable to make that to work. On Monday, January 25, 2016 at 8:32:01 AM UTC-5, Diego Tostes wrote: > > thanks! > > > 2016-01-22 1:10 GMT-02:00 Junior Phanter>: > >> Example using just google chart api, without google-charts-plug-in >> >> on controller >> >> def chart(): >> title="My Chart" >> data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], >> ["watermelon", 0.5]]') #convert list in string and string in XML >> return dict(title=title, data=data) >> >> on view (chart.html) >> >> {{extend 'layout.html'}} >> >> >> >> https://www.gstatic.com/charts/loader.js"> >> >> >> google.charts.load('current', {'packages':['corechart']}); >> google.charts.setOnLoadCallback(drawChart); >> function drawChart() { >> >> var data = google.visualization.arrayToDataTable({{=data}}); >> >> var options = { >> title: '{{=title}}' >> }; >> >> var chart = new >> google.visualization.PieChart(document.getElementById('my_chart')); >> >> chart.draw(data, options); >> } >> >> >> >> 2016-01-21 18:01 GMT-03:00 Diego Tostes > >: >> >>> i am trying to use google chart plugin, but the example at >>> http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it is >>> not so clear to me. >>> >>> anybody can show me a example with a controller and a view? >>> >>> i need a simple line chart. >>> >>> rgds >>> >>> diego >>> >>> 2016-01-21 17:36 GMT-02:00 Diego Tostes >> >: >>> thanks for all! 2016-01-21 14:17 GMT-02:00 Alex : > my favorite chart library: > https://www.amcharts.com/ > very beautiful, easy to use, good documentation and friendly license > (allows usage of free version even for commercial websites). > > Alex > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google > Groups "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to web2py+un...@googlegroups.com . > For more options, visit https://groups.google.com/d/optout. > >>> -- >>> Resources: >>> - http://web2py.com >>> - http://web2py.com/book (Documentation) >>> - http://github.com/web2py/web2py (Source code) >>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to web2py+un...@googlegroups.com . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+un...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: charts on web2py
thanks! 2016-01-22 1:10 GMT-02:00 Junior Phanter: > Example using just google chart api, without google-charts-plug-in > > on controller > > def chart(): > title="My Chart" > data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], > ["watermelon", 0.5]]') #convert list in string and string in XML > return dict(title=title, data=data) > > on view (chart.html) > > {{extend 'layout.html'}} > > > > https://www.gstatic.com/charts/loader.js"> > > > google.charts.load('current', {'packages':['corechart']}); > google.charts.setOnLoadCallback(drawChart); > function drawChart() { > > var data = google.visualization.arrayToDataTable({{=data}}); > > var options = { > title: '{{=title}}' > }; > > var chart = new > google.visualization.PieChart(document.getElementById('my_chart')); > > chart.draw(data, options); > } > > > > 2016-01-21 18:01 GMT-03:00 Diego Tostes : > >> i am trying to use google chart plugin, but the example at >> http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it is >> not so clear to me. >> >> anybody can show me a example with a controller and a view? >> >> i need a simple line chart. >> >> rgds >> >> diego >> >> 2016-01-21 17:36 GMT-02:00 Diego Tostes : >> >>> thanks for all! >>> >>> >>> 2016-01-21 14:17 GMT-02:00 Alex : >>> my favorite chart library: https://www.amcharts.com/ very beautiful, easy to use, good documentation and friendly license (allows usage of free version even for commercial websites). Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. >>> >>> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: charts on web2py
If doing SVG client side covers your need then use raphael it is really simple, you need only to manage some json: http://raphaeljs.com/ Once you get the hang of SVG doing charts with SVG+ractive.js is also an option if you need maximum flexibility and interactivity. 2016-01-21 2:06 GMT+01:00 Ariya Owam-aram: > Try pygal.org very easy. > > เมื่อ วันพุธที่ 20 มกราคม ค.ศ. 2016 23 นาฬิกา 04 นาที 43 วินาที UTC+7, Diego > Tostes เขียนว่า: >> >> Hi, >> >> anyone can indicate a good solution to create charts using web2py? >> >> rgds >> >> diego > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: charts on web2py
Online - google chats http://google-developers.appspot.com/chart Offline - highcharts http://www.highcharts.com Em 21/01/2016 09:34, "Michele Comitini"escreveu: > If doing SVG client side covers your need then use raphael it is > really simple, you need only to manage some json: > http://raphaeljs.com/ > > > Once you get the hang of SVG doing charts with SVG+ractive.js is also > an option if you need maximum flexibility and interactivity. > > > > 2016-01-21 2:06 GMT+01:00 Ariya Owam-aram : > > Try pygal.org very easy. > > > > เมื่อ วันพุธที่ 20 มกราคม ค.ศ. 2016 23 นาฬิกา 04 นาที 43 วินาที UTC+7, > Diego > > Tostes เขียนว่า: > >> > >> Hi, > >> > >> anyone can indicate a good solution to create charts using web2py? > >> > >> rgds > >> > >> diego > > > > -- > > Resources: > > - http://web2py.com > > - http://web2py.com/book (Documentation) > > - http://github.com/web2py/web2py (Source code) > > - https://code.google.com/p/web2py/issues/list (Report Issues) > > --- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to web2py+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: charts on web2py
my favorite chart library: https://www.amcharts.com/ very beautiful, easy to use, good documentation and friendly license (allows usage of free version even for commercial websites). Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: charts on web2py
i am trying to use google chart plugin, but the example at http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it is not so clear to me. anybody can show me a example with a controller and a view? i need a simple line chart. rgds diego 2016-01-21 17:36 GMT-02:00 Diego Tostes: > thanks for all! > > > 2016-01-21 14:17 GMT-02:00 Alex : > >> my favorite chart library: >> https://www.amcharts.com/ >> very beautiful, easy to use, good documentation and friendly license >> (allows usage of free version even for commercial websites). >> >> Alex >> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: charts on web2py
Example using just google chart api, without google-charts-plug-in on controller def chart(): title="My Chart" data=XML('[ ["item", "value"], ["apple", 1], ["potato", 1.5], ["watermelon", 0.5]]') #convert list in string and string in XML return dict(title=title, data=data) on view (chart.html) {{extend 'layout.html'}} https://www.gstatic.com/charts/loader.js "> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable({{=data}}); var options = { title: '{{=title}}' }; var chart = new google.visualization.PieChart(document.getElementById('my_chart')); chart.draw(data, options); } 2016-01-21 18:01 GMT-03:00 Diego Tostes: > i am trying to use google chart plugin, but the example at > http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it is > not so clear to me. > > anybody can show me a example with a controller and a view? > > i need a simple line chart. > > rgds > > diego > > 2016-01-21 17:36 GMT-02:00 Diego Tostes : > >> thanks for all! >> >> >> 2016-01-21 14:17 GMT-02:00 Alex : >> >>> my favorite chart library: >>> https://www.amcharts.com/ >>> very beautiful, easy to use, good documentation and friendly license >>> (allows usage of free version even for commercial websites). >>> >>> Alex >>> >>> -- >>> Resources: >>> - http://web2py.com >>> - http://web2py.com/book (Documentation) >>> - http://github.com/web2py/web2py (Source code) >>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "web2py-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to web2py+unsubscr...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: charts on web2py
thanks for all! 2016-01-21 14:17 GMT-02:00 Alex: > my favorite chart library: > https://www.amcharts.com/ > very beautiful, easy to use, good documentation and friendly license > (allows usage of free version even for commercial websites). > > Alex > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: charts on web2py
Try pygal.org very easy. เมื่อ วันพุธที่ 20 มกราคม ค.ศ. 2016 23 นาฬิกา 04 นาที 43 วินาที UTC+7, Diego Tostes เขียนว่า: > > Hi, > > anyone can indicate a good solution to create charts using web2py? > > rgds > > diego > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.