Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     scatter plots, with text _labelled data points
Go
New
Search
Notify
Tools
Reply
  
scatter plots, with text _labelled data points
 Login/Join
 
Expert
posted
graphics guru's:
how can i make a scatter plot with the points labelled with text, not values.
any idea?
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
<Grzegorz>
posted
If you are going to change the Tool Tip on the scatter points, you can use the following GRAPHSTYLE * API functions:

  • setUserToolTip("Any Text")
  • setDeveloperToolTip("Any Text")
  • setToolTipMode(true/false)
  • etc.

Note: The tooltip functions, does not work with GRAPHEDIT=SERVER mode.

If you are going to change the Y1Axis labels for the scatter chart it is not so easy. the same if you would like to have different ToolTip text for the different points.
 
Reply With QuoteReport This Post
Expert
posted Hide Post
hi Gregorz, thanks for answering.
I'm not sure i understand.
What i want is every point to be labelled with its own label, ie "Dresses", "shoes", "hats", etc.
it seems from your suggestion that "anytext" is a one-label event, and every point would be labelled with whatever is in "anytext". Am i reading you correctly??
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
<Grzegorz>
posted
quote:
it seems from your suggestion that "anytext" is a one-label event, and every point would be labelled with whatever is in "anytext". Am i reading you correctly??
Yes, exactly. The GRAPHSTYLE API commands concern the whole perspective, i.e. the whole chart or even "charting engine". It is really difficult (if possible) to apply the API to individual chart points using GRAPHSTYLE *.
setDataTextDisplay and setDataTextTemplateScatter invokations, does not allow to achieve "dynamic text labels" as well.
It is possible to experiment with textures instead (e.g. texture images with texts), something like the example (it does not work for me - textures look dimly):


GRAPH FILE CAR
ON GRAPH SET 3D OFF
ON GRAPH SET VAXIS 900
ON GRAPH SET HAXIS 1200
PRINT
COMPUTE SALE_EN/D8.2 = IF COUNTRY EQ 'ENGLAND' THEN SALES ELSE 0; AS 'England'
COMPUTE SALE_FR/D8.2 = IF COUNTRY EQ 'FRANCE' THEN SALES ELSE 0; AS 'France'
COMPUTE SALE_GE/D8.2 = IF COUNTRY EQ 'W GERMANY' THEN SALES ELSE 0; AS 'Germany'
COMPUTE SALE_IT/D8.2 = IF COUNTRY EQ 'ITALY' THEN SALES ELSE 0; AS 'Italy'
COMPUTE SALE_JP/D8.2 = IF COUNTRY EQ 'ENGLAND' THEN SALES ELSE 0; AS 'Japan'
BY SEATS
ON GRAPH SET GRAPHSTYLE *
setGraphType(61);
setDataTextDisplay(false);
setLegendDisplay(false);
-REPEAT :MLOOP FOR &CNT FROM 1 TO 5
-SET &SER_NR = &CNT - 1;
setMarkerSize(getSeries(&SER_NR), 48);
setMarkerShape(getSeries(&SER_NR), 1);
setSeriesFillColor(&SER_NR, new Color(255,255,255));
setFillType(getSeries(&SER_NR), 3);
setTextureDisplayMode(getSeries(&SER_NR), 0);
setTextureURL(getSeries(&SER_NR), "file:/D:/ibi/apps/tests/images/&SER_NR|.gif");
-:MLOOP
END
END
Regards
Grzegorz

This message has been edited. Last edited by: <Mabel>,
 
Reply With QuoteReport This Post
Expert
posted Hide Post
wow, gregorz, you've taught me a huge amount!
i did actually just give up and write a scatter program in pure html , taking its values from a fex and writing span tags with abs. positioning.
The hard way, but got it done.
Thanks for your code example; i'll study it very carefully.
Cheers!
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     scatter plots, with text _labelled data points

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.