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: 

Graph X-Axis Labels are appearing in middle for negative y-axis values

Former Member
0 Kudos

Hi,

In my Graph Output, the X-Axis Labels are appearing in the middle (where zero is appearing) if the Y-Axis values are negative.

It's a Line-Graph.

Can anyone let me know how to move the X-Axis Labels to down?

I'm using a custom Function module same as 'GFW_PRES_SHOW_MULT' wherein I'm modifying the line colors and appearance. I have to edit in this Function Module to make the X-Axis Labels appear correctly (below) even when there are negative values.

Please let me know which Parameter of the Class CL_CU_AXIS I've to use.

Here's the piece of code:

CALL METHOD graphic_proxy-ref->add_cu_bundle
            EXPORTING
              port   = if_graphic_proxy=>co_port_chart_y_prim_axis
              bundle = bundle_axis
            IMPORTING
              retval = local_retval.

Thanks & Regards,

Sowmya

4 REPLIES 4

former_member382625
Participant
0 Kudos

Hi Sowmya,

I face similar issue. Did you find a solution to your problem?

Thanks and Regards,

Neha

0 Kudos

Hi Neha,

I used OLE2 Method.

Please refer to the Doc:

Copying Data From Excel.

It is very helpful.

Also,  below threads might be useful:

Graph to be displayed in Excel

ABAP OLE2

Regards,
Sowmya

0 Kudos

Hi Sowmya,

Im Lakshmi working as an ABAP Developer. I have seen your profile in SCN. I saw  your postings about OLE charts.

I have a requirement to

1) Output data from an internal table into excel, and

2) Create a chart from the data in excel

So far I have been able to export the data using OLE calls, created a chart object,.

My question:

1. How to put Data Lables

2. How to put Data Table under the Chart

3. How to rename the series names.

Below is the recorded Macro. I don't know how to convert it to ABAP.

Sub Macro1()

ActiveSheet.Shapes.AddChart.Select

ActiveChart.ChartType = xlColumnClustered

Application.CutCopyMode = False

ActiveChart.SetSourceData Source:=Range("B1:E4")

ActiveChart.SeriesCollection(1).Name = "=Sheet2!$A$2"

ActiveChart.SeriesCollection(2).Name = "=Sheet2!$A$3"

ActeChart.SeriesCollection(3).Name = "=Sheet2!$A$4"

ActiveChart.SetElement (msoElementDataLabelOutSideEnd)

ActiveChart.SetElement (msoElementDataTableWithLegendKeys)

End Sub

I have attached the current output and expected output.

I have searched about this in google but i could not find any solution for this.

Your help is greatly appreciated.

Thanks,

Lakshmi.

0 Kudos

Hi Sowmya,

Here is the Current and Expected Output.

Current Output:

Expected Output: