Focal Point
scatter plots, with text _labelled data points

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4571077331

April 19, 2004, 10:21 PM
susannah
scatter plots, with text _labelled data points
graphics guru's:
how can i make a scatter plot with the points labelled with text, not values.
any idea?
April 20, 2004, 08:14 AM
<Grzegorz>
If you are going to change the Tool Tip on the scatter points, you can use the following GRAPHSTYLE * API functions:

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.
April 20, 2004, 02:53 PM
susannah
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??
April 21, 2004, 08:45 AM
<Grzegorz>
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>,
April 22, 2004, 06:33 PM
susannah
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!