An object value that indicates the chart element legend.
Type: Object
legend:{
text:"",
textMargin:{
left:2,
top:2,
right:2,
bottom:2
},
titleStyle:{
"font-weight":"bold",
fill:"#000",
stroke:"none"
},
visible:true,
style:{
fill:"#none",
stroke:"none"
},
textStyle:{
fill:"#333",
stroke:"none"
},
compass:"east",
orientation:"vertical"
}
compass
A value that indicates the compass position of the legend.
Type: String
Default: "east"
Note: The available options are 'north', 'south', 'east', 'west'.
orientation
A value that indicates the orientation of the legend.
Type: String
Default: "vertical"
Note: The available options are 'horizontal' and 'vertical'.
style
A value that indicates the style applied to the legend. For a full list of style options, please see the Stype Options topic.
Type: Object
Default: {fill:"none", stroke:"none"}
text
A value that indicates the legend text.
Type: String
Default: ""
textMargin
A value that indicates the text margin of the legend item.
Type: Number
Default: {left:2, top:2, right:2, bottom:2}
textStyle
A value that indicates the style applied to the legend text. For a full list of style options, please see the Stype Options topic.
Type: Object
Default: {"font-weight": "bold", fill:"#000", stroke: "none"}
titleStyle
A value that indicates the styles applied to the legend title. For a full list of style options, please see the Stype Options topic.
Type: Object
Default: {"font-weight": "bold", fill:"#000", stroke:"none"}
visible
A value that indicates the legend's visibility.
Type: Boolean
Default: true
Code Example:
WinJS.UI.setOptions(document.getElementById("wijbarchart").winControl, {
legend: {
text: "Month"
},