diff --git a/docs/reference.html.haml b/docs/reference.html.haml index 56480db53..e9579f114 100644 --- a/docs/reference.html.haml +++ b/docs/reference.html.haml @@ -1012,10 +1012,11 @@ = partial :reference_item_link, locals: { id: 'data.labels.format' } %p Set formatter function for data labels. %br - %p The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are: + %p The formatter function receives 5 arguments such as v, ratio, id, i, j and it must return a string that will be shown as the label. The arguments are: %br %ul %li v is the value of the data point where the label is shown. + %li ratio is the ratio of the data point where the label is shown, will be undefined if the data point is not normalized. %li id is the id of the data where the label is shown. %li i is the index of the data point where the label is shown. %li j is the sub index of the data point where the label is shown. @@ -1028,10 +1029,10 @@ %code.html.javascript data: {   labels: { -     format: function (v, id, i, j) { ... } +     format: function (v, ratio, id, i, j) { ... }     // it's possible to set for each data     //format: { -     //    data1: function (v, id, i, j) { ... }, +     //    data1: function (v, ratio, id, i, j) { ... },     //    ...     //}   } diff --git a/htdocs/samples/data_label.html b/htdocs/samples/data_label.html index 1137a8af7..b10574cac 100644 --- a/htdocs/samples/data_label.html +++ b/htdocs/samples/data_label.html @@ -18,6 +18,8 @@