cloudy

Author Topic: Flash chart (from clientraw files) - OFC  (Read 36730 times)

0 Members and 1 Guest are viewing this topic.

Offline steve26

  • Posts: 249
  • Drôme - France
Flash chart (from clientraw files) - OFC
« on: April 25, 2008, 11:53:10 AM »
Hi all !
Who knows OFC ? Open flash chart
I discovered this open source script last week, and i found it interesting !

Here are somes samples graphs :
http://pullmonkey.com/projects/open_flash_chart
http://noteplog.com/projects/gallery-open-flash-chart.php

And here, i create (quickly) a chart of outside temperature (last 24h)

http://www.valentinois.net/forums/weatherd/31434/ofc/outside-temp.php (english language by default)
http://www.valentinois.net/forums/weatherd/31434/ofc/outside-temp.php?lang=en (same page, in english too)
http://www.valentinois.net/forums/weatherd/31434/ofc/outside-temp.php?lang=fr (in french)

I think that's a good starting point to create beautiful and usefull charts, and insert them where you want in your website.

EDIT : ofc 2 available : http://teethgrinder.co.uk/open-flash-chart-2/
« Last Edit: April 09, 2009, 06:27:11 PM by steve26 »

Bashy

  • Guest
Re: Flash chart (from clientraw files)
« Reply #1 on: April 25, 2008, 12:10:45 PM »
wow, i do like them, thanks for sharing :)

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: Flash chart (from clientraw files)
« Reply #2 on: April 25, 2008, 12:15:59 PM »
yes, great stuff, and ... here is how


Jozef

Offline steve26

  • Posts: 249
  • Drôme - France
Re: Flash chart (from clientraw files)
« Reply #3 on: April 25, 2008, 12:17:10 PM »
Cool, I need to make again some tests, and i'll post my code (php).

Excellent Jozef :-)

Bashy

  • Guest
Re: Flash chart (from clientraw files)
« Reply #4 on: April 25, 2008, 12:19:23 PM »
wow, cant believe i aint seen this before, thanks Jozef me gonna have a playe me thinks :)

Offline weatherc

  • Posts: 1,691
  • Salo, Finland
    • Weatherstation Salo,FI
Re: Flash chart (from clientraw files)
« Reply #5 on: April 25, 2008, 12:37:51 PM »
WOW! Very cool! :D

Offline saratogaWX

  • Posts: 4,672
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: Flash chart (from clientraw files)
« Reply #6 on: April 25, 2008, 10:34:26 PM »
Absolutely awesome and very useful!  Thanks for the links and thanks Jozef for the directions!

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline steve26

  • Posts: 249
  • Drôme - France
Re: Flash chart (from clientraw files)
« Reply #7 on: April 26, 2008, 09:45:37 AM »
If someone wants to test the 2 charts visible in my first post, you can download this file :
http://www.valentinois.net/forums/weatherd/31434/ofc.zip



Unpack the ofc.zip archive on your webserver.
Edit /clientraw_data.php to change the clientraw files folder.
Call http://yourwebsite/ofc/outside-temp.php to see the 2 charts (for outside temp, in english) !
And http://yourwebsite/ofc/outside-temp.php?lang=fr to display charts in french.

There are some comments in php files.
I create 2 languages files, but the french file is not yet fully translated. (only 2 or 3 words for my tests).

Y-axis is automatically adjusted with a calculated min and max value.
Code: [Select]
$ymin = round(min($data_array)); //get the min outside temp
$ymax = round(max($data_array)); //get the max outside temp
$g->set_y_min( $ymin-1 );
$g->set_y_max( $ymax+1 );

Offline MD5

  • Posts: 161
  • Pieve Ligure - Italy
    • PLMeteo.Info Weather Station
Re: Flash chart (from clientraw files)
« Reply #8 on: April 27, 2008, 10:39:55 AM »
Thanks all for the useful information and samples, I never heard before about this graph tool.
I put in use the sample you submit and I'm now learning how to change colors, chart type etc.

I wonder about your opinion between this tool Vs. JPGraph.

Greetings,

Mario

Offline broadstairs

  • Stuart
  • Posts: 6,248
  • Broadstairs, Kent, UK
    • Broadstairs
Re: Flash chart (from clientraw files)
« Reply #9 on: April 27, 2008, 10:50:04 AM »
I too have had a play with this new tool. The graphs are very good but I think the main difference between this and JPGraph seems to be the animation of the plot point data appearing as you mouseover. Currently I'm not sure that the graphs refresh data like they do in WDL without a refresh of the page. If they can be updated as the clientraw files update without the user doing anything (AJAX perhaps) then they would have their place for showing near realtime data like in clientraw, not sure about the data in the other files as it does not change enough. I think in general I cannot see any pressing reason to change from JPGraph at present, however if starting out from scratch then both would be equally good candidates to look at.

Stuart

Offline steve26

  • Posts: 249
  • Drôme - France
Re: Flash chart (from clientraw files)
« Reply #10 on: April 27, 2008, 07:41:29 PM »
Take a look here for auto-reload :)
http://www.cyberdyne.org/~icebrkr/ofc/

Offline steve26

  • Posts: 249
  • Drôme - France
Re: Flash chart (from clientraw files)
« Reply #11 on: April 29, 2008, 02:08:15 PM »
« Last Edit: April 30, 2008, 03:15:41 PM by steve26 »

Offline TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Global Moderator
  • Posts: 5,868
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Flash chart (from clientraw files)
« Reply #12 on: April 29, 2008, 02:39:30 PM »
Nice.


All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline steve26

  • Posts: 249
  • Drôme - France
Re: Flash chart (from clientraw files)
« Reply #13 on: April 30, 2008, 03:06:22 PM »

Offline strandvejr

  • Seaman
  • Posts: 167
  • Sortsø Strand - Denmark
    • Vejrstation Sortsø Strand
Re: Flash chart (from clientraw files)
« Reply #14 on: April 30, 2008, 06:43:46 PM »
Hi,

Great feature - BUT:

I cant get it to display anything. I followed all the directions from both Pinto and Steve - but no luck. It seems like that the flash isnt loading.

Here is the testfile on my site www.strandvejr.dk/chart-test.php and another one www.strandvejr.dk/ofc/outside-temp.php

Here is a part of my code in the chart-data.php
Code: [Select]
<?php
//Thanks to Kevin Reed from http://TNETWeather.com
//for the script to import the weather data into arrays
$hostloc "./";
$clientrawextra get_raw("${hostloc}clientrawextra.txt");

My clientraw files is in the root directory.

Any idea whats wrong and why I cant display the flash chart? I have a flash player installed at my computer.

strandvejr 8)