![](https://help.apple.com/assets/5CDC401A0946222B0E787522/5CDC4079094622D43D78A2BA/en_GB/f712c0a52357b1b6e1eecd8a29c23cff.png)
Add legends and gridlines in Numbers on Mac
There are several types of chart markings and axis labels you can add to your charts. You can modify their look to emphasize your data, and you can style the chart title and value label text differently to make it stand out from the other text.
![A column chart showing the axis labels and chart legend.](https://help.apple.com/assets/5CDC401A0946222B0E787522/5CDC4079094622D43D78A2BA/en_GB/4a7ce89b1f0621658b777186367db52d.png)
Note: If you can’t edit a chart, it may be locked. To edit it, you must unlock it.
Add a legend
Click the chart, then in the Format
 sidebar, click the Chart tab.
In the Chart Options section, select the Legend tickbox.
In your spreadsheet, click the legend to select it, then do any of the following:
Change the look of the legend text: Click the Style tab at the top of the sidebar, then use the controls to add a background fill, add a border and more.
Resize the legend: Drag the square handles around the legend.
Drag the legend to where you want it.
You can position the legend more precisely by selecting it, then pressing the arrow keys on your keyboard. Pressing Shift-arrow moves the legend in larger steps.
Modify axis gridlines
You can specify whether to show chart gridlines and modify their look.
Click the chart.
In the Format
 sidebar, click the Axis tab, then click the button for the axis you want to modify (x or y).
Do any of the following:
Set the line type: Click the disclosure triangle next to Gridlines (for the x axis), or Major Gridlines or Minor Gridlines (for the y axis), then click the pop-up menu and choose a line type.
Set the line colour: In the Major Gridlines section, click the colour well or colour wheel, then choose a colour.
Set the increment for major gridlines: In the Major Gridlines section, click the arrows to the right of the increment field, or type a value in it.
Show tick marks for the x or value axis: Click the Tick Marks pop-up menu, then choose a location.
Show or remove reference lines
You can add reference lines to a chart to mark the average, median, minimum and maximum values in the chart or another value that you specify. Reference lines make the chart easier to comprehend at a glance and can help you compare the values in the chart to a benchmark value.
All chart types can have reference lines except stacked charts, 2-axis charts, 3D charts, pie charts and doughnut charts. A chart can have up to five reference lines.
Click the chart.
In the Format
 sidebar, click the Axis tab, then click the Value button near the top of the sidebar.
Click the disclosure triangle next to Reference Lines, then choose any of the following types of reference lines from the pop-up menu:
Average: A line that runs through the mean value of the data
Median: A line that runs through the middle value of the data
Minimum: A line that runs through the lowest value of the data
Maximum: A line that runs through the highest value of the data
Custom: A line that runs through the value you specify
To show what the reference line represents, select the Show Name and Show Value tickboxes.
To change the settings for a reference line, click the line, then use the controls in the Reference Line tab in the sidebar on the right.
To remove a reference line, click the line to select it, then press Delete on your keyboard.
Note: When you drag the slider on an interactive chart to view different data sets, its reference lines move.
Show or remove error bars
Error bars give you a general impression of your data’s accuracy. They’re represented as small marks whose length indicates the amount of uncertainty associated with a given data series (the data’s variability). You can add them to 2D line charts, area charts, bar and column charts, stacked bar and column charts, bubble charts and scatter charts.
Click the chart, then in the Format
 sidebar, click the Series tab.
Click the disclosure triangle next to Error Bars, then click the pop-up menu and choose a type of error bar.
Click the second pop-up menu, choose how error values are calculated (for example, as fixed values or percentages), and change the range of variability you want to display.
To change the look of the error bars, click an error bar so you see white dots at either end.
All error bars for that data series are selected.
Use the controls in the Bar Style and Shadow sections of the sidebar to make changes.
Only the error bars for the selected data series are modified. To change error bars for another series, click one of its error bars, then make changes.
To remove error bars, click the chart, click an error bar, then click the Error Bars pop-up menu in the sidebar and choose None.
Show or remove trendlines
Trendlines show the overall direction (or trend) of your data. Trendlines appear in bar, line, scatter, bubble, column and area charts.
Click the chart, then in the Format
 sidebar, click the Series tab.
Click the disclosure triangle next to Trendlines, then click the pop-up menu and choose a type of trendline.
Do any of the following:
Show names for the trendlines: Select the Name tickbox, then type a name in the field. The name you type appears for all trendlines on the chart. To change a name, double-click it on the chart, then type a new one.
Show the equation or R-squared value: Select the Show Equation or Show R 2 Value tickbox.
To change the look of a trendline, click the line so you see white dots at either end, then use the controls in the Stroke and Shadow sections of the sidebar to make changes:
To remove trendlines, click the chart, click a trendline, then click the Trendlines pop-up menu in the sidebar and choose None.