Focal Point
[SOLVED] Remove Duplicate Values in Line Chart / Hover

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8867077096

September 17, 2018, 03:08 PM
Doug
[SOLVED] Remove Duplicate Values in Line Chart / Hover
So, what's the deal with removing duplicate values in Line Charts when hovering over the data point. I have 'SEATS Summed twice, one for SUM and one for the gradient marker color. If I hide either one I loose that functionality.

Run the following code to see what I mean. (A picture IS work a thousand words. Or, in this case 134 words).

BTW: This should be done in IA, as was this code. If not IA, I can add some code in the text editor if needed.

-* The display when hovering over a data point looks like this:
-* COUNTRY: ENGLAND
-* SEATS:   13
-* SEATS:   13

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE baseapp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.SEATS
CAR.BODY.SEATS
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
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 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,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=color, $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
setMarkerShape(getAllSeries(),3);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"blaProperties": {
    "seriesLayout": "absolute"
},
"agnosticSettings": {
    "chartTypeFullName": "Line_Absolute"
}

*END
ENDSTYLE
END

-RUN
Thanks, Doug

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
September 17, 2018, 03:40 PM
MartinY
Is this may suits your need ?
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SEATS AS ''
    CAR.BODY.SEATS
    COMPUTE TT1 /A30V = 'Country : ' | COUNTRY;
    COMPUTE TT2 /A30V = 'Seats : '   | LJUST(4, FPRINT(SEATS, 'I3', 'A4'), 'A4V');
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
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 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,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1,  BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2,  BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3,  BUCKET=color, $
TYPE=DATA, COLUMN=TT1, BUCKET=tooltip, $
TYPE=DATA, COLUMN=TT2, BUCKET=tooltip, $
*GRAPH_JS_FINAL
series: [ {"series": 'reset', "tooltip": '{{tooltip1}}<br>{{tooltip2}}'} ],
htmlToolTip: {enable: true, snap: false }
*END

*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
setMarkerShape(getAllSeries(),3);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"blaProperties": {
    "seriesLayout": "absolute"
},
"agnosticSettings": {
    "chartTypeFullName": "Line_Absolute"
}

*END
ENDSTYLE
END



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
September 17, 2018, 04:05 PM
MReeder
That is the only solution I have found to. To customize the tooltip.
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"blaProperties": {
    "seriesLayout": "absolute"
},
"agnosticSettings": {
    "chartTypeFullName": "Line_Absolute"
}
,
series: [
{series: 0, tooltip: function(v, s, g) {return 'SEAT: ' + v;}},
]
  



WebFOCUS 8.2.02M
Windows
Server/8.2.02M
All Outputs
September 17, 2018, 04:08 PM
MartinY
MReeder,

quote:

That is the only solution I have found to. To customize the tooltip

Look at my sample, it's another way.


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
September 17, 2018, 04:30 PM
Doug
Thanks guys, I'll stick with MartinY's 15:40 post as I need to show Country and Seats.