Jump to content

Does someone know a better way to add values in the legend? so here I'm holding that values as a variable and then used it.


Merin Joseph
Go to solution Solved by David Beagan ,

Recommended Posts

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));ENDSTYLEEND

the 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

  • Solution

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.image.thumb.png.4eda7aa6b8eac55977453f212ac1d1cc.png

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...