legend.item Object
The configuration of the Chart legend item.
To override the marker configuration of individual series, use the series.legendItem settings of the series.
Example - disable highlight of legend items
<div id="chart"></div>
<script>
$("#chart").kendoStockChart({
dataSource: {
data: [{
"Date": "2016/01/01",
"Open": 41.62,
"High": 41.69,
"Low": 39.81,
"Close": 40.12,
"Volume": 2632000
}, {
"Date": "2016/03/01",
"Open": 40.62,
"High": 39.69,
"Low": 40.81,
"Close": 39.12,
"Volume": 2631986
}]
},
dateField: "Date",
series: [{
name: "Series 1",
type: "line",
markers: {
visible: true
},
field: "Close"
}],
legend: {
visible: true,
position: 'bottom',
item: {
highlight: {
visible: false
}
}
}
});
</script>
Example - display legacy style markers in the legend
<div id="chart"></div>
<script>
$("#chart").kendoStockChart({
dataSource: {
data: [{
"Date": "2016/01/01",
"Open": 41.62,
"High": 41.69,
"Low": 39.81,
"Close": 40.12,
"Volume": 2632000
}, {
"Date": "2016/03/01",
"Open": 40.62,
"High": 39.69,
"Low": 40.81,
"Close": 39.12,
"Volume": 2631986
}]
},
dateField: "Date",
series: [{
name: "Series 1",
type: "candlestick",
openField: "Open",
highField: "High",
lowField: "Low",
closeField: "Close"
}],
legend: {
visible: true,
position: 'bottom'
},
seriesDefaults: {
/* Use these settings to emulate the legacy legend item rendering */
legendItem: {
type: 'line',
line: {
dashType: 'solid',
},
markers: {
visible: false
},
highlight: {
visible: false
}
}
}
});
</script>
Related Properties
- legend.item.area
- legend.item.area.background
- legend.item.area.opacity
- legend.item.cursor
- legend.item.highlight
- legend.item.highlight.markers
- legend.item.highlight.markers.background
- legend.item.highlight.markers.border
- legend.item.highlight.markers.border.color
- legend.item.highlight.markers.border.dashType
- legend.item.highlight.markers.borderRadius
- legend.item.highlight.markers.type
- legend.item.highlight.markers.visible
- legend.item.highlight.markers.visual
- legend.item.highlight.visible
- legend.item.line
- legend.item.line.color
- legend.item.line.dashType
- legend.item.line.opacity
- legend.item.markers
- legend.item.markers.background
- legend.item.markers.border
- legend.item.markers.border.color
- legend.item.markers.border.dashType
- legend.item.markers.borderRadius
- legend.item.markers.type
- legend.item.markers.visible
- legend.item.markers.visual
- legend.item.type
- legend.item.visual