Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CASE-CLOSED]PDF Chart Series Color Not Matching JSCHART Color

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE-CLOSED]PDF Chart Series Color Not Matching JSCHART Color
 Login/Join
 
Virtuoso
posted
Hi folks,

I have an issue where I want to produce a chart in PDF that will color the series the same way as in JSCHART.

When running sample-1 1996 is displayed in orange and 1997 in green even for Region West where no 1996 exist

When running sample-2 1996 is displayed in orange and 1997 in green. But for Region West where no 1996 exist, it's displayed in orange.

I have tried several ways to have it work as in sample-1 but no success.

Does someone has the magic trick to do it ?

Sample-1 (JSCHART)
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_TITLE='WebFOCUS Report';

DEFINE FILE GGSALES
YR /YY = DATE;
MTH /MONTH = DATE;
DOL /I8 = IF REGION EQ 'West' AND YR EQ 1996 THEN 0 ELSE DOLLARS;
END
TABLE FILE GGSALES
SUM DOL
BY REGION
BY YR
BY MTH
WHERE DOL NE 0;
ON TABLE HOLD AS EXTDATA
END
-RUN

GRAPH FILE EXTDATA
SUM DOL AS '$'
BY REGION AS 'Region'
BY YR  AS 'Year'
BY MTH AS 'Month'

ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 3
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS '320.0'
ON GRAPH SET VAXIS '175.0'
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
DEFMACRO=PREVYR,    MACTYPE=RULE, WHEN=YR EQ '1996', $
DEFMACRO=THISYR,    MACTYPE=RULE, WHEN=YR EQ '1997', $
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1,  BUCKET=page,    $
TYPE=DATA, COLUMN=N2,  BUCKET=color,   $
TYPE=DATA, COLUMN=N3,  BUCKET=x-axis,  $
TYPE=DATA, COLUMN=N4,  BUCKET=y-axis,  $
TYPE=DATA, COLUMN=N4,  MACRO=PREVYR, COLOR=RGB(217 137 17), $
TYPE=DATA, COLUMN=N4,  MACRO=THISYR, COLOR=RGB(8 97 74), $
TYPE=HEADING, JUSTIFY=CENTER, FONT='TIMES NEW ROMAN', SIZE=10, COLOR=RGB(8 97 74), STYLE=NORMAL, $
TYPE=FOOTING, JUSTIFY=RIGHT, FONT='TIMES NEW ROMAN', SIZE=8, COLOR=RGB(32 0 32), STYLE=NORMAL, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getY1Title(),false);
setDisplay(getY1Label(),false);
setDisplay(getY1AxisLine(),false);
setDisplay(getY1MajorTick(),false);
setLabelStagger(getO1Label(),true);
setMarkerShape(getAllSeries(),2);
setDisplay(getLegendArea(),false);
setTextRotation(getO1Label(),3);
*END
*GRAPH_JS_FINAL
"blaProperties": {
    "seriesLayout": 'absolute',
},
"agnosticSettings": {
    "chartTypeFullName": "Line_Absolute"
}
*END
ENDSTYLE
END
-RUN


Sample-2 (PDF)
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_TITLE='WebFOCUS Report';

DEFINE FILE GGSALES
YR /YY = DATE;
MTH /MONTH = DATE;
DOL /I8 = IF REGION EQ 'West' AND YR EQ 1996 THEN 0 ELSE DOLLARS;
END
TABLE FILE GGSALES
SUM DOL
BY REGION
BY YR
BY MTH
WHERE DOL NE 0;
ON TABLE HOLD AS EXTDATA
END
-RUN

GRAPH FILE EXTDATA
SUM DOL AS '$'
BY REGION AS 'Region'
BY YR AS 'Year'
ACROSS MTH AS 'Month'
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET HAXIS 10.0
ON GRAPH SET VAXIS 8.0
ON GRAPH SET UNITS INCHES
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 1
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setDepthRadius(0);
setUseSeriesShapes(true);
setPlace(true);
setPieDepth(0);
setPieTilt(0);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, LEFTMARGIN=0.005208333333333333, TOPMARGIN=0.005208333333333333, RIGHTMARGIN=0.005208333333333333, BOTTOMMARGIN=0.005208333333333333, ORIENTATION=LANDSCAPE, $
TYPE=HEADING, JUSTIFY=CENTER, FONT='TIMES NEW ROMAN', SIZE=10, COLOR=RGB(8 97 74), STYLE=NORMAL, $
TYPE=FOOTING, JUSTIFY=RIGHT, FONT='TIMES NEW ROMAN', SIZE=8, COLOR=RGB(32 0 32), STYLE=NORMAL, $
*GRAPH_SCRIPT
setMarkerSizeDefault(50);
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTextRotation(getO1Label(),3);
setLegendPosition(1);
setMarkerShape(getAllSeries(),2);
setFillColor(getSeries(0),new Color(242,148,47));
setTransparentBorderColor(getSeries(0), true);
setFillColor(getSeries(1),new Color(8,97,74));
setTransparentBorderColor(getSeries(1), true);
setFontSizeAbsolute(getLegendText(),true);
setAutofit(getLegendText(),false);
setFontSizeInPoints(getLegendText(),9);
setPlaceResize(getLegendText(),0);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"blaProperties": {
    "seriesLayout": "stacked"
},
"agnosticSettings": {
    "chartTypeFullName": "Line_Stacked"
}
*END
ENDSTYLE
END
-RUN

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


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Guru
posted Hide Post
Not a direct help, but there is a case to have JSCHART output with PDF. Somewhere targeted post 8204, if more people open a case for this we might get it quicker and we don't need separate styling for PDF and JSCHART anymore Smiler


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Virtuoso
posted Hide Post
Thanks Frans for the info.

Before someone else notice I forget to mentioned that : I know that I don't have any styling condition in the Sample-2 (PDF) but no matter what I try the condition is never properly evaluated in PDF format.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
Martin

I suggest you open a case to get to the bottom of this one.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
Hi Chuck,

The case is already open, I was just looking if I can have an answer from the community.
Sometime, someone already know the answer.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
Here is the answer from Tech Support
The reason this does not work in PDF is due to the use of different engines to generate the graphs.
There appears to be an issue with this type of traffic lighting in the charts that use the old engine (PNG, PDF, SVG, etc.)
This is something that should be corrected when formats like PDF begin being generated by the same engine as JSCHART graphs, which is currently being worked on for 8205. 

Programming is not accepting any requests for changes to this old engine at this time.
Unfortunately all that I can recommend at this time is that you use a JSCHART graph when trying to traffic light a multigraph as in your example here. 


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CASE-CLOSED]PDF Chart Series Color Not Matching JSCHART Color

Copyright © 1996-2020 Information Builders