Merin Joseph Posted May 25, 2023 Share Posted May 25, 2023 But instead of getting the sum of the values , im getting the first value(here it suppose to be the sum of 4(Jan,Feb,Mar,Apr) months, which varies with the selection of month) .Can someone please help me with this? Link to comment Share on other sites More sharing options...
Mat Barnard Posted May 26, 2023 Share Posted May 26, 2023 What value are you trying to get into the legend? Link to comment Share on other sites More sharing options...
David Beagan Posted May 26, 2023 Share Posted May 26, 2023 The -READFILE command reads the first row of the hold file SVP_HOLD_FILE_HOLD. If you remove the BY line then it would sum to a single row and the -READFILE would get the full amount. Link to comment Share on other sites More sharing options...
Merin Joseph Posted May 31, 2023 Author Share Posted May 31, 2023 Thanks David, Do you know how can i hide a line chart (ex:vaiance_YTD) but keep that in the legend? Link to comment Share on other sites More sharing options...
David Beagan Posted May 31, 2023 Share Posted May 31, 2023 You could make the line transparent. For example, when you run the following code:GRAPH FILE ggsalesSUM UNITS DOLLARS BY REGIONON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET LOOKGRAPH LINEON GRAPH SET AUTOFIT ONON 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_SCRIPTsetReportParsingErrors(false);setSelectionEnableMove(false);setFillColor(getSeries(1),new Color(255,0,0,10));ENDSTYLEENDthe line on the chart for dollars is almost invisible. that is because of the fourth number after of the Color parameter being set to 10. setFillColor(getSeries(1),new Color(255,0,0,10));If it is set to 0 then the line would be fully transparent. Link to comment Share on other sites More sharing options...
Merin Joseph Posted May 31, 2023 Author Share Posted May 31, 2023 I have used the same concept. yes opacity works for not visible however we can still mouse over it. So i was trying to see if there is any other better option than this. Link to comment Share on other sites More sharing options...
David Beagan Posted May 31, 2023 Share Posted May 31, 2023 Would this work?"series": [{ "series": 1, "tooltip": null}]Ref: Creating HTML5 Charts With ibi WebFOCUS Language, page 489 Link to comment Share on other sites More sharing options...
Solution David Beagan Posted June 1, 2023 Solution Share Posted June 1, 2023 An alternative would be to turn off the legend and create an annotaion that looks like a legend. It can be placed on the graph to save space.GRAPH FILE systableSUM OBID COLCOUNTBY TBTYPEWHERE READLIMIT IS 50ON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET LOOKGRAPH LINEON GRAPH SET AUTOFIT ONON GRAPH SET STYLE *INCLUDE=Warm.sty,$TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $*GRAPH_SCRIPTsetDisplay(getLegendArea(),false);*GRAPH_JS "annotations": [{ "position": { "x":"5%", "y": "0%" , "parent":"chart"}, "label": { "visible":true, "text": "<span style=color:RoyalBlue;font-size:20pt;>&|#9632;</span> Category one <span style=color:MediumAquaMarine;font-size:20pt;><br>&|#9632;</span> Category two", "font":"11pt arial", "color":"gray", "style":"bold" } }] *ENDENDSTYLEEND Link to comment Share on other sites More sharing options...
Merin Joseph Posted June 5, 2023 Author Share Posted June 5, 2023 I disabled the tooltip, but still there is a yellow dot when we hover over it. This might help me. Thank you so much. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now