06-09-2014 2:32 AM
Hello Experts,
I face to a strange problem. I create a bar-chart in 3-D, but somebody see this graphics is 2-D in default.
could you kindly tell how to the customizing setting to set the 3-D as default?
thanks a lot for your help!
best regards,
Tao
06-09-2014 6:59 AM
Hi,
My customization:
FORM do_chart_1_cust_1
CHANGING
ob_gui_chart_engine TYPE REF TO cl_gui_chart_engine
ob_ixml TYPE REF TO if_ixml .
DATA: ob_ixml_document TYPE REF TO if_ixml_document ,
ob_ixml_encoding TYPE REF TO if_ixml_encoding .
DATA: ob_sapchartcustomizing TYPE REF TO if_ixml_element ,
ob_globalsettings TYPE REF TO if_ixml_element ,
ob_defaults TYPE REF TO if_ixml_element ,
ob_charttype TYPE REF TO if_ixml_element ,
ob_elements TYPE REF TO if_ixml_element ,
ob_charttypes TYPE REF TO if_ixml_element ,
ob_columns TYPE REF TO if_ixml_element ,
ob_values TYPE REF TO if_ixml_element ,
ob_series TYPE REF TO if_ixml_element ,
ob_element TYPE REF TO if_ixml_element ."Reused as leaf
ob_ixml_document = ob_ixml->create_document( ).
ob_ixml_encoding = ob_ixml->create_encoding(
byte_order = if_ixml_encoding=>co_little_endian
character_set = 'utf-8' ) .
ob_ixml_document->set_encoding( ob_ixml_encoding ) .
ob_sapchartcustomizing = ob_ixml_document->create_simple_element(
name = 'SAPChartCustomizing' parent = ob_ixml_document ) .
ob_sapchartcustomizing->set_attribute( name = 'version' value = '2.0' ) .
ob_globalsettings = ob_ixml_document->create_simple_element(
name = 'GlobalSettings' parent = ob_sapchartcustomizing ) .
ob_element = ob_ixml_document->create_simple_element(
name = 'Dimension' parent = ob_globalsettings ) .
ob_element->if_ixml_node~set_value( 'Three' ) .
* ob_element->if_ixml_node~set_value( 'Two' ) .
ob_element = ob_ixml_document->create_simple_element(
name = 'ColorPalette' parent = ob_globalsettings ) .
ob_element->if_ixml_node~set_value( 'Streamline' ) .
ob_defaults = ob_ixml_document->create_simple_element(
name = 'Defaults' parent = ob_globalsettings ) .
ob_charttype = ob_ixml_document->create_simple_element(
name = 'ChartType' parent = ob_defaults ) .
* ob_charttype->if_ixml_node~set_value( 'Doughnut' ).
* ob_charttype->if_ixml_node~set_value( 'Pie' ).
* ob_charttype->if_ixml_node~set_value( 'Lines' ).
ob_charttype->if_ixml_node~set_value( 'Columns' ) .
ob_elements = ob_ixml_document->create_simple_element(
name = 'Elements' parent = ob_sapchartcustomizing ) .
ob_charttypes = ob_ixml_document->create_simple_element(
name = 'ChartTypes' parent = ob_elements ) .
ob_columns = ob_ixml_document->create_simple_element(
name = 'Columns' parent = ob_charttypes ) .
ob_element = ob_ixml_document->create_simple_element(
name = 'VaryColorsByPoint' parent = ob_columns ) .
ob_element->if_ixml_node~set_value( 'true' ) .
""""
ob_values = ob_ixml_document->create_simple_element(
name = 'Values' parent = ob_sapchartcustomizing ) .
ob_series = ob_ixml_document->create_simple_element(
name = 'Series' parent = ob_values ) .
ob_series->set_attribute( name = 'id' value = c_series_01 ) .
ob_element = ob_ixml_document->create_simple_element(
name = 'ShowLabel' parent = ob_series ) .
ob_element->if_ixml_node~set_value( 'true' ) .
""""
DATA: g_ixml_sf TYPE REF TO if_ixml_stream_factory.
DATA: ob_ixml_stream_factory TYPE REF TO if_ixml_stream_factory.
DATA: ob_ostream TYPE REF TO if_ixml_ostream .
DATA: xstring TYPE xstring.
DATA: debug_string TYPE string .
ob_ixml_stream_factory = ob_ixml->create_stream_factory( ).
ob_ostream = ob_ixml_stream_factory->create_ostream_cstring( debug_string ).
ob_ixml_document->render( ostream = ob_ostream ) .
ob_ostream = ob_ixml_stream_factory->create_ostream_xstring( xstring ).
ob_ixml_document->render( ostream = ob_ostream ) .
ob_gui_chart_engine->set_customizing( xdata = xstring ) .
ENDFORM . "do_chart_1_cust_1
06-09-2014 4:56 AM
Hi,
What are you using ?
SAP have more then one way to create bar chart....
Regards.
06-09-2014 5:57 AM
I use class cl_gui_chart_engine to create columns chart, someone see it in 3-D but someones not. I set the default customizing of this columns chart as 3-D already. I think somewhere to change the 3-D and 2-D parameters in SAP GUI....
06-09-2014 6:59 AM
Hi,
My customization:
FORM do_chart_1_cust_1
CHANGING
ob_gui_chart_engine TYPE REF TO cl_gui_chart_engine
ob_ixml TYPE REF TO if_ixml .
DATA: ob_ixml_document TYPE REF TO if_ixml_document ,
ob_ixml_encoding TYPE REF TO if_ixml_encoding .
DATA: ob_sapchartcustomizing TYPE REF TO if_ixml_element ,
ob_globalsettings TYPE REF TO if_ixml_element ,
ob_defaults TYPE REF TO if_ixml_element ,
ob_charttype TYPE REF TO if_ixml_element ,
ob_elements TYPE REF TO if_ixml_element ,
ob_charttypes TYPE REF TO if_ixml_element ,
ob_columns TYPE REF TO if_ixml_element ,
ob_values TYPE REF TO if_ixml_element ,
ob_series TYPE REF TO if_ixml_element ,
ob_element TYPE REF TO if_ixml_element ."Reused as leaf
ob_ixml_document = ob_ixml->create_document( ).
ob_ixml_encoding = ob_ixml->create_encoding(
byte_order = if_ixml_encoding=>co_little_endian
character_set = 'utf-8' ) .
ob_ixml_document->set_encoding( ob_ixml_encoding ) .
ob_sapchartcustomizing = ob_ixml_document->create_simple_element(
name = 'SAPChartCustomizing' parent = ob_ixml_document ) .
ob_sapchartcustomizing->set_attribute( name = 'version' value = '2.0' ) .
ob_globalsettings = ob_ixml_document->create_simple_element(
name = 'GlobalSettings' parent = ob_sapchartcustomizing ) .
ob_element = ob_ixml_document->create_simple_element(
name = 'Dimension' parent = ob_globalsettings ) .
ob_element->if_ixml_node~set_value( 'Three' ) .
* ob_element->if_ixml_node~set_value( 'Two' ) .
ob_element = ob_ixml_document->create_simple_element(
name = 'ColorPalette' parent = ob_globalsettings ) .
ob_element->if_ixml_node~set_value( 'Streamline' ) .
ob_defaults = ob_ixml_document->create_simple_element(
name = 'Defaults' parent = ob_globalsettings ) .
ob_charttype = ob_ixml_document->create_simple_element(
name = 'ChartType' parent = ob_defaults ) .
* ob_charttype->if_ixml_node~set_value( 'Doughnut' ).
* ob_charttype->if_ixml_node~set_value( 'Pie' ).
* ob_charttype->if_ixml_node~set_value( 'Lines' ).
ob_charttype->if_ixml_node~set_value( 'Columns' ) .
ob_elements = ob_ixml_document->create_simple_element(
name = 'Elements' parent = ob_sapchartcustomizing ) .
ob_charttypes = ob_ixml_document->create_simple_element(
name = 'ChartTypes' parent = ob_elements ) .
ob_columns = ob_ixml_document->create_simple_element(
name = 'Columns' parent = ob_charttypes ) .
ob_element = ob_ixml_document->create_simple_element(
name = 'VaryColorsByPoint' parent = ob_columns ) .
ob_element->if_ixml_node~set_value( 'true' ) .
""""
ob_values = ob_ixml_document->create_simple_element(
name = 'Values' parent = ob_sapchartcustomizing ) .
ob_series = ob_ixml_document->create_simple_element(
name = 'Series' parent = ob_values ) .
ob_series->set_attribute( name = 'id' value = c_series_01 ) .
ob_element = ob_ixml_document->create_simple_element(
name = 'ShowLabel' parent = ob_series ) .
ob_element->if_ixml_node~set_value( 'true' ) .
""""
DATA: g_ixml_sf TYPE REF TO if_ixml_stream_factory.
DATA: ob_ixml_stream_factory TYPE REF TO if_ixml_stream_factory.
DATA: ob_ostream TYPE REF TO if_ixml_ostream .
DATA: xstring TYPE xstring.
DATA: debug_string TYPE string .
ob_ixml_stream_factory = ob_ixml->create_stream_factory( ).
ob_ostream = ob_ixml_stream_factory->create_ostream_cstring( debug_string ).
ob_ixml_document->render( ostream = ob_ostream ) .
ob_ostream = ob_ixml_stream_factory->create_ostream_xstring( xstring ).
ob_ixml_document->render( ostream = ob_ostream ) .
ob_gui_chart_engine->set_customizing( xdata = xstring ) .
ENDFORM . "do_chart_1_cust_1
06-10-2014 2:21 AM
hello,
These customizing coding had been done in my program before I requested this problem.
The detailed problem is that someone see this columns chart as 3-D but someone not.
06-10-2014 5:38 AM
Hi,
I am trying to solve your problem by eliminations....
Is the program design so the user can save his customiztion and use it as default ?
Ask the user to run program GRAPHICS_GUI_CE_DEMO and see what happen ?
Regards.