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     [CLOSED] Reduce space between bars JSCHART
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Reduce space between bars JSCHART
 Login/Join
 
Platinum Member
posted
Hello all

I have this sample code for a stacked bar graph. I am trying to reduce the vertical gap between bars (gets bars for countries close to each other).
However I try, it stays the same. Can anyone suggest what I should do?
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
GRAPH FILE CAR
SUM RETAIL_COST
DEALER_COST
BY COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
*GRAPH_SCRIPT
*GRAPH_JS_FINAL
"blaProperties": 
{
    "seriesLayout": "stacked", "orientation": "horizontal", "barGroupGapWidth": "0.5"
},
*END
ENDSTYLE
END  

Thank you

This message has been edited. Last edited by: BI_Developer,


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 124 | Registered: July 21, 2011Reply With QuoteReport This Post
Expert
posted Hide Post
The riser width is a percentage of the space available for each group of bars.

Play with these settings, see if any work for you:

-SORT_DONE
ON GRAPH SET GRAPHSTYLE *
-*Adjust Riser Column Width
setRiserWidth(90);
setLineWidth(getSeries(0),6)
setLineWidth(getSeries(1),6)
setLineWidth(getSeries(2),6)


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Does work as expected
It is possible that you haven't notice the change. Try with more significant decrease. Run with multiple value and compare output
The only thing as that the bar width is increasing accordingly to gap decreasing
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
GRAPH FILE CAR
SUM RETAIL_COST
DEALER_COST
BY COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
*GRAPH_SCRIPT
*GRAPH_JS_FINAL
"blaProperties": 
{
    "seriesLayout": "stacked", "orientation": "horizontal", "barGroupGapWidth": "0.25"
},
*END
ENDSTYLE
END


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I tried this before. It reduces the gap but that is done by increase of bar width. I am trying to reduce height of the graph. With this height stays the same as width of bar is increased and gap is reduced. Hope I made sense.
quote:
Originally posted by MartinY:
Does work as expected
It is possible that you haven't notice the change. Try with more significant decrease. Run with multiple value and compare output
The only thing as that the bar width is increasing accordingly to gap decreasing
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
GRAPH FILE CAR
SUM RETAIL_COST
DEALER_COST
BY COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
*GRAPH_SCRIPT
*GRAPH_JS_FINAL
"blaProperties": 
{
    "seriesLayout": "stacked", "orientation": "horizontal", "barGroupGapWidth": "0.25"
},
*END
ENDSTYLE
END


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 124 | Registered: July 21, 2011Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Do you include this report within a Portal or HTML iFrame ?

Reducing the iFrame does not work for you ? Everything is adjusted automatically even without having to manage the gap as you are trying to do.
Remember that you are using JSCHART so the engine will always try to use all available spaces otherwise it shrink


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Reduce space between bars JSCHART

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