Application Development and Automation 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: 

I want to draw comparative curve graphs

Former Member
0 Kudos
505

I want to draw comparative curve graphs using ABAP given in below format

6 REPLIES 6

Jelena_Perfiljeva
Active Contributor
0 Kudos
388

And what is your question?

Former Member
0 Kudos
388

Facing issue to draw second graph (red color ) after point 3 of X axis graph is going in continue format. I want to stop continue plotting of graph.

I am using STAT_GRAPH_REF function module.

Sandra_Rossi
Active Contributor
388

With STAT_GRAPH_REF, each "curve" must have the same number of points. So, it's impossible to achieve your goal using this function module.

Instead, use STAT_GRAPH, which allows any number of points in each curve.

0 Kudos
388

Hi Sandra,

Is it possible to draw comparison curve graph using STAT_GRAPH as I have to draw actual curve and planned curve graph.

388

I thought that my answer was clearly Yes.

So, to be more clear, if you want something like:

Then use a code like this one:

DATA: OPTS TYPE TABLE OF char80,
      BEGIN OF DATA OCCURS 1,
        X TYPE I,
        Y TYPE I,
      END OF DATA.
APPEND '$2     ' TO opts. " the 1st curve has 2 points
APPEND 'COLOR=5' TO opts. " MAGENTA
APPEND '$3     ' TO opts. " the 2nd curve has 3 points
APPEND 'COLOR=4' TO opts. " GREEN
" the 1st curve has 2 points
data-x = 2. data-y = 4. APPEND data.
data-x = 4. data-y = 5. APPEND data.
" the 2nd curve has 3 points
data-x = 1. data-y = 8. APPEND data.
data-x = 3. data-y = 7. APPEND data.
data-x = 5. data-y = 4. APPEND data.
CALL FUNCTION 'STAT_GRAPH'
  TABLES
    opts = opts
    data = data.

0 Kudos
388

Thanks for your help