Insert charts

Insert a chart

To insert a chart in the Spreadsheet Editor,

  1. Select the cell range that contain the data you wish to use for the chart,
  2. switch to the Insert tab of the top toolbar,
  3. Click the Chart icon Chart icon on the top toolbar,
  4. 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
    • Pie
    • Doughnut
    • 3-D Pie
    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
    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,

  1. select the chart with the mouse,
  2. click the Chart settings Chart settings icon icon on the right sidebar,

    Chart Settings Right-Side Panel window

  3. open the Style drop-down list below and select the style which suits you best.
  4. open the Change type drop-down list and select the type you need.

The selected chart type and style will be changed.

To edit chart data:

  1. Click the Select Data button on the right-side panel.
  2. Use the Chart Data dialog to manage Chart Data Range, Legend Entries (Series), Horizontal (Category) Axis Label and Switch Row/Column.

    Chart Data window

    • Chart Data Range - select data for your chart.
      • Click the Source data range icon icon on the right of the Chart data range box to select data range.

        Select Data Range window

    • 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 Source data range icon icon on the right of the Select name box.

        Edit Series window

    • 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 Source data range icon icon on the right of the Axis label range box to select data range.

        Axis Labels window

    • 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.
  3. 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.

Chart - Advanced Settings window

The Layout tab allows you to change the layout of chart elements.

Chart - Advanced Settings window

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.

Chart - Advanced Settings window

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.

Chart - Advanced Settings window

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.

The Cell Snapping tab contains the following parameters:

Chart - Advanced Settings: Cell Snapping

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.

Chart - Advanced Settings

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 Shape settings icon 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 Stroke. 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 and type. 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 Square icon located along the perimeter of the element.

Resize chart elements

To change the position of the element, left-click on it, make sure your cursor changed to Arrow, hold the left mouse button and drag the element to the needed position.

Move chart elements

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.

3D chart

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:

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.