Secondary Y-Axis in Business Chart NAV 2013

dannytdannyt Member Posts: 6
Hi everybody,

I am currently designing a new business chart for my customer.
It will display the due quantities from Production Orders in dependency of the manufacturing policy.
This works very fine until now.

Now I have a new measure "No. of Production Orders".
There are ~100 due production orders but the due quantities is about 20.000.

I'd like to have a secondary Y-axis which goes up to ~100 and not ~20.000.
You can see the current state with ne no. of prod. orders in the green part of my screenshot.

What I'd like to have you can see in the other screenshot (just an foreign example).


Thank you.

Answers

  • dannytdannyt Member Posts: 6
    My current C/AL code is as follows:
    ChartType_L := 11; // StackedColumn
    
    WITH BusChartBuffer DO BEGIN
      Initialize;
    
      AddMeasure(MakeToStockLbl,1,"Data Type"::Decimal,ChartType_L);
      AddMeasure(MakeToOrderLbl,2,"Data Type"::Decimal,ChartType_L);
      AddMeasure(NoOfPOsLbl,3,"Data Type"::Integer,3);
      
      SetXAxis(DueInDaysLbl,"Data Type"::Integer);
    
      i := 0;
      ProdOrderDueQties_L.RESET;
      IF ProdOrderDueQties_L.FINDSET THEN REPEAT
        AddColumn(ProdOrderDueQties_L."Due in days"); // x-axis
        SetValue(MakeToStockLbl,i,ProdOrderDueQties_L."Make-to-Stock Totals");
        SetValue(MakeToOrderLbl,i,ProdOrderDueQties_L."Make-to-Order Totals");
        SetValue(NoOfPOsLbl,i,ProdOrderDueQties_L."No. of Prod. Orders Totals");
        i+=1;
      UNTIL ProdOrderDueQties_L.NEXT = 0;
    END;
    
  • Peter+is1Peter+is1 Member Posts: 174
    Hi,

    My suggestion would be that you
    a) first get the max value for 'No. of Prod. Orders Totals' and the max value for Quantities and then
    b) in SetValue divide the Quantities by the result of (MAX(Quantities) / MAX(No. of Prod. Orders Totals))

    Perhaps someone sees a better solution but I don't. :(

    Good luck.
    \\
    The truth exists in seven versions.
  • dannytdannyt Member Posts: 6
    Hi Peter+is1,

    thanks for your comment.
    I did a similar test where I multiplied the No. of Prod. Orders by 100. The chart looks good but the values to look at where wrong (not the right numbers in the y axis) and when I look at the tooltip of No. of Prod. Orders it shows 15000 instead of 150 :-(
Sign In or Register to comment.