anychart.onDocumentReady(function () {
var chart = anychart.pie([
{x: 'Cycling', value: 10},
{x: 'Swimming', value: 12},
{x: 'Hiking', value: 11},
{x: 'Alpinism', value: 9}
var legend = chart.legend();
var enabledState = legend.enabled();
chart.title('Legend enabled state is set to ' + enabledState);
chart.container('container');