({{, (RefLink[LabelingFunction, paclet:ref/LabelingFunction]) 
is an option for data visualization functions to automatically label elements of a visualization.}})

OpenersNotesSection(Spacer1)Details

(RefLink[LabelingFunction, paclet:ref/LabelingFunction])->f specifies that each chart element should have a label given by f[value,index,lbls], where value is the data value associated with the element, index is its position in the nested list of datasets, and lbls is the list of relevant labels.

(RefLink[LabelingFunction, paclet:ref/LabelingFunction])->(RefLink[None, paclet:ref/None]) specifies that no labeling should be done.

(RefLink[LabelingFunction, paclet:ref/LabelingFunction])->pos places the default labels at position pos, such as (RefLink[Top, paclet:ref/Top]), (RefLink[Bottom, paclet:ref/Bottom]), (RefLink[Left, paclet:ref/Left]), (RefLink[Right, paclet:ref/Right]).

A setting of (RefLink[Automatic, paclet:ref/Automatic]) will automatically place labels depending on the type of plot or chart.

If the labeling function f returns a labeling expression expr not of the form (RefLink[Placed, paclet:ref/Placed])[…], the labeling expression is taken to be (RefLink[Placed, paclet:ref/Placed])[f[…],(RefLink[Automatic, paclet:ref/Automatic])].

Labels in a particular chart can be specified by (RefLink[ChartLabels, paclet:ref/ChartLabels]), (RefLink[LabelingFunction, paclet:ref/LabelingFunction]), or explicit (RefLink[Labeled, paclet:ref/Labeled]) wrappers. All labels specified in all ways will be used in any given chart.

OpenersPrimaryExamplesSection(Spacer1)Examples  (7)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

(RefLink[LabelingFunction, paclet:ref/LabelingFunction]) uses the metadata as labels automatically:

ListPlot[{1.5,1,2.5,3}->{"a","b","c","d"}]

Use the metadata as the point markers:

ListLinePlot[{1.5,1,2.5,3}->{"a","b","c","d"},LabelingFunction->Center]

Use callouts to label points with their values:

ListLinePlot[{1,3,2,4,5,5},LabelingFunction->(Callout[#1,Automatic] &),PlotMarkers->Automatic]

Use a (RefLink[Panel, paclet:ref/Panel]) around the values and place them above the bars:

BarChart[{1,2,3},LabelingFunction->(Placed[Panel[#1,FrameMargins->0],Above]&)]

Use automatic labeling by values through (RefLink[Tooltip, paclet:ref/Tooltip]) and (RefLink[StatusArea, paclet:ref/StatusArea]):

BarChart[{1,2,3},LabelingFunction->Automatic]

OpenersExampleSection1(Spacer1)Scope  (2)

Do no labeling:

BarChart[{1,2,3},LabelingFunction->None]

Place row, column, and value labels in a (RefLink[Tooltip, paclet:ref/Tooltip]):

BarChart[{{1,2,3},{4,5,6}},ChartLabels->{Placed[{"r1","r2"},Axis],Placed[{"c1","c2","c3"},Axis]},LabelingFunction->(Placed[Row[{#3[[1,1]],#3[[2,1]],#1},","],Tooltip]&)]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ChartLabels, paclet:ref/ChartLabels])  ▪  (RefLink[PlotLabels, paclet:ref/PlotLabels])  ▪  (RefLink[Placed, paclet:ref/Placed])  ▪  (RefLink[Labeled, paclet:ref/Labeled])  ▪  (RefLink[Callout, paclet:ref/Callout])  ▪  (RefLink[LabelingSize, paclet:ref/LabelingSize])  ▪  (RefLink[ColorFunction, paclet:ref/ColorFunction])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Chart Labeling, Legending & Annotation, paclet:guide/ChartLabelingLegendingAndAnnotation])}, {▪(RefLinkPlain[Labels, paclet:guide/Labels])}, {▪(RefLinkPlain[Charting and Information Visualization, paclet:guide/ChartingAndInformationVisualization])}})}})