Google Charts and Javascript

Google Charts and Javascript

  
Hi

I would like to add a Google Chart (something like this http://tinyurl.com/6lyxq8d) to my app but I am having some troubles to understand how to add Javascript to my apps.

Has anyone done something similar? Can anyone give me some tips to achieve this?

Regards,

Diogo
Hi Diogo,
its easy to add javascript check this
http://www.outsystems.com/help/servicestudio/6.0/Web_User_Interface/Adding_Java_Script.htm
http://www.outsystems.com/help/servicestudio/6.0/Language_Reference/Expressions/Un-escape_Expression_Contents.htm

If you need more help just ask I upload an oml with some samples in it
Regards
Carlos Rocha
Hi Carlos,

Thank you for your answer. I have seen those links before, but I couldn't put the alert example to work. I tried a web block widget, a web screen, but I was unsuccessful

Regards,

Diogo
Hi Diogo,
here you have some sample of java script.
I made a button that calls a function placed in the screen as expression and that function calls another function applyed to the screen javascript sheet
this way you have exemples on how to implement function in the both ways.

If you need more help just let me know

Regards
Carlos Rocha
You might want to check out the FusionCharts component available for download.  It uses Flash to generate the charts, but it has quite a number of them and their documentation is better than what google has to offer for their charts.
Hello Rebecca, I am using Fusion Charts already but it does not have that particular type that I am looking for

Regards,

Diogo
Hi Diogo,

Take a look at this Highcharts Component

It uses javascript charts and you can see how javascript was integrated with an eSpace.

Hope it helps!
Hermínio  Mira
Thanks for the link Herminio.

I am trying to follow the same schme, (widget with an expression to write the javascript and a container to load the chart) but it is not working =/

Regards,

Diogo
Hi Diogo,

I found the problem, you were adding the container.id in the google.load, but you need to insert the "visualization", because in this case the "visualization" isn't the name of the container but it's "The visualization's class name is google.visualization.TreeMap"
Old:
google.load(""+container.id+"", ""1"", {packages:[""treemap""]}); 

New:
google.load(""visualization"", ""1"", {packages:[""treemap""]});

The second thing that I did was seperate the javascript in two expression: 
First with:  "<script type=""text/javascript"" src=""https://www.google.com/jsapi""></script>"
Second with: "<script type=""text/javascript""> google.load(""visualization"", ""1"", {packages:[""treemap""]});
      google.setOnLoadCallback(drawChart);    .......    .......   showScale: true});    }  </script>"

In attachment is the file changed.

Regards, 
Nelson Baptista
Thanks a lot Nelson, it worked :)

Regards,

Diogo
You can try charting library like Google free chart.
Hi Jennifer,

Now, OutSystems comes with a Chart API, built with Highcharts. You just have to reference the Charts eSpace to use it.