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]DataGrid loosing number format when applying formatList feature
Go
New
Search
Notify
Tools
Reply
  
[SOLVED]DataGrid loosing number format when applying formatList feature
 Login/Join
 
Virtuoso
posted
Hi community,

I have an open case, but wondering if maybe someone already have the answer

Using the below code it result in a DataGrid where the first row have a green background which is what I need but the measure (dollars) has lost its format where the thousand separator is not displayed.
If you remove the GRAPH_JS_FINAL section it will result in proper measure display with thousand separator but no green background at first line.

I need both : first row green and number with separator.
I have tried several ways but can't have it to work as requested.
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF

GRAPH FILE GGSALES
SUM DOLLARS/P9C AS '$'
BY PRODUCT      AS 'Product'
BY REGION       AS ''

ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HAXIS 600.0
ON GRAPH SET VAXIS 200.0
ON GRAPH SET LOOKGRAPH DATAGRID
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,$

TYPE=DATA, COLUMN=N1, BUCKET=row, $
TYPE=DATA, COLUMN=N2, BUCKET=column, $
TYPE=DATA, COLUMN=N3, BUCKET=measure, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS
dataGridProperties: {
   cell: {layout: {width: {rule: 'minSize', value: 100}}}
}
*GRAPH_JS_FINAL
dataGridProperties: {
  cell:{
-*    numberFormat: {mode: 'numeric', thousandSep: ',', grouping: 'K'},
    formatList: [{
      row: 0, color: 'rgb(8, 97, 74)',
      labels: {font: 'bold 10pt Sans-Serif', color: 'white'}
    }]
  }
}
*END
ENDSTYLE
END
-RUN

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


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: 1990 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Fixed

Instead of :
numberFormat: {mode: 'numeric', thousandSep: ',', grouping: 'K'},

It has to be :
labels: { numberFormat: {mode: 'numeric', thousandSep: ',', grouping: 'K'} },


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: 1990 | 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     [SOLVED]DataGrid loosing number format when applying formatList feature

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