Insert charts
Insert a recommended chart
The easiest way to insert a chart in the Spreadsheet Editor is to use the Recommended Chart tool which suggests using certain types of charts depending on the selected data as well as displays preview for all types of charts.
- Select the cell range that contain the data you wish to use for the chart.
- Switch to the Insert tab of the top toolbar.
- Click the Recommended Chart icon on the top toolbar.
- Switch between the recommended chart types to see how the chart will look like. You can also use tabs on the left to preview other chart types.
- When the chart type is selected, click OK.
Insert and adjust a chart manually
To insert a chart and manually adjust its parameters,
- Select the cell range that contain the data you wish to use for the chart.
- Switch to the Insert tab of the top toolbar.
- Click the Chart icon on the top toolbar.
-
Select the needed chart type from the available ones:
Column Charts
- Clustered column
- Stacked column
- 100% stacked column
- 3-D Clustered Column
- 3-D Stacked Column
- 3-D 100% stacked column
- 3-D Column
Line Charts
- Line
- Stacked line
- 100% stacked line
- Line with markers
- Stacked line with markers
- 100% stacked line with markers
- 3-D Line
Pie Charts
Bar Charts
- Clustered bar
- Stacked bar
- 100% stacked bar
- 3-D clustered bar
- 3-D stacked bar
- 3-D 100% stacked bar
Area Charts
- Area
- Stacked area
- 100% stacked area
Stock Charts
XY (Scatter) Charts
- Scatter
- Stacked bar
- Scatter with smooth lines and markers
- Scatter with smooth lines
- Scatter with straight lines and markers
- Scatter with straight lines
Radar Charts
- Radar
- Radar with markers
- Filled radar
Combo Charts
- Clustered column - line
- Clustered column - line on secondary axis
- Stacked area - clustered column
- Custom combination
After that the chart will be added to the worksheet.
Note: ONLYOFFICE Spreadsheet Editor supports the following types of charts that were created with third-party editors: Pyramid, Bar (Pyramid), Horizontal/Vertical Cylinders, Horizontal/Vertical Cones. You can open the file containing such a chart and modify it using the available chart editing tools.
Adjust the chart settings
Now you can change the settings of the inserted chart. To change the chart type,
- Select the chart with the mouse.
-
Click the Chart settings icon on the right sidebar.
- Open the Style drop-down list below and select the style which suits you best.
- Open the Change type drop-down list and select the type you need.
- Click the Switch row/column option to change the positioning of chart rows and columns.
The selected chart type and style will be changed.
Additionally, 3D Rotation settings are available for 3D charts:
To edit chart data:
- Click the Select Data button on the right-side panel.
-
Use the Chart data dialog to manage Chart data range, Legend entries (series), Horizontal (category) axis label and Switch row/column.
-
Chart data range - select data for your chart.
-
Click the icon on the right of the Chart data range box to select data range.
-
Legend entries (series) - add, edit, or remove legend entries. Type or select series name for legend entries.
- In Legend entries (series), click Add button.
-
In Edit series, type a new legend entry or click the icon on the right of the Series name box.
-
Horizontal (category) axis labels - change text for category labels.
- In Horizontal (category) axis labels, click Edit.
-
In Axis label range, type the labels you want to add or click the icon on the right of the Axis label range box to select data range.
- Switch row/column - rearrange the worksheet data that is configured in the chart not in the way that you want it. Switch rows to columns to display data on a different axis.
- Click OK button to apply the changes and close the window.
Click Show advanced settings to change other settings such as Layout, Vertical axis, Secondary vertical axis, Horizontal axis, Secondary horizontal axis, Cell snapping and Alternative text.
The Layout tab allows you to change the layout of chart elements.
The Vertical axis tab allows you to change the parameters of the vertical axis also referred to as the values axis or y-axis which displays numeric values. Note that the vertical axis will be the category axis which displays text labels for the Bar charts, therefore in this case the Vertical axis tab options will correspond to the ones described in the next section. For the XY (Scatter) charts, both axes are value axes.
Note: the Axis settings and Gridlines sections will be disabled for Pie charts since charts of this type have no axes and gridlines.
- Select Hide to hide vertical axis in the chart, leave it unchecked to have vertical axis displayed.
-
Specify Title orientation by selecting the necessary option from the drop-down list:
- None to display no vertical axis title,
- Rotated to display the title from bottom to top to the left of the vertical axis,
- Horizontal to display the title horizontally to the left of the vertical axis.
- Minimum value - is used to specify the lowest value displayed at the vertical axis start. The Auto option is selected by default, in this case the minimum value is calculated automatically depending on the selected data range. You can select the Fixed option from the drop-down list and specify a different value in the entry field on the right.
- Maximum value - is used to specify the highest value displayed at the vertical axis end. The Auto option is selected by default, in this case the maximum value is calculated automatically depending on the selected data range. You can select the Fixed option from the drop-down list and specify a different value in the entry field on the right.
- Axis crosses - is used to specify a point on the vertical axis where the horizontal axis should cross it. The Auto option is selected by default, in this case the axes intersection point value is calculated automatically depending on the selected data range. You can select the Value option from the drop-down list and specify a different value in the entry field on the right, or set the axes intersection point at the Minimum/Maximum Value on the vertical axis.
- Display units - is used to determine the representation of the numeric values along the vertical axis. This option can be useful if you're working with great numbers and wish the values on the axis to be displayed in a more compact and readable way (e.g. you can represent 50 000 as 50 by using the Thousands display units). Select desired units from the drop-down list: Hundreds, Thousands, 10 000, 100 000, Millions, 10 000 000, 100 000 000, Billions, Trillions, or choose the None option to return to the default units.
- Values in reverse order - is used to display values in the opposite direction. When the box is unchecked, the lowest value is at the bottom and the highest value is at the top of the axis. When the box is checked, the values are ordered from top to bottom.
- Logarithmic scale - is used to enable logarithmic scaling to the Base that is determined by the user.
-
The Tick Options section allows adjusting the appearance of tick marks on the vertical scale. Major tick marks are the larger scale divisions which can have labels displaying numeric values. Minor tick marks are the scale subdivisions which are placed between the major tick marks and have no labels. Tick marks also define where gridlines can be displayed if the corresponding option is set on the Layout tab. The Major/minor type drop-down lists contain the following placement options:
- None to display no major/minor tick marks,
- Cross to display major/minor tick marks on both sides of the axis,
- In to display major/minor tick marks inside the axis,
- Out to display major/minor tick marks outside the axis.
-
The Label options section allows adjusting the appearance of major tick mark labels which display values. To specify a Label position in regard to the vertical axis, select the necessary option from the drop-down list:
- None to display no tick mark labels,
- Low to display tick mark labels to the left of the plot area,
- High to display tick mark labels to the right of the plot area,
- Next to axis to display tick mark labels next to the axis.
-
To specify a Label format click the Label Format button and choose a category as it deems appropriate.
Available label format categories:
- General
- Number
- Scientific
- Accounting
- Currency
- Date
- Time
- Percentage
- Fraction
- Text
- Custom
Label format options vary depending on the selected category. For more information on changing number format, go to this page.
-
Check Linked to source to keep number formatting from the data source in the chart.
Note: Secondary axes are supported in Combo charts only.
Secondary axes are useful in Combo charts when data series vary considerably or mixed types of data are used to plot a chart. Secondary Axes make it easier to read and understand a combo chart.
The Secondary vertical/horizontal axis tab appears when you choose an appropriate data series for a combo chart. All the settings and options on the Secondary vertical/horizontal axis tab are the same as the settings on the Vertical/Horizontal Axis. For a detailed description of the Vertical/horizontal axis options, see description above/below.
The Horizontal axis tab allows you to change the parameters of the horizontal axis also referred to as the categories axis or x-axis which displays text labels. Note that the horizontal axis will be the value axis which displays numeric values for the Bar charts, therefore in this case the Horizontal axis tab options will correspond to the ones described in the previous section. For the XY (Scatter) charts, both axes are value axes.
- Select Hide to hide horizontal axis in the chart, leave it unchecked to have horizontal axis displayed.
-
Specify Title orientation by selecting the necessary option from the drop-down list:
- None when you don’t want to display a horizontal axis title,
- No overlay to display the title below the horizontal axis,
- Gridlines is used to specify the Horizontal gridlines to display by selecting the necessary option from the drop-down list: None, Major, Minor, or Major and minor.
- Axis crosses - is used to specify a point on the horizontal axis where the vertical axis should cross it. The Auto option is selected by default, in this case the axes intersection point value is calculated automatically depending on the selected data range. You can select the Value option from the drop-down list and specify a different value in the entry field on the right, or set the axes intersection point at the Minimum/maximum value (that corresponds to the first and last category) on the horizontal axis.
- Axis position - is used to specify where the axis text labels should be placed: On tick marks or Between tick marks.
- Values in reverse order - is used to display categories in the opposite direction. When the box is unchecked, categories are displayed from left to right. When the box is checked, the categories are ordered from right to left.
-
The Tick Options section allows adjusting the appearance of tick marks on the horizontal scale. Major tick marks are the larger divisions which can have labels displaying category values. Minor tick marks are the smaller divisions which are placed between the major tick marks and have no labels. Tick marks also define where gridlines can be displayed if the corresponding option is set on the Layout tab. You can adjust the following tick mark parameters:
- Major/minor type - is used to specify the following placement options: None to display no major/minor tick marks, Cross to display major/minor tick marks on both sides of the axis, In to display major/minor tick marks inside the axis, Out to display major/minor tick marks outside the axis.
- Interval between marks - is used to specify how many categories should be displayed between two adjacent tick marks.
-
The Label options section allows adjusting the appearance of labels which display categories.
- Label position - is used to specify where the labels should be placed in regard to the horizontal axis. Select the necessary option from the drop-down list: None to display no category labels, Low to display category labels at the bottom of the plot area, High to display category labels at the top of the plot area, Next to axis to display category labels next to the axis.
- Axis label distance - is used to specify how closely the labels should be placed to the axis. You can specify the necessary value in the entry field. The more the value you set, the more the distance between the axis and labels is.
- Interval between labels - is used to specify how often the labels should be displayed. The Auto option is selected by default, in this case labels are displayed for every category. You can select the Manual option from the drop-down list and specify the necessary value in the entry field on the right. For example, enter 2 to display labels for every other category etc.
-
To specify a Label format click the Label Format button and choose a category as it deems appropriate.
Available label format categories:
- General
- Number
- Scientific
- Accounting
- Currency
- Date
- Time
- Percentage
- Fraction
- Text
- Custom
Label format options vary depending on the selected category. For more information on changing number format, go to this page.
-
Check Linked to source to keep number formatting from the data source in the chart.
The Cell snapping tab contains the following parameters:
- Move and size with cells - this option allows you to snap the chart to the cell behind it. If the cell moves (e.g. if you insert or delete some rows/columns), the chart will be moved together with the cell. If you increase or decrease the width or height of the cell, the chart will change its size as well.
- Move but don't size with cells - this option allows to snap the chart to the cell behind it preventing the chart from being resized. If the cell moves, the chart will be moved together with the cell, but if you change the cell size, the chart dimensions remain unchanged.
- Don't move or size with cells - this option allows to prevent the chart from being moved or resized if the cell position or size was changed.
The Alternative text tab allows to specify the Title and the Description which will be read to people with vision or cognitive impairments to help them better understand what information the chart contains.
Edit chart elements
To edit the chart Title, select the default text with the mouse and type in your own one instead.
To change the font formatting within text elements, such as the chart title, axes titles, legend entries, data labels etc., select the necessary text element by left-clicking it. Then use icons on the Home tab of the top toolbar to change the font type, style, size, or color.
When the chart is selected, the Shape settings icon is also available on the right, since the shape is used as a background for the chart. You can click this icon to open the Shape settings tab on the right sidebar and adjust the shape Fill and Line. Note that you cannot change the shape type.
Using the Shape settings tab on the right panel you can not only adjust the chart area itself, but also change the chart elements, such as the plot area, data series, chart title, legend, etc. and apply different fill types to them. Select the chart element by clicking it with the left mouse button and choose the preferred fill type: solid color, gradient, texture or picture, pattern. Specify the fill parameters and set the Opacity level if necessary.
When you select a vertical or horizontal axis or gridlines, the stroke settings are only available on the Shape Settings tab: color, width, type, and opacity. For more details on how to work with shape colors, fills and stroke, please refer to this page.
Note: the Show shadow option is also available on the Shape settings tab, but it is disabled for chart elements.
If you need to resize chart elements, left-click to select the needed element and drag one of 8 white squares located along the perimeter of the element.
To change the position of the element, left-click on it, make sure your cursor changed to , hold the left mouse button and drag the element to the needed position.
To delete a chart element, select it by left-clicking and press the Delete key on the keyboard.
You can also rotate 3D charts using the mouse. Left-click within the plot area and hold the mouse button. Drag the cursor without releasing the mouse button to change the 3D chart orientation.
If necessary, you can change the chart size and position.
To delete the inserted chart, click it and press the Delete key.
Assign a Macro to a Chart
You can provide a quick and easy access to a macro within a spreadsheet by assigning a macro to any chart. Once you assign a macro, the chart appears as a button control and you can run the macro whenever you click it.
To assign a macro:
-
Right-click the chart to assign a macro to and choose the Assign Macro option from the drop-down menu.
- The Assign Macro dialogue will open
-
Choose a macro from the list, or type in the macro name, and click OK to confirm.
Once a macro is assigned, you can still select the chart to perform other operations by left-clicking on chart surface.
Using sparklines
ONLYOFFICE Spreadsheet Editor supports Sparklines. Sparklines are small charts that fit into a cell, and are an efficient data visualization tool. For more information about how to create, edit and format sparklines, please see our Insert Sparklines guidelines.
Return to previous page