anychart.onDocumentReady(function () {
var chart = anychart.line();
var series1 = chart.line([
{x: 'Cycling', value: 10},
{x: 'Swimming', value: 32},
var series2 = chart.line([
{x: 'Cycling', value: 15},
{x: 'Swimming', value: 9},
var item = series1.legendItem();
item.iconStroke(function () {
return anychart.color.setThickness(anychart.color.darken(this.sourceColor), 2);
chart.title('Set icon stroke parameter as a function');
chart.container('container');