How to: |
The labels property controls the format of legend labels.
legend: { labels: { font: 'fstring', color: 'cstring' } }
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.
The following request against the GGSALES data source makes the legend labels red, bold, 12pt Times Roman:
GRAPH FILE GGSALES
SUM DOLLARS BUDDOLLARS UNITS BUDUNITS
BY PRODUCT
WHERE CATEGORY EQ 'Gifts'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*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
INCLUDE=ENIADefault_combine.sty,$
ENDSTYLE
END
The output is:
WebFOCUS |