how can i make a scatter plot with the points labelled with text, not values.
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.
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??
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
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'
ON GRAPH SET GRAPHSTYLE *
-REPEAT :MLOOP FOR &CNT FROM 1 TO 5
-SET &SER_NR = &CNT - 1;
setSeriesFillColor(&SER_NR, new Color(255,255,255));
GrzegorzThis message has been edited. Last edited by: <Mabel>,
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.
|Powered by Social Strata|