Usar minigráficos para mostrar tendencias de datos

New in Microsoft Excel 2010, a sparkline is a tiny chart in a worksheet cell that provides a visual representation of data. Use sparklines to show trends in a series of values, such as seasonal increases or decreases, economic cycles, or to highlight maximum and minimum values. Position a sparkline near its data for greatest impact.

"Sparklines enable us to create visual representations of data with one click. It makes it easier to grasp data, and it’s helping our CFO analyze trends on the spot."
Matt Stuckey, IT Director of Levick Strategic Communications

En este artículo:

¿Qué son los minigráficos?

Ventajas del uso de minigráficos

Create a sparkline

Personalizar minigráficos

¿Qué son los minigráficos?

Unlike charts on an Excel worksheet, sparklines are not objects — a sparkline is actually a tiny chart in the background of a cell. The following picture shows a column sparkline in cell F2 and a line sparkline in F3. Both of these sparklines get their data from cells A2 through E2 and display a chart inside a cell that shows the performance of a stock. The charts show the values by quarter, highlight the high value (3/31/08) and the low value (12/31/08), show all the data points, and show the downward trend for the year.


A sparkline in cell F6 shows the 5-year performance for the same stock, but displays a Win/Loss bar chart that shows only whether the year had a gain (as in the years 2004 through 2007) or a loss (2008). This sparkline uses values from cells A6 through E6.

Because a sparkline is a tiny chart embedded in a cell, you can enter text in a cell and use a sparkline as its background, as shown in the following picture.

Figure 1: In this sparkline, the high value marker is green, and the low value marker is orange. All other markers are shown in black.

You can apply a color scheme to your sparklines by choosing a built-in format from the Style gallery (Design tab, which becomes available when you select a cell that contains a sparkline). You can use the Sparkline Color or Marker Color commands to choose a color for the high, low, first, and last values (such as green for high, and orange for low).

Principio de página

Ventajas del uso de minigráficos

Data presented in a row or column is useful, but patterns can be hard to spot at a glance. The context for these numbers can be provided by inserting sparklines next to the data. Taking up a small amount of room, a sparkline can display a trend based on adjacent data in a clear and compact graphical representation. Although it's not mandatory for a sparkline cell to be directly next to its underlying data, it is a good practice.

You can quickly see the relationship between a sparkline and its underlying data, and when your data changes you can see the change in the sparkline immediately. In addition to creating a single sparkline for a row or column of data, you can create several sparklines at the same time by selecting multiple cells that correspond to underlying data, as shown in the following picture.

También puede crear minigráficos para filas de datos que agregará más adelante usando el controlador de relleno sobre una celda adyacente que contenga un minigráfico.

Un grupo de minigráficos y sus datos

1. Rango de datos usados por un grupo de minigráficos

2. Un grupo de minigráficos

Una ventaja de usar minigráficos es que, a diferencia de los gráficos, los minigráficos se imprimen cuando se imprime una hoja de cálculo que los contiene.

Principio de página

Create a sparkline

  1. Select an empty cell or group of empty cells in which you want to insert one or more sparklines.

  2. On the Insert tab, in the Sparklines group, click the type of sparkline that you want to create: Line, Column, or Win/Loss.

    Grupo Minigráficos en la pestaña Insertar

  3. In the Data box, type the range of the cells that contain the data on which you want to base the sparklines.

    Note    You can click Imagen del botón to temporarily collapse the dialog box, select the range of cells that you want on the worksheet, and then click Imagen del botón to restore the dialog box to its normal size.

When one or more sparklines are selected, the Sparkline Tools appear, displaying the Design tab. On the Design tab, you can choose one or more of several commands from among the following groups: Sparkline, Type, Show/Hide, Style, and Group. Use these commands to create a new sparkline, change its type, format it, show or hide data points on a line sparkline, or format the vertical axis in a sparkline group. These options are described in detail in the following section.

Principio de página

Personalizar minigráficos

After you create sparklines, you can control which value points are shown (such as the high, low, first, last, or any negative values), change the type of the sparkline (Line, Column, or Win/Loss), apply styles from a gallery or set individual formatting options, set options on the vertical axis, and control how empty or zero values are shown in the sparkline.

Control which value points are shown

Puede resaltar marcadores de datos individuales (valores) en un minigráfico de línea haciendo que algunos o todos los marcadores queden visibles.


In this sparkline, the high value marker is green, and the low value marker is orange. All other markers are shown in black.

  • Para que se vean todos los valores, active la casilla Marcadores.

  • Para que se vean los valores negativos, active la casilla Puntos negativos.

  • Para que se vean los valores más altos o los más bajos, active las casillas Punto alto o Punto bajo.

  • Para que se vean el primer valor o el último, active las casillas Primer punto o Último punto.

Change the style of or format sparklines

Use the Style gallery on Design tab, which becomes available when you select a cell that contains a sparkline.

  1. Select a single sparkline or a sparkline group.

  2. To apply a predefined style, on the Design tab, in the Style group, click a style or click the arrow at the lower right corner of the box to see additional styles.

    Galería de estilos para minigráficos

  3. To apply specific formatting to a sparkline, use the Sparkline Color or the Marker Color commands.

Show or hide data markers

On a sparkline that has the Line style, you can show data markers so that you can highlight individual values.

  1. Select a sparkline.

  2. In the Show/Hide group, on the Design tab, select any of the check boxes to show individual markers (such as high, low, negative, first, or last), or select the Markers check box to show all markers.

    Clearing a check box hides the specified marker or markers.

Show and customize axis settings

You can select Date Axis Type (in the Group group, click Axis) to format the shape of the chart in a sparkline to reflect any irregular time periods in the underlying data.

Tipo de eje de fecha para minigráficos

In a line sparkline, applying the Date Axis type can change the slope of a plotted line and the position of its data points in relation to each other.

In a column sparkline, applying the Data Axis type can change the width of and increase or decrease the distance between the columns, as shown in the following image.

Minigráficos de columna con un tipo de eje general y un tipo de eje de fecha

In the example shown here, there are two column sparklines that use data from the same range. The sparkline with the “Trend” label uses the General Axis type, and the sparkline with the “Trend (Data Axis Type)” label uses the Date Axis type. In each sparkline, the first two data points are separated by two months, and the second and third are separated by seven months. By applying the Date Axis type, the space between the three columns changes proportionally to reflect the irregular time periods.

You can also use these Axis options to set minimum and maximum values for the vertical axis of a sparkline or sparkline group. Setting these values explicitly helps you control the scale so that the relationship between values is shown in a more meaningful way.

  1. With the sparkline or sparkline group selected, in the Group group, click Axis.

  2. Under Vertical Axis Minimum Value Options or Vertical Axis Maximum Value Options, click Custom Value.

  3. Set minimum or maximum values that you feel will best emphasize the values in the sparklines.

You can increase the height of the row that contains the sparkline to more dramatically emphasize the difference in data values if some is very small and some is very large.

You can also use the Plot Data Right-to-Left option to change the direction in which data is plotted in a sparkline or sparkline group.

Trazar datos de derecha a izquierda

If there are negative values in your data, you can emphasize this by showing a horizontal axis in your sparkline.

  1. With the sparkline or sparkline group selected, in the Group group, click Axis.

  2. Under Horizontal Axis Options, click Show Axis.
    Any sparklines that contain negative data will display a horizontal axis at 0.

    Minigráfico con eje horizontal

Controlar celdas vacías o valores cero

You can control how a sparkline handles empty cells in a range (and thus how the sparkline is displayed) by using the Hidden and Empty Cell Settings dialog box.

Cuadro de diálogo Configuración de celdas ocultas y vacías

Principio de página

¿Le ha sido útil esta información?

¿Cómo podemos mejorarlo?

¿Cómo podemos mejorarlo?

Para proteger su privacidad, no incluya información de contacto en sus comentarios. Revisar política de privacidad.

¡Gracias por sus comentarios!