Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Are Clustered and stacked bar charts possible?
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Are Clustered and stacked bar charts possible?
 Login/Join
 
Member
posted
Something like this: http://alesandrab.wordpress.co...red-charts-in-excel/ and http://peltiertech.com/WordPre...d-column-bar-charts/

Seems not so straightforward in Excel, but wondering if it can be done in Dev studio UI or code

This message has been edited. Last edited by: <Kathryn Henning>,


WebFocus v8002M
Windows 2008
InfoAssist reports
 
Posts: 7 | Registered: October 03, 2012Reply With QuoteReport This Post
<FreSte>
posted
See below.

  
-* --- Create MASTER and empty HOLD-file
TABLE FILE SYSTABLE
  PRINT
    COMPUTE PROD/A20  = '';
    COMPUTE YEAR/I4   = 0;
    COMPUTE HOURS/I6  = 0;
    COMPUTE TARGET/I6 = 0;
  BY NAME NOPRINT
  ON TABLE SET HOLDLIST PRINTONLY
  ON TABLE SET XRETRIEVAL OFF
  ON TABLE HOLD AS HLDFILE1 FORMAT ALPHA
END
-RUN

-* --- Write data to empty HOLD-file
-WRITE HLDFILE1 1-Float             2011   402   400
-WRITE HLDFILE1 2-Patterned         2011   198   125
-WRITE HLDFILE1 3-Coater            2011   307   325
-WRITE HLDFILE1 4-Laminator         2011   206   125
-WRITE HLDFILE1 1-Float             2012   453   400
-WRITE HLDFILE1 2-Patterned         2012   252   125
-WRITE HLDFILE1 3-Coater            2012   325   300
-WRITE HLDFILE1 4-Laminator         2012   214   150


GRAPH FILE HLDFILE1 
  SUM 
    HOURS    AS 'Hours'
    TARGET   AS 'Target'
  BY YEAR
  ACROSS PROD
  ON GRAPH PCHOLD FORMAT PNG
  ON GRAPH SET HTMLENCODE ON
  ON GRAPH SET GRAPHDEFAULT OFF
  ON GRAPH SET VZERO OFF
  ON GRAPH SET HAXIS 770
  ON GRAPH SET VAXIS 405
  ON GRAPH SET UNITS PIXELS
  ON GRAPH SET LOOKGRAPH VBRSTK2
  ON GRAPH SET GRMERGE ADVANCED
  ON GRAPH SET GRMULTIGRAPH 0
  ON GRAPH SET GRLEGEND 1
  ON GRAPH SET GRXAXIS 1

  ON GRAPH SET GRAPHSTYLE *
    setReportParsingErrors(false);
    setSelectionEnableMove(false);
    setTransparentBorderColor(getSeries(0),true);
    setTransparentBorderColor(getSeries(1),true);
    setTransparentBorderColor(getSeries(2),true);
    setTransparentBorderColor(getSeries(3),true);
    setTransparentBorderColor(getSeries(4),true);
    setTransparentBorderColor(getSeries(5),true);
    setTransparentBorderColor(getSeries(6),true);
    setTransparentBorderColor(getSeries(7),true);
    setTransparentBorderColor(getSeries(8),true);
    setTransparentBorderColor(getSeries(9),true);
    setTransparentBorderColor(getSeries(10),true);
    setTransparentBorderColor(getChartBackground(),true);
    setPlace(true);
    setDepthRadius(0);
    setDepthAngle(0);
    setDisplay(getDataText(),false);
    setBorderColor(getSeries(0),new Color(78,129,189));
    setFillColor(getSeries(0),new Color(78,129,189));
    setBorderColor(getSeries(1),new Color(185,205,229));
    setFillColor(getSeries(1),new Color(185,205,229));
    setBorderColor(getSeries(2),new Color(228,108,10));
    setFillColor(getSeries(2),new Color(228,108,10));
    setFillColor(getSeries(3),new Color(251,194,147));
    setBorderColor(getSeries(3),new Color(251,194,147));
    setDisplay(getO1MajorGrid(),false);
    setLineBasicStrokeType(getY1ZeroLine(),0);
    setFillColor(getY1ZeroLine(),new Color(0,0,0));
    setBorderColor(getY2MajorGrid(),new Color(230,230,230));
    setTextString(getO1Title(),"");
    setFillColor(getY1Label(),new Color(80,80,80));
    setBorderColor(getFrame(),new Color(80,80,80));
    setLineWidth(getY2ZeroLine(),0);
    setDisplay(getY2Label(),false);
    setScaleMinAuto(getY2Axis(),false);
    setScaleMin(getY2Axis(),0.0);
    setScaleMinAuto(getY1Axis(),false);
    setScaleMin(getY1Axis(),0.0);
  ENDSTYLE
END
 
Reply With QuoteReport This Post
<nick z>
posted
Yes, It's possible to make it look like clustered and stacked bars.
Just use dual stack BAR:
ON GRAPH SET LOOKGRAPH VBRSTK2
You would then assign 2 measures to Y1 and the other 2 measures to Y2. You would then need to align your Y2 to be the same as Y1.
For example:

setScaleMinAuto(getY1Axis(),false);
setScaleMaxAuto(getY1Axis(),false);
setScaleMin(getY1Axis(),0.0);
setScaleMax(getY1Axis(),&MAX_SCALE);

setScaleMinAuto(getY2Axis(),false);
setScaleMaxAuto(getY2Axis(),false);
setScaleMin(getY2Axis(),0.0);
setScaleMax(getY2Axis(),&MAX_SCALE);


Thanks.
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Are Clustered and stacked bar charts possible?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.