How to: |
The labels property controls the format of legend labels.
"legend": { "labels": { "font": "string", "color": "string" "tooltip": "string", "wrap": number } }
where:
Is a string that defines the size, style, and typeface of the legend labels. The default value is "7.5pt Sans-Serif".
Is a string that defines the color of the legend labels using a color name or numeric specification string. The default value is "black".
For information about defining colors, see Colors and Gradients.
Is a string, or a function that returns a string, to display when the mouse hovers over the label.
Defines the number of lines for wrapping long labels. Can be an integer, which wraps long labels to that number of lines (if necessary), or "auto", which wraps long labels into as many lines as necessary. The default value is 1.
The following request makes the legend labels red, bold, 12pt Times Roman:
GRAPH FILE WF_RETAIL_LITE
SUM DISCOUNT_US GROSS_PROFIT_US REVENUE_US MSRP_US
BY PRODUCT_CATEGORY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
*GRAPH_JS
"legend": {"labels": {
"font": "Bold 12pt Times Roman",
"color": "red"
}},
"series": [
{"series": 0, "color": "lightgreen"},
{"series": 1, "color": "coral"},
{"series": 2, "color": "lightblue"},
{"series": 3, "color": "burlywood"}
]
*END
ENDSTYLE
END
The output is:
WebFOCUS | |
Feedback |