Color Scales

Color scales can be applied to xmCHART heat maps and tree maps by using the function:

Presently there are 16 built-in color scales to choose from which can be accessed by entering a colorScaleID between 1 and 16. By using the 3rd argument colorVariant, it is possible to choose between the default appearance solid and shaded. For example:

FillColorScale(1;​8)

FillColorScale(1;​8;​shaded)

In addition, the transparency of the colors can be controlled by using the 4th argument opacity. The opacity can be set between 0 (fully transparent) and 1 (completely opaque) — default is 1. For example:

FillColorScale(1;​12;​solid;​0.7)

FillColorScale(1;​12;​shaded;​0.5)

The number of color tones can be limited by using the 5th argument numOfColorTones. For example:

FillColorScale(1;​1;​;​;​7)

IDScale
 1Scale: 1 
 2Scale: 2 
 3Scale: 3 
 4Scale: 4 
 5Scale: 5 
 6Scale: 6 
 7Scale: 7 
 8Scale: 8 
 9Scale: 9 
10Scale: 10 
11Scale: 11 
12Scale: 12 
13Scale: 13 1 
14Scale: 14 1 
15Scale: 15 1 
16Scale: 16 1 

1 xmCHART 4.0.5 or higher required.


Examples
EXAMPLE_01
1

OpenDrawing(450;​15)

2

OpenChart(0;​0;​450;​15;​on)

3

ChartData(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30)

4

HeatMap(;​1) /* 1 row. */

5

/* Set up styles. */

6

FillColorScale(1;​8;​shaded)

7

BorderStyle(1;​none)

8

CloseChart()

9

CloseDrawing()

EXAMPLE_01
EXAMPLE_02
1

OpenDrawing(400;​150)

2

ChartData(4 2 1 0 1 2 4 7 10 13 16 18 19 18 18 17 15 13 10 8 5 3 2 2 2 3 5 8 10 13 15 17 18 16 16 15 13 12 10)

3

TreeMap()

4

/* Set up styles. */

5

FillColorScale(1;​9)

6

CloseDrawing()

EXAMPLE_02
EXAMPLE_03
1

OpenDrawing(560;​100)

2

OpenChart(20;​20;​530;​72;​on)

3

ChartData(null null null 32 24 9 0 27 30 36 26 32 8 5 32 14 27 24 32 4 4 14 20 18 14 27 9 2 23 25 23 18 21 4 1 31 15 23 30 16 2 3 33 31 38 24 28 8 2 21 21 16 11 38 6 3 25 11 33 27 20 4 0 24 27 29 10 25 5 4 32 17 18 39 18 6 3 23 13 23 37 24 6 1 36 34 35 36 18 10 1 25 23 25 24 18 1 2 26 24 40 39 32 7 0 28 13 25 17 15 6 2 11 33 34 12 36 4 3 19 39 21 28 37 2 3 24 24 36 14 40 6 4 15 31 24 35 21 10 3 16 38 10 29 36 3 1 39 26 24 25 27 4 4 37 13 36 38 33 5 3 20 32 33 22 29 3 1 38 12 17 14 20 6 0 37 39 31 30 20 8 1 17 24 23 27 23 2 3 10 30 15 21 25 10 0 34 18 34 17 27 1 4 22 36 15 13 27 8 4 36 19 24 21 27 9 0 13 21 29 35 29 2 3 36 19 11 15 36 5 1 18 18 19 34 38 1 2 33 19 18 34 24 2 1 38 27 22 25 20 4 3 15 39 11 12 20 0 2 18 26 24 34 32 3 4 19 33 37 31 32 3 4 38 18 20 26 34 4 3 20 37 23 12 30 5 1 14 30 39 33 15 2 2 34 11 11 26 28 5 4 19 20 14 34 39 6 1 16 29 11 18 28 8 5 23 13 36 18 19 10 4 34 36 15 35 35 6 2 31 18 13 15 21 7 4 29 24 24 33 13 2 5 27 29 37 17 23 3 5 12 28 22 19 21 5 2 14 37 34 26 18 6 2 33 29 33 24)

4

Heatmap(;​7;​53) /* 7 rows, 53 columns. */

5

HeatMapOptions(0.4%;​;​;​on)

6

FillColorScale(1;​15;​solid;​0.8)

7

BorderStyle(1;​none) /* Hide borders. */

8

CloseChart()

9

AddText(8;​26;​"M\nT\nW\nT\nF\nS\nS";​Verdana;​9)

10

AddText( 20;​15;​"JAN";​Verdana;​9)

11

AddText( 61;​15;​"FEB";​Verdana;​9)

12

AddText(101;​15;​"MAR";​Verdana;​9)

13

AddText(151;​15;​"APR";​Verdana;​9)

14

AddText(191;​15;​"MAY";​Verdana;​9)

15

AddText(241;​15;​"JUN";​Verdana;​9)

16

AddText(281;​15;​"JUL";​Verdana;​9)

17

AddText(321;​15;​"AUG";​Verdana;​9)

18

AddText(371;​15;​"SEP";​Verdana;​9)

19

AddText(411;​15;​"OCT";​Verdana;​9)

20

AddText(451;​15;​"NOV";​Verdana;​9)

21

AddText(501;​15;​"DEC";​Verdana;​9)

22

CloseDrawing()

EXAMPLE_03
Scroll to Top
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×