2.2.3.20 insertSparklines

Menu Information

Right-click context menu of worksheet cell: Insert Sparklines...

Brief Information

Insert sparklines into worksheet cells

Command Line Usage

1. insertSparklines irng:=col(2) plottype:=his orng:=col(3)[1];

2. insertSparklines irng:=col(2):col(4) name:=0 c2:=min c3:=max label:=0 size:=double orng:=col(5)[1];

3. insertSparklines irng:=col(2):col(4) name:=0 c2:=mean keepAspect:=1 endpts:=0 orng:=col(5)[5] xfrom:=0 xto:=500 yfrom:=0 yto:=200;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Data Column(s) irng

Input

Range

<>

Specifies the data columns for the sparklines.

Insert Direction insertDir

Input

int

vertical

Specifies the direction of the inserted cells.
Option list:

  • horizontal:Horizontal (0)
  • vertical:Vertical (1)
Long Name in 1st Column name

Input

int

1

Specifies whether or not to show the Long Names of the data columns in the first specified column.

Add 3rd Column c2

Input

int

none

Specifies whether or not to add a third column. If this column is added, user can further specify its content.
Option list:

  • none:None (0)
    Does not add the third column.
  • comments:Comments (1)
    Adds the comment of each data column.
  • parameter1:Parameter 1 (2)
    Adds the parameter1 of each data column.
  • mean:Mean (3)
    Adds the mean value of each data column.
  • min:Min (4)
    Adds the minimum value of each data column.
  • max:Max (5)
    Adds the maximum value of each data column.
Add 4th Column c3

Input

int

none

Specifies whether or not to add a fourth column. If this column is added, user can further specify its content.
Option list:

  • none:None (0)
    Does not add the fourth column.
  • comments:Comments (1)
    Adds the comment of each data column.
  • parameter1:Parameter 1 (2)
    Adds the parameter1 of each data column.
  • mean:Mean (3)
    Adds the mean value of each data column.
  • min:Min (4)
    Adds the minimum value of each data column.
  • max:Max (5)
    Adds the maximum value of each data column.
Add 5th Column c4

Input

int

none

Specifies whether or not to add a fifth column. If this column is added, user can further specify its content.
Option list:

  • none:None (0)
    Does not add the fifth column.
  • comments:Comments (1)
    Adds the comment of each data column.
  • parameter1:Parameter 1 (2)
    Adds the parameter1 of each data column.
  • mean:Mean (3)
    Adds the mean value of each data column.
  • min:Min (4)
    Adds the minimum value of each data column.
  • max:Max (5)
    Adds the maximum value of each data column.
Add 6th Column c5

Input

int

none

Specifies whether or not to add a sixth column. If this column is added, user can further specify its content.
Option list:

  • none:None (0)
    Does not add the sixth column.
  • comments:Comments (1)
    Adds the comment of each data column.
  • parameter1:Parameter 1 (2)
    Adds the parameter1 of each data column.
  • mean:Mean (3)
    Adds the mean value of each data column.
  • min:Min' (4)
    Adds the minimum value of each data column.
  • max:Max (5)
    Adds the maximum value of each data column.
Plot Type plottype

Input

int

line
Specifies the plot type of the sparklines


Option list:

  • line:Line (0)
    Line
  • his:Histogram (1)
    Histogram
  • box:Box (2)
    Box chart
Graph Template template

Input

string

<auto>

Specifies the graph template used to generate the sparklines. Support both *.otpu, and *.otp types.

Hide Annotations label

Input

int

1

Specifies whether or not to hide the annotation (text labels and legend) on the sparklines.

Keep Aspect Ratio keepAspect

Input

int

0

Specifies whether or not to keep the aspect ratio of the sparklines.

Sparkline Cell Height size

Input

int

normal

Specifies the height of the cells, into which the sparklines are inserted.
Option list:

  • normal:Normal (0)
    Uses normal size.
  • double:Double (1)
    Uses double size.
Show First and Last Points endpts

Input

int

1

Specifies whether to show the first and last points for the sparklines.

Top Left Cell orng

Output

Range

<active>

Specifies the top left cell (the first cell) to insert. See the syntax here.

X From xfrom

Input

double

<unassigned>

Specifies the first X scale value for the sparklines.

X To xto

Input

double

<unassigned>

Specifies the last X scale value for the sparklines.

Y From yfrom

Input

double

<unassigned>

Specifies the first Y scale value for the sparklines.

Y To yto

Input

double

<unassigned>

Specifies the last Y scale value for the sparklines.

Description

This X-Function plots the sparklines for a range of data columns and inserts them into specified worksheet cells. It can also calculate the mean value, minimum value and maximum value of each data column. You can use it to generate a simple report for the data columns.

Related X-Functions

insertGraph, insertNotes, insertImg, insertArrow, insertVar, Sparklines, UpdateSparklines