anychart.onDocumentReady(function () {
{ x: 'Food is tasteless', value: 65 },
{ x: 'Wait time', value: 109 },
{ x: 'Unfriendly staff', value: 12.5 },
{ x: 'Not clean', value: 45 },
{ x: 'Overpriced', value: 250 },
{ x: 'To noisy', value: 27 },
{ x: 'Food not fresh', value: 35 },
{ x: 'Small portions', value: 170 },
{ x: 'Not atmosphere', value: 35 },
{ x: 'Food is to salty', value: 35 }
var chart = anychart.pareto(data);
chart.title('Pareto Chart of Restaurant Complaints');
chart.yAxis(0).title('Defect frequency');
chart.yAxis(1).title('Cumulative Percentage');
.stroke('#A5B3B3', 1, '5 2', 'round');
var column = chart.getSeriesAt(0);
column.tooltip().format('Value: {%Value}');
var line = chart.getSeriesAt(1);
line.seriesType('spline').markers(true);
line.yScale().ticks().interval(10);
line.labels().enabled(true).anchor('right-bottom').format('{%CF}%');
.format('Cumulative Frequency: {%CF}% \n Relative Frequency: {%RF}%');
chart.crosshair().enabled(true).xLabel(false);
chart.container('container');