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] Remove Duplicate Values in Line Chart / Hover
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Remove Duplicate Values in Line Chart / Hover
 Login/Join
 
Expert
posted
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.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 2987 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2171 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Silver Member
posted Hide Post
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
 
Posts: 43 | Location: Odessa, Florida | Registered: July 26, 2011Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2171 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks guys, I'll stick with MartinY's 15:40 post as I need to show Country and Seats.
 
Posts: 2987 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Remove Duplicate Values in Line Chart / Hover

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