Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 15 FEB 2011 10:43:00PM Matthew Jones wrote:

I've been waiting excitedly since the announcement in the January newsletter that Google Charts are included in O4W 1.1 (OI 9.2.1).

But I can't find how to use them! :(

I found equates in the O4WEQUATES insert, but can't find anything in the UI or the O4W 9.2.1 Reference Guide about how to implement.

Anyone know?

Example code would be great - Bryan! :)

Ta.

. Matthew Jones


At 16 FEB 2011 10:20PM Bryan Shumsky wrote:

Hi, Mattew. I hate to dampen your enthusiasm…but the Google Charts, whilst they were indeed discussed in the January newsletter, aren't a feature of O4W 1.1, but rather of O4W 1.2. If you'd like to see them work, I can tell you how to 'switch on' the O4W 1.2 features so you can try them out…?

As to how you'd use them - are you running a dashboard, or planning to use the O4W APIs for generating a graph in your own custom stored procedure?

Regards,

- Bryan "The Tease" Shumsky

Revelation Software

At 16 FEB 2011 10:51PM Matthew Jones wrote:

Hi "Tease",

I'd sure like to turn 1.2 on and have a look please.

At this stage I am running a dashboard, not using the API.

How to please??? :)

Ta.

. Matthew "Waiting with Excitement" Jones.


At 17 FEB 2011 12:24AM Bryan Shumsky wrote:

Hi, Matthew. Once the O4W 1.2 release is active, in the configuration screen for O4W there will be a choice to select the graph routines to use - either jqPlot (the current library), Google Charts, or both.

Once you've selected the library or libraries to use, the way you'd use the Google Chart routines is exactly the same as you currently use the jqPlot routines - in the dashboard wizard, under the "type of chart", you'll have options like pie, bar, etc. (just like you currently do). The only difference will be, if you've selected Google Charts for the library, they'll be rendered with Google Charts instead of jqPlot, giving them a different look.

In addition, there are some additional chart types available with the Google library, so they'll be listed there as well.

Hope that helps,

- Bryan Shumsky

Revelation Software

At 17 FEB 2011 12:33AM Bryan Shumsky wrote:

Hi, Matthew.

Each O4W application has its own configuration record, stored in the O4WCONFIG table. The record is named *CFG_O4W (for example, EXAMPLES*CFG_O4W).

Please note the standard disclaimer:

EDITING THE O4W CONFIGURATION RECORD COULD CAUSE YOUR O4W TO STOP WORKING, YOUR MONITOR TO START SMOKING, OR YOUR CPU TO START CURSING

So, please be careful if you wish to try this…

If you edit up the appropriate configuration record in the Editor++, field 12 contains a code indicating which graphing library should be used by this O4W. Leaving it blank, or having a "0" there, indicates that the legacy jqPlot library will be used.

Entering a "1" in field 12 tells O4W to use the Google Chart library instead.

Entering a "2" in field 12 tells O4W to use _both_ the jqPlot and Google Chart libraries.

If you're keen to try them out, that's how you can activate them…

Regards (and Good Luck),

- Bryan Shumsky

Revelation Software

At 17 FEB 2011 02:53AM Matthew Jones wrote:

Have tried - monitor is smoking, but in a good way! :)

Can't seem to get Google Gauge working though. :(

Using simple subroutine to populate data:

compile subroutine [/color]mjDashTest( graphID, this.Series, xValues, yValues ) 
[/color] 
[/color]if [/color]assigned( graphId ) [/color]else [/color]graphid=[/color]'unassigned' 
[/color]if [/color]assigned( this.series) [/color]else [/color]this.series=[/color]'unassigned' 
[/color]if [/color]assigned( xValues ) [/color]else [/color]xValues=[/color]'unassigned' 
[/color]if [/color]assigned( yValues ) [/color]else [/color]yValues=[/color]'unassigned' 
[/color] 
[/color]xValues=[/color]'Memory'  
[/color]yValues=[/color]'80'  
[/color] 
[/color]return[/color][/color][/size]         
               

Gives error in webpage:

====================================================================

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C; InfoPath.3; .NET4.0E)

Timestamp: Thu, 17 Feb 2011 07:49:25 UTC

Message: Failed

Line: 1093

Char: 482

Code: 0

URI: http://www.google.com/uds/api/visualization/1.0/24ed5fd565eea706bbc8336d2c891ba7/default,geomap,intensitymap,table,gauge,corechart,imagechart,imagesparkline.I.js

====================================================================

Have tried various permutations but with no success.

Hoping that's good feedback to either:

1. help you get it working

2. get me a bit more help in how to make it work my end! :)

Cheers Bryan.

Liking it a lot.

Regards,

. Matthew.


At 17 FEB 2011 03:17AM Bryan Shumsky wrote:

Hi, Matthew. So, you're getting _some_ of the Google Graphs, but not the Gauge? Or you're not seeing any of the Google Graphs?


At 17 FEB 2011 03:23AM Matthew Jones wrote:

Can see bar & pie, but not gauge.

. Matthew.


At 17 FEB 2011 03:25AM Matthew Jones wrote:

Ooooh, saw "table" as well!


At 17 FEB 2011 03:28AM Bryan Shumsky wrote:

…all using the same 'data source' (your stored procedure)?


At 17 FEB 2011 03:37AM Matthew Jones wrote:

Yes, same stored procedure.


At 17 FEB 2011 03:49AM Matthew Jones wrote:

From the Google selections, I can see:

. 3D Pie - Yes

. Gauge - No - browser error as reported before

. GeoMap - Yes

. Intensity Map - Yes

. Area Chart - No - "Invalid Argument"

. Sparkline - No - "Invalid type in column 0. Expected: number, actual: string.

. Table - Yes

. Line - Yes

. Scatter - No - "The x-axis column cannot be of type string"

. Bar - Yes

. Pie - Yes

. Stacked Line - Yes

. Stacked Bar - Yes

. Horizontal Bar - Yes

. Horizontal Stacked Bar - Yes

The Gauge is the only one that returns an actual ungraceful browser error. The others look as though they are trapped errors.

Hope that helps.

. Matthew.


At 17 FEB 2011 08:58AM Bryan Shumsky wrote:

Hi, Matthew. Just tried it myself, and it worked properly, so…

Let's go over the pieces, piece by piece. If you run through your O4W Dashboard Wizard with me, can you verify that:

1. On the 'panels' tab your graph source is a Stored Procedure;

2. On the 'charts' tab, you have specified the stored procedure name, ticked the box that says 'Treat labels as string' for the x-axis, and have the graph type set as 'Gauge'

In my stored procedure, the code for my example is very simple:

Subroutine SAMPLE_SOURCE(chartid, seriesname, x, y)

x=Temperature"

y=70"

return 0

This produces a gauge labeled "Temperature", from 0 to 100, showing the dial set at 70.


At 17 FEB 2011 07:51PM Matthew Jones wrote:

All as simple as you say.

New dashboard def using the wizard as you say.

New stored procedure like yours.

Error still as below! :(

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C; InfoPath.3; .NET4.0E)

Timestamp: Fri, 18 Feb 2011 00:34:23 UTC

Message: Failed

Line: 91

Char: 112

Code: 0

URI: http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js

Message: Object doesn't support this property or method

Line: 156

Char: 1

Code: 0

URI: http://emrildev/emril.rdbeta/oecgi3.exe/O4W_RUN_DASHBOARD?GRAPHID=MJDASHTEST

Means nothing to me - maybe it means something to you!! :)

Hope that helps.

. Matthew.


At 17 FEB 2011 11:57PM Bryan Shumsky wrote:

Hi, Matthew. No, sorry, doesn't mean anything to me from looking at it. So let's ask a few more questions - what browser are you using? What version of the browser? Which jQuery "data source" are you using - the Google CDN, or the local copy that's built in to O4W?


At 18 FEB 2011 01:03AM Matthew Jones wrote:

MS IE 8.0.7600.16385, Cipher Strength 256-bit

jQuery Data Source: Google CDN

URL for jQuery css files from Google CDN: ajax.googleapis.com/ajax/libs/jqueryui/ jQuery Version: 1.4.4 with UI 1.8.6 How about you? Some other combo I should try? </QUOTE> —- === At 18 FEB 2011 01:07AM Matthew Jones wrote: === <QUOTE>Hey, just tried it with Google Chrome - and it WORKS!! :) Hmmmm! And the $64 million question - how to set options? :) </QUOTE> View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/7265746ce905379c8525783900146aa7.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1