Algemeen forum ontrent de ontwikkelng, design en hosting van weergerelateerde websites (dit laatste om een beetje on topic te blijven)
Door Bernez
#57713
Dag allemaal,

Ik heb de steelseries gauges wel aan de praat, maar hoe krijg je voor elkaar dat de grafiekjes getoond worden bij een mouseover.
http://www.ollivier.nl/weather/steelseries/gauges-ssT-nl.htm

De .php bestanden in wxgraphs werken wel.
Bijvoorbeeld: http://www.ollivier.nl/weather/wxgraphs/baro_24hr.php

Ik vermoed dat 't in het bestand "ddimgtooltip.js" ergens moet ingesteld worden, maar ik vind de commentaar niet echt duidelijk.
Code: Selecteer alles
Each tooltip's syntax should be as follows:

  tooltip[x]=['path_to_image', 'optional desc', optional_CSS_object]

Where x should be an sequential integer starting from 0, with the following 1 to 3 components defined:
   1. Full path or URL to the tooltip image
   2. Description that is displayed beneath the image (optional)
   3. Object containing the desired CSS properties to add to the tooltip.
      The syntax should be:
      {property1:"cssvalue1", property2:"cssvalue2", etc}
      where "property" should be a valid CSS property, and "value" a valid CSS value.
      If more than one pair is defined, separate each pair with a comma.
*/
var ddimgtooltip={
  tiparray:function(){
    var tooltips=[];
    var style = {background:"#FFFFFF", color:"black", border:"2px ridge darkblue"};
    if (g_showPopupDataGraphs) {
        tooltips[0]=[(g_tipImgs[0][0] !== null ? g_imgPathURL + g_tipImgs[0][0] : null), " ", style];
        tooltips[1]=[(g_tipImgs[1][0] !== null ? g_imgPathURL + g_tipImgs[1][0] : null), " ", style];
        tooltips[2]=[(g_tipImgs[2] !== null ? g_imgPathURL + g_tipImgs[2] : null), " ", style];
        tooltips[3]=[(g_tipImgs[3] !== null ? g_imgPathURL + g_tipImgs[3] : null), " ", style];
        tooltips[4]=[(g_tipImgs[4][0] !== null ? g_imgPathURL + g_tipImgs[4][0] : null), " ", style];
        tooltips[5]=[(g_tipImgs[5] !== null ? g_imgPathURL + g_tipImgs[5] : null), " ", style];
        tooltips[6]=[(g_tipImgs[6] !== null ? g_imgPathURL + g_tipImgs[6] : null), " ", style];
        tooltips[7]=[(g_tipImgs[7] !== null ? g_imgPathURL + g_tipImgs[7] : null), " ", style];
        tooltips[8]=[(g_tipImgs[8] !== null ? g_imgPathURL + g_tipImgs[8] : null), " ", style];
        tooltips[9]=[(g_tipImgs[9] !== null ? g_imgPathURL + g_tipImgs[9] : null), " ", style];
    } else {
        tooltips[0]=[null, " ", style];
        tooltips[1]=[null, " ", style];
        tooltips[2]=[null, " ", style];
        tooltips[3]=[null, " ", style];
        tooltips[4]=[null, " ", style];
        tooltips[5]=[null, " ", style];
        tooltips[6]=[null, " ", style];
        tooltips[7]=[null, " ", style];
        tooltips[8]=[null, " ", style];
        tooltips[9]=[null, " ", style];
    }   
    return tooltips; //do not remove/change this line
  }(),

  tooltipoffsets: [20, -30], //additional x and y offset from mouse cursor for tooltips

  tipDelay: 1000,


Is dit wel de goede bestand ? Wat moet ik aanpassen en hoe ? Graag een voorbeeldje.

Grt.
Bernez
Door wvdkuil
#57714
Bernez schrijft:
Dag allemaal,

Ik heb de steelseries gauges wel aan de praat, maar hoe krijg je voor elkaar dat de grafiekjes getoond worden bij een mouseover.
http://www.ollivier.nl/weather/steelseries/gauges-ssT-nl.htm

De .php bestanden in wxgraphs werken wel.
Bijvoorbeeld: http://www.ollivier.nl/weather/wxgraphs/baro_24hr.php

. . . ingekort door wim. . . .
Is dit wel de goede bestand ? Wat moet ik aanpassen en hoe ? Graag een voorbeeldje.
Grt.
Bernez

volgens mij moet je een andere setting aanpassen
Dit is de foutboodschap in javascript:
Code: Selecteer alles
GET http://www.ollivier.nl/public/sites/www.ollivier.nl/weather/wxgraphs/rain_24hr.php 404 (Not Found)

Er staat dus
Code: Selecteer alles
public/sites/www.ollivier.nl/
teveel.
Dit is de definitie in gauges.js:
Code: Selecteer alles
var g_imgPathURL            = "/public/sites/www.ollivier.nl/weather/wxgraphs/";   
         //*** Change this to the relative path for your 'Trend' graph images

Je hebt nu een full path ingevuld. Relative wil zeggen t.o.v. waar het script draait.
Ik zou eerst proberen met
Code: Selecteer alles
var g_imgPathURL            = "./weather/wxgraphs/"; 

Immers de graphs staan in de map ./weather/wxgraphs/
Groeten, Wim
Door Bernez
#57715
Hoi Wim,

Bedankt, om mij in de goede richting te wijzen :)
Het werkt !!! :woohoo:
Ik had al de relative path gebruikt, maar ik had een denkfout gemaakt.
Ik dacht in eerste instantie dat het pad relatief aan "gauge.js" was.
Maar hij is relatief aan "gauges-ssT-nl.htm".
Dus wat voor mij werkt is:
Code: Selecteer alles
var g_imgPathURL            = "../wxgraphs/";   
         //*** Change this to the relative path for your 'Trend' graph images


Nu nog spellen met de opmaak (fonts, size, color, etc).

Nog bedankt voor je inzet

Groetjes,
Bernez
  • 1
  • 5
  • 6
  • 7
  • 8
  • 9