Image Sparklines

To create image sparklines in the workbook:

  1. Click Insert from the menu.

  2. Click Sparkline and select the image sparkline under Other Sparkline from the list.

  3. In the ImageSparkline Setting dialog box:

    1. Set the parameters as described below.

    2. Click OK.

  4. The sparkline is displayed in the cell. To edit the sparkline, click Design from the menu and select Settings. The ImageSparkline Setting dialog box will be displayed again.

  5. Copy and paste the cell as needed to finalize your image sparklines.

Image sparkline parameter Description
URL The location of the image on the web or base64 string.
Mode

A number that represents the image Fit mode:

  • Keep Scale (1)

  • Stretch (2)

  • Original Size (3)

  • Custom Size (4)

Height The height of the image when the mode is Custom Size (4).
Width The width of the image when the mode is Custom Size (4).
ClipY (Optional) The X-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
ClipX (Optional) The Y-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
Clip Height (Optional) The height of the sub-rectangle of the source image to draw into the destination context.
Clip Width (Optional) The width of the sub-rectangle of the source image to draw into the destination context.
VAlign

(Optional) This value indicates the vertical alignment of the image:

  • Top (0)

  • Center (1)

  • Bottom (2)

HAlign

(Optional) This value indicates the horizontal alignment of the image:

  • Left (0)

  • Center (1)

  • Right (2)

The image sparkline formula has the following syntax:

=IMAGE(url, [mode, height, width, clipX, clipY, clipHeight, clipWidth, vAlign, hAlign])