NOTE: Items in bold red represent patches that may or may not be added to OFC-2.
Defines the attributes for the right side keys legend. This allows you to display the legend on the right side of the chart rather than at the top of the chart. The patch implementing the right side legend also adds the capability to display a legend with a pie chart.
“legend”: {
"position":"right",
"border":true,
"stroke":1,
"shadow":true,
"border_colour":”#808080”,
"bg_colour":”#F8F8F8”,
"alpha":1,
"margin":4,
"padding":4
},
|
OBJECT |
ATTRIBUTE |
VALID VALUES |
DEFAULT |
NOTES |
|
“legend” |
|
|
|
This table defines attributes for legend object |
|
|
“position” |
“top” “right” |
undefined |
Defines the location of the keys legend. If undefined or any value other than “right” then it will be the stand OFC2 legend at the top of the chart. “right” - the legend will be placed at the right side of the chart. |
|
|
“border” |
true or false |
true |
Defines whether or not to draw a line around the right side legend. * Has no effect on a “top” legend |
|
|
“stroke” |
Any number |
1 |
Defines the size of the border line around the right side legend. * Has no effect on a “top” legend |
|
|
“shadow” |
true or false |
true |
Defines whether or not to add a shadow effect to the right side legend. * Has no effect on a “top” legend |
|
|
“border_colour” |
“#RRGGBB” hex string |
“#808080” |
Defines the colour of the line drawn around the right side legend. * Has no effect on a “top” legend |
|
|
“bg_colour” |
“#RRGGBB” hex string |
“#F8F8F8” |
Defines the background colour of the right side legend. * Has no effect on a “top” legend |
|
|
“alpha” |
0 to 1 |
1 |
Specifies the alpha value for the right side legend. 0 is invisible to 1 is opaque * Has no effect on a “top” legend |
|
|
“margin” |
Any number |
4 |
Specifies the number of pixel spacing to allow around the outside of the right side legend. * Has no effect on a “top” legend |
|
|
“padding” |
Any number |
4 |
Specifies the number of pixel spacing to allow between the labels and the inside of the right side legend. * Has no effect on a “top” legend |