cloudy

Author Topic: Sparkline  (Read 21790 times)

0 Members and 1 Guest are viewing this topic.

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Sparkline
« on: October 09, 2007, 06:59:13 PM »
new(old)toy
using (thank you brian) clientrawhour.txt

this is again some basic package (someone will turn it in to realy usable ? only metric so far)

you can see those in action at my homepage

« Last Edit: October 23, 2007, 06:57:18 AM by pinto »

Bashy

  • Guest
Re: Sparkline
« Reply #1 on: October 09, 2007, 07:32:47 PM »
Hi Pinto

I would like to have a play with this, are there any instructions please?

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: Sparkline
« Reply #2 on: October 09, 2007, 08:10:35 PM »
Hi Pinto

I would like to have a play with this, are there any instructions please?
inside the zip you find 4 files and the library
inside the 4 files you have to change the hostlocation to point to the folder where your clientraw-files are

that are the basics

you have to play with it to translate the titles, and some calculation function to change from c to f or hPa to inHg)

like I said, this is very basic, need someone to play with it to make it really usable

Jozef

Bashy

  • Guest
Re: Sparkline
« Reply #3 on: October 09, 2007, 08:13:04 PM »
I just got my temp to work, when i got the email saying you replied :)

Cheers m8 much appreciated :)

http://www.bashys-place.com/weather/sparkline/temp.php

just need to sort the others an implement, perhaps tomorrow now :)

Thanks again

Bashy

  • Guest
Re: Sparkline
« Reply #4 on: October 09, 2007, 08:31:31 PM »
Just been trying to figure out how to lower the data a little as its cramped to the title.
I noticed you have managed it but i cannot for the lif of me see where to change it
I thought it was in the sparkline.php as theres some font and stuff in there?

see my humidity please http://www.bashys-place.com/weather/sparkline/hum.php

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: Sparkline
« Reply #5 on: October 09, 2007, 08:45:32 PM »
do not change anything in the library-files please, if you have to change something about the look and feel you have to do it in the 4 files themselves

$sparkline->SetPadding(5); // setpadding is additive

Bashy

  • Guest
Re: Sparkline
« Reply #6 on: October 09, 2007, 08:47:08 PM »
Ah, excellent, that makes sense, thanks a lot :)

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: Sparkline
« Reply #7 on: October 09, 2007, 08:57:50 PM »
if you want to know more about sparklines PHP  http://sparkline.org/

Offline edje1205

  • edje
  • Posts: 1,819
  • Zaandam Holland, the Netherlands
    • http://www.weersverwachtingen.eu
Re: Sparkline
« Reply #8 on: October 09, 2007, 09:24:37 PM »


Got it to work  :D

thanks Joske !

Ed
Woodenshoes,mills,hightech;but random weather
www.weersverwachtingen.eu
P4 2,2Ghz-2GB RAM-Win2K-Broadb.connect


Bashy

  • Guest
Re: Sparkline
« Reply #9 on: October 10, 2007, 07:34:28 PM »
Hi pinto, finally got mine installed http://www.bashys-place.com/weather/
I follow your code to implement it, i hope you dont mind

Thanks again for your help, much appreciated :)

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: Sparkline
« Reply #10 on: October 10, 2007, 07:51:11 PM »
those lines disappearing sometimes

Code: [Select]
if (isset($_GET['m']) &&
    $_GET['m'] == '0') {
f (isset($_GET['m']) &&
    $_GE  $sparkline->Render(200, 50);
} else {
  $sparkline->SetLineSize(2); // for renderresampled, linesize is on virtual image
  $sparkline->RenderResampled(200, 30);
}

replace with (there was still to much code from the samples in it)
Code: [Select]
  $sparkline->Render(200, 50);

sorry about that, I updated the zipfile in my first post

and, I put it here so everybody could use it

Jozef


Bashy

  • Guest
Re: Sparkline
« Reply #11 on: October 10, 2007, 07:55:27 PM »
Hi m8

Do you want me to replace all that code with your code?
Code: [Select]
  $sparkline->Render(200, 50);

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: Sparkline
« Reply #12 on: October 10, 2007, 07:59:50 PM »
Hi m8

Do you want me to replace all that code with your code?
Code: [Select]
  $sparkline->Render(200, 50);
maybe, download the zip in the first page again and translate the titles, then you don't have those disappearing lines anymore

Offline edje1205

  • edje
  • Posts: 1,819
  • Zaandam Holland, the Netherlands
    • http://www.weersverwachtingen.eu
Re: Sparkline
« Reply #13 on: October 10, 2007, 08:51:20 PM »

Hi Joske,

Works fine nice gadget  :D

Question: I try to set the background of the cell from 'white' to 'blue' or 'clouds.jpg' or 'transparent' in sparkline.php but it takes no effect

what's the best manner in this case (prefere transparent)

http://www.weersverwachtingen.eu/clientraw/index.php

grtz
edje
Ed
Woodenshoes,mills,hightech;but random weather
www.weersverwachtingen.eu
P4 2,2Ghz-2GB RAM-Win2K-Broadb.connect


Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: Sparkline
« Reply #14 on: October 10, 2007, 09:11:14 PM »
sorry, I don't know the answer, I am searching to change the backgroundcolor, but all I can do is make it black
EDIT:just found:
$sparkline->SetColorHtml('background', '#ddddff');
$sparkline->SetColorBackground('background');

don't know what they do yet, bedtime here

« Last Edit: October 10, 2007, 09:20:11 PM by pinto »