Sparkline Chart Drawings

Sparkline charts are small and compact charts with high data density and serve to display the trends and variations of associated data areas in figures. SpreadsheetWEB will automatically convert them into the web application as long as they are correctly formed within the spreadsheet. However, one has to put them together in their spreadsheet at the Excel level. Below, you will find the instructions on how to do that.

Basically, there are 8 types of different sparkline charts that SpreadsheetWEB currently supports.

1. Line:

The basic formula setting for a SparklineLine chart is:

=SparklineLine(InputCells, MaxMin, FirstLast, AllPoints)

                                          

                                                      Figure 1. MaxMin = True

                                         

                                       Figure 2. FirstLast = True

                                           

                                       Figure 3. AllPoints = True

Finally the formula should be something like: =SparklineLine(A1:C1, True, False, False)

 

2. Discrete Bar:

SparklineDiscreet gives a discreet look to the sparklines.

The basic formula setting for SparklineDiscreet is:

=SparklineDiscreet(InputCells, Threshold)

                                           

                                        Figure 4. Threshold = 0

Let us assume that we have a set of numbers including 1, 7, -5, 0, 9, 12, -11 and 2.

Their look when arranged in a row will change according to the threshold. Results for thresholds 0, 10 or -20 will be different.

All in all, the formula should be like: =SparklineDiscreet(A1:D1, 10)

 

3. Bar:

The basic formula setting for the SparklineBar chart is:

=SparklineBar(InputCells, Threshold)

The configuration of SparklineBar is the same as that of the SparklineDiscreet bar (see above), but the outcome is favorably different. SparklineBar charts look like the smaller copies of Excel bar graphs. Depending on the variance of the threshold value, the appearance of the chart will change.

                                        

                                    Figure 5. Threshold = 5

The formula you have entered should consequently be similar to:

=SparklineBar(B1:K1, 10)

 

4. Area

The basic formula setting for a SparklineArea chart is:

=SparklineArea(InputCells, Border, Points, Color)

                                        

            Figure 6. Color = "Orange"                  Figure 7. Color = "Red"

In the end, the formula should look like:

=SparklineArea(C1:K11, True, False, "Yellow")

 

5. Pie

The basic formula setting for a SparklinePie chart is:

=SparklinePie(InputCells, Color)

                                                                             

         Figure 8. Color = "Green"                                Figure 9. Color = "Red"

Note that the formula cell should be something akin to:

=SparklinePie(F3:H6, #35CFA6)

 

6. Icon

The basic formula to make a SparklineIcon chart is:

=SparklineIcon(Range1,DataPlace,IconType,Range2,SortType)

When it comes to creating an icon set, the variables are:

    You should add the name of the set (e.g. "3 Arrows Colored") to the formula.

Your formula should be similar to the following:

=Sparklinecon(A1:A12, B1:C2, "3 Arrows Colored", "Percentile")

Examples for SparklineIcon:

To understand the implementation of icons more clearly, please read the following examples:

 

1. "Number"

Assume that there are the names of employees listed in your spreadsheet, and you want to apply an icon to each employee according to their salaries per year.

IconType = "3 Arrows Gray"

InputCells2 = "10000" and "50000"

SortType = "Number"

Then, the distribution of icons will most likely be as follows:

Down Arrow => Employees whose salary per year is lower than 10000.

Horizontal Arrow => Employees whose salary per year is between 10000 and 50000.

Up Arrow =>  Employees whose salary per year is higher than 50000.

 

2. "Percent"

Assume that you need to icon 300 numbers with their values ratio.

IconType = “3 Signs”

InputCells2 = “50” and “70”

SortType = “Percent”

The formula detected that the highest number in the InputCells is 3215, so our icons will be distributed like;

Diamonds => Numbers that are smaller than (3215/100)*50

Triangles => Numbers that are between (3215/100)*50 and (3215/100)*70

Circles => Numbers that are higher than (3215/100)*70

           

3. "Percentile"

Assume that you have 10 numbers (1, 2, 45, 36, 5, 666, 100, 3654, 9, 44) and you want to icon them with respect to their ranks.

IconType =  “3 Arrows Grey”

InputCells2 = “32” and “77”

SortType = “Percentile”     

Then, the formula will sort the values and distribute the icons respectively to the sorted InputCells;

Down Arrow =>

1

2

5

---Exceeds 32% of the numbers so change the icon

Horizontal Arrow =>

9

36

44

45

--- Exceeds 77% of the numbers so change the icon

Up Arrow =>

100

666

3654

 

7. Bullet Graph

The chart formula for SparklineBullet is:

=SparklineBullet(InputCells, InputCells2, Color)

                                                                                  

  Figure 10. InputCells without target value and Color = "#00FF00"                Figure 11. Basic SparklineBullet

 

Your formula should be something like this:

=SparklineBullet(B1:B10, C2:C11, "Purple")

Bullet Graph can either be horizontal or vertical depending on the height and width of the target cells.

8. Scale

The chart formula for SparklineScale is:

=SparklineScale(InputCells, TopBottom)

                

Figure 12. TopBottom = True            Figure 13. TopBottom = False

Overall formula should look like:

=SparklineScale(A1:A3, True)

9. Icon Bar

The chart formula for the Sparkline Icon Bar chart is:

=SparklineIconBar(DataRange,BarPoint,Color)

Figure 14: An example Sparkline icon bar chart.