Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Images on graphs [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Images on graphs [SOLVED]
 Login/Join
 
<Meghan>
posted
Is there a way to display an image on a graph - for example, have an image inside of an annotation box? What I'm looking to do is add a plus and a minus sign to my graph to have it show the desired direction that the data should be going in. I also want there to be a tag over those images that provides more information - basically an alt text or hover help over the image.

This message has been edited. Last edited by: <Meghan>,
 
Report This Post
<JG>
posted
Meghan just a little bit of searching on the forum would give you exactly what you need.

I published a dev tip on this several years ago and it's been raised as a topic several times
 
Report This Post
<Meghan>
posted
Thank you JG. I was able to successfully get an image into an annotation box. My next question then is: Is it possible to have a hover text on the annotation box? Any help or direction would be greatly appreciated.
 
Report This Post
<JG>
posted
Simple answer to that is unfortunately no.

There is no way to attach the equivalent of an ALT tag within WebFOCUS images.

However if you are just doing HTML output then you could use CSS to give you the hover functionality
based on a fixed area on the html page.

Here is an example
You will see reference to a file /approot/baseapp/hover.gif
This is just a 1x1 pixel transparent gif image that you will need to create.
You have to hold your graph to a location on the APP PATH (or other location that the webserver can see)
as it must be displayed in an HTMLFORM


 
APP HOLD BASEAPP
GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH HOLD AS image1 FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setPlace(true);
setFillColor(getAnnotationBox(0),new Color(255,255,128));
setTextString(getAnnotation(0)," ");
setDisplay(getAnnotation(0),true);
setFillType(getAnnotationBox(0),3);
setTextureURL(getAnnotationBox(0),"/images/alert/alert_bell.gif");
setTextureDisplayMode(getAnnotationBox(0),1);
setDepthRadius(0);
setDepthAngle(0);
setRect(getAnnotation(0),new Rectangle(-12533.0,6303.0,8000.0,7757.0));
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<HTML>
<HEAD>
<STYLE type="text/css">
body {
  font-family: tahoma; arial, sans-serif;
  }
#imap {
  display:block;
  width:800px;
  height:500px;
  background:url(../approot/baseapp/image1.png) no-repeat;
  position:relative;
  }
#imap a#title {
  display:block;
  width:400px;
  height:0;
  padding-top:240px;
  overflow:hidden;
  position:absolute;
  left:0;
  top:0;
  background:transparent url(..../approot/baseapp/image1.png) no-repeat 400px 400px;
  cursor:default;
  }
* html #imap a#title {
  height:240px;
  he\ight:0;
  }

#imap a#title:hover {
  background-position: 0 0;
  z-index:10;
  }
#imap dd {
  position:absolute;
  padding:0;
  margin:0;
  }
#imap #picp {
  left:85px;
  top:20px;
  z-index:20;
  }
#imap a#graph {
  display:block;
  width:180px;
  height:100px;
  background:transparent url(../approot/baseapp/hover.gif) -100px -100px no-repeat;
  text-decoration:none;
  z-index:20;
  }
#imap a span, #imap a:visited span {
  display:none;
  }
#imap a#graph:hover {
  background-position:0 0;
  }
#imap a:hover span {
  position:absolute;  
  width:388px; 
  display:block; 
  font-family:arial; 
  font-size:12px; 
  background:#eee; 
  color:#000; 
  border:1px solid #000; 
  padding:5px;
  }
* html #imap a:hover span {
  width:400px; w\idth:388px;
  }
#imap a#graph:hover span {
  left:-36px; 
  top:110px;
  }
#imap a span:first-line {
  font-weight:bold; 
  font-style:italic;
  }

</STYLE>

</HEAD>

<BODY>
<dl id="imap">

 <dd id="picp">
  <a id="graph" title="The graph" href="#nogo">
   <span>
    If you want to know
    <br />
    This is how you do it
   </span>
  </a>
 </dd>

</dl>

</body>
</HTML>
-HTMLFORM END

 


In actual fact you can put anythng you want into the graph using the CSS map method.

The version below displays the report when hovering over the annotation, If you want to spend the time
and the number and width of the ordinal axis plot ponits is static then you could expand the method
and have a different report popup for every point, instead of using drilldowns.
(means pre generation all of the reports)

  
APP HOLD BASEAPP
GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH HOLD AS image1 FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setPlace(true);
setFillColor(getAnnotationBox(0),new Color(255,255,128));
setTextString(getAnnotation(0)," ");
setDisplay(getAnnotation(0),true);
setFillType(getAnnotationBox(0),3);
setTextureURL(getAnnotationBox(0),"/images/alert/alert_bell.gif");
setTextureDisplayMode(getAnnotationBox(0),1);
setDepthRadius(0);
setDepthAngle(0);
setRect(getAnnotation(0),new Rectangle(-12533.0,6303.0,8000.0,7757.0));
ENDSTYLE
END
-RUN
TABLE FILE CAR
SUM DEALER_COST
BY CAR
BY MODEL
ON TABLE HOLD AS REPORT1 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
<HTML>
<HEAD>
<STYLE type="text/css">
body {
  font-family: tahoma; arial, sans-serif;
  }
#imap {
  display:block;
  width:800px;
  height:500px;
  background:url(../approot/baseapp/image1.png) no-repeat;
  position:relative;
  }
#imap a#title {
  display:block;
  width:400px;
  height:0;
  padding-top:240px;
  overflow:hidden;
  position:absolute;
  left:0;
  top:0;
  background:transparent url(..../approot/baseapp/image1.png) no-repeat 400px 400px;
  cursor:default;
  }
* html #imap a#title {
  height:240px;
  he\ight:0;
  }

#imap a#title:hover {
  background-position: 0 0;
  z-index:10;
  }
#imap dd {
  position:absolute;
  padding:0;
  margin:0;
  }
#imap #picp {
  left:85px;
  top:20px;
  z-index:20;
  }
#imap a#graph {
  display:block;
  width:180px;
  height:100px;
  background:transparent url(../approot/baseapp/hover.gif) -100px -100px no-repeat;
  text-decoration:none;
  z-index:20;
  }
#imap a span, #imap a:visited span {
  display:none;
  }
#imap a#graph:hover {
  background-position:0 0;
  }
#imap a:hover span {
  position:absolute;  
  width:388px; 
  display:block; 
  font-family:arial; 
  font-size:12px; 
  background:#eee; 
  color:#000; 
  border:1px solid #000; 
  padding:5px;
  }
* html #imap a:hover span {
  width:400px; w\idth:388px;
  }
#imap a#graph:hover span {
  left:-36px; 
  top:110px;
  }
#imap a span:first-line {
  font-weight:bold; 
  font-style:italic;
  }

</STYLE>

</HEAD>

<BODY>
<dl id="imap">

 <dd id="picp">
  <a id="graph" title="The graph" href="#nogo">
   <span>
!IBI.FIL.REPORT1;
   </span>
  </a>
 </dd>

</dl>

</body>
</HTML>
-HTMLFORM END

This message has been edited. Last edited by: <JG>,
 
Report This Post
<Meghan>
posted
Thanks JG. Although this would probably work I think it's too much of a work around for what we are trying to do. I think we'll just stick to the image without the hover help - I don't think hard coding a static location is a usable idea for us. I do appreciate you sending the code over though and we may use this in the future.
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Images on graphs [SOLVED]

Copyright © 1996-2020 Information Builders