Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

changing font size on sap graphics

0 Kudos


Hello there!

I'm
using a program based on GFW_PROG_LABELS demo program.

I need to change the font size of the labels on the "X" axis of the graph.

for example label "Here is the long name off..."

 

Thank you,

koby

1 REPLY 1

naimesh_patel
Active Contributor
0 Kudos

I think, GFW doesn't support the font size on the axis.

For font size, the attribute with constant CO_TF_SIZE is used. It is not defined, nor added in the attributes for the axis. The constant CO_TF_SIZE exist in the class CL_CU_DISPLAY_CONTEXT and can be used for all the objects which are type ref to this.

If you want to play around, you can get the X axis object by using the method GET_CU_BUNDLE with port type CO_PORT_CHART_X_PRIM_AXIS.


* get X

   call method gp_instance->if_graphic_proxy~get_cu_bundle

     exporting port        = if_graphic_proxy=>co_port_chart_x_prim_axis

               bundle_type = cl_cu=>CO_CLSID_AXIS

     importing bundle      = bundle.

"  doesn't work.. as CO_TF_SIZE is not supported attribute for axis

"   CALL METHOD bundle->SET

"     EXPORTING ATTR_ID = CL_CU_DISPLAY_CONTEXT=>CO_TF_SIZE

" VALUE   = 7.

Regards,
Naimesh Patel