anychart.onDocumentReady(function () {
var dataset1 = anychart.data.set([
{id: 'AU.CT', value: 15, title: 'Australian Capital Territory'},
{id: 'AU.VI', value: 23, title: 'Victoria'},
{id: 'AU.WA', value: 86, title: 'Western Australia'},
{id: 'AU.QL', value: 16, title: 'Queensland'}
var dataset2 = anychart.data.set([
{id: 'AU.NS', value: 32, title: 'New South Wales'},
{id: 'AU.NT', value: 64, title: 'Northern Territory'},
{id: 'AU.TS', value: 28, title: 'Tasmania'},
{id: 'AU.SA', value: 45, title: 'South Australian'}
var map = anychart.map();
map.geoData(anychart.maps.australia);
var series1 = map.choropleth(dataset1);
var seriesLegendItem = series1.legendItem();
seriesLegendItem.iconType('circle');
seriesLegendItem.text('Custom legend item');
map.choropleth(dataset2);
map.title('Get and modify legend item');
map.container('container');