addSparkline
adds a sparkline into a cell
void addSparkline(number rowId,number columnId,object config, [string page] );
| rowId | number | the row id |
| columnId | number | the column id |
| config | object | the sparkline configuration |
| page | string | optional, the name of the sheet. If not specified, the method is applied to the current sheet |
Example
$$("my").addSparkline(5, 5, {type:"line", range:"B4:E4", color:"#6666FF"}, "Sheet1");
Related samples
Details
The config object includes the following properties:
- type - (string) the type of the sparkline: "line", "spline", "splineArea", "area", "bar", "barH" (horizontal bars), "radar", "pie" or "donut"
- range - (string) a range of cells the values of which will be used for making a sparkline
- color - (string) the color of a sparkline either in a hex format or as a color name
- negativeColor - (string) the color of a negative value for a Bar sparkline
- horizontal - (boolean) true to display the bars of a Bar sparkline horizontally
See also
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support,
connect with other developers, and share your feedback there.