Built-in Gradients

The built-in gradients have been deprecated* in favor of the much more flexible Color Gradients.

xmCHART provides 42 built-in gradients to choose from which can be accessed by entering a resource ID between 1 and 42. Built-in gradients are defined by the arguments sourceType and sourceData. Enter as sourceType the constant resource (or the value 2) and as sourceData the resource ID. Built-in gradients are available for the following functions:

For example:

Alternatively, xmCHART provides customizable color gradients to overcome the limitations of built-in gradients.

 IDGradientColor Gradient Equivalent
 1 1 90 1 0.0 255 255 255 255 1.0 184 184 184 255

 2 1 -90 1 0.0 255 255 255 255 1.0 184 184 184 255

 3 1 90 1 0.0 255 255 255 255 1.0 167 232 246 255

 4 1 -90 1 0.0 255 255 255 255 1.0 167 232 246 255

 5 1 90 1 0.0 255 255 255 255 1.0 148 213 128 255

 6 1 -90 1 0.0 255 255 255 255 1.0 148 213 128 255

 7 1 90 1 0.0 250 250 0 255 1.0 148 213 128 255

 8 1 90 1 0.0 250 250 0 255 1.0 250 100 42 255

 9 1 0 1 0.0 255 255 255 255 1.0 184 184 184 255

10 1 -180 1 0.0 255 255 255 255 1.0 184 184 184 255

11 1 0 1 0.0 255 255 255 255 1.0 167 232 246 255

12 1 -180 1 0.0 255 255 255 255 1.0 167 232 246 255

13 1 0 1 0.0 148 213 128 255 1.0 255 255 255 255

14 1 -180 1 0.0 148 213 128 255 1.0 255 255 255 255

15 1 0 1 0.0 250 250 0 255 1.0 148 213 128 255

16 1 0 1 0.0 250 250 0 255 1.0 250 100 42 255

17 1 45 1 0.0 255 255 255 255 1.0 184 184 184 255

18 1 225 1 0.0 255 255 255 255 1.0 184 184 184 255

19 1 135 1 0.0 255 255 255 255 1.0 184 184 184 255

20 1 -45 1 0.0 255 255 255 255 1.0 184 184 184 255

21 1 45 1 0.0 255 255 255 255 1.0 167 232 246 255

22 1 225 1 0.0 255 255 255 255 1.0 167 232 246 255

23 1 135 1 0.0 255 255 255 255 1.0 167 232 246 255

24 1 -45 1 0.0 255 255 255 255 1.0 167 232 246 255

25 1 45 1 0.0 255 255 255 255 1.0 148 213 128 255

26 1 225 1 0.0 255 255 255 255 1.0 148 213 128 255

27 1 135 1 0.0 255 255 255 255 1.0 148 213 128 255

28 1 -45 1 0.0 255 255 255 255 1.0 148 213 128 255

29 1 45 1 0.0 250 250 0 255 1.0 148 213 128 255

30 1 135 1 0.0 250 250 0 255 1.0 148 213 128 255

31 1 45 1 0.0 250 250 0 255 1.0 250 100 42 255

32 1 135 1 0.0 250 250 0 255 1.0 250 100 42 255

33 2 0.5 0.5 0.0 184 184 184 255 1.0 233 233 233 255

34 2 0.5 0.5 0.0 255 255 255 255 1.0 206 206 206 255

35 2 0.5 0.5 0.0 167 232 246 255 1.0 227 248 252 255

36 2 0.5 0.5 0.0 255 255 255 255 1.0 194 239 249 255

37 2 0.5 0.5 0.0 148 213 128 255 1.0 222 242 216 255

38 2 0.5 0.5 0.0 255 255 255 255 1.0 181 226 167 255

39 2 0.5 0.5 0.0 250 250 0 255 1.0 179 224 90 255

40 2 0.5 0.5 0.0 148 213 128 255 1.0 219 239 38 255

41 2 0.5 0.5 0.0 250 250 0 255 1.0 250 146 28 255

42 2 0.5 0.5 0.0 250 100 42 255 1.0 250 205 10 255
Examples
EXAMPLE_01
1

OpenDrawing(220;​100)

2

/* AddPicture(10;10;280;80;resource;1) Deprecated. */

3

/* Instead, use the function below. */

4

AddRect(10;​10;​280;​80;​1 90 1 0.0 255 255 255 255 1.0 184 184 184 255)

5

CloseDrawing()

EXAMPLE_01
EXAMPLE_02
1

OpenDrawing(250;​150)

2

ChartData(15 25 13 36 25 10)

3

BarChart()

4

/* PictureStyle(all;resource;8;10) Deprecated. */

5

/* Instead, use the function below. */

6

PictureStyle(all;​stream;​"iVBORw0KGgoAAAANSUhEUgAA​AAEAAAAKCAYAAAB10jRKAAAEJ​GlDQ1BJQ0MgUHJvZmlsZQAAOB​GFVd9v21QUPolvUqQWPyBYR4e​Kxa9VU1u5GxqtxgZJk6XtShal​6dgqJOQ6N4mpGwfb6baqT3uBN​wb8AUDZAw9IPCENBmJ72fbAtE​lThyqqSUh76MQPISbtBVXhu3Z​iJ1PEXPX6yznfOec7517bRD1f​abWaGVWIlquunc8klZOnFpSeT​YrSs9RLA9Sr6U4tkcvNEi7BFf​fO6+EdigjL7ZHu/k72I796i9z​RiSJPwG4VHX0Z+AxRzNRrtksU​vwf7+Gm3BtzzHPDTNgQCqwKXf​ZwSeNHHJz1OIT8JjtAq6xWtCL​wGPLzYZi+3YV8DGMiT4VVuG7o​iZpGzrZJhcs/hL49xtzH/Dy6b​dfTsXYNY+5yluWO4D4neK/ZUv​ok/17X0HPBLsF+vuUlhfwX4j/​rSfAJ4H1H0qZJ9dN7nR19frRT​eBt4Fe9FwpwtN+2p1MXscGLHR​9SXrmMgjONd1ZxKzpBeA71b4t​Nhj6JGoyFNp4GHgwUp9qplfmn​FW5oTdy7NamcwCI49kv6fN5IA​HgD+0rbyoBc3SOjczohbyS1dr​bq6pQdqumllRC/0ymTtej8gpb​buVwpQfyw66dqEZyxZKxtHpJn​+tZnpnEdrYBbueF9qQn93S7HQ​GGHnYP7w6L+YGHNtd1FJitqPA​R+hERCNOFi1i1alKO6RQnjKUx​L1GNjwlMsiEhcPLYTEiT9ISbN​15OY/jx4SMshe9LaJRpTvHr3C​/ybFYP1PZAfwfYrPsMBtnE6Sw​N9ib7AhLwTrBDgUKcm06FSrTf​Sj187xPdVQWOk5Q8vxAfSiIUc​7Z7xr6zY/+hpqwSyv0I0/QMTR​b7RMgBxNodTfSPqdraz/sDjzK​Brv4zu2+a2t0/HHzjd2Lbcc2s​G7GtsL42K+xLfxtUgI7YHqKlq​HK8HbCCXgjHT1cAdMlDetv4Fn​Q2lLasaOl6vmB0CMmwT/IPszS​ueHQqv6i/qluqF+oF9TfO2qEG​TumJH0qfSv9KH0nfS/9TIp0Wb​oi/SRdlb6RLgU5u++9nyXYe69​fYRPdil1o1WufNSdTTsp75Bfl​lPy8/LI8G7AUuV8ek6fkvfDsC​fbNDP0dvRh0CrNqTbV7LfEEGD​QPJQadBtfGVMWEq3QWWdufk6Z​SNsjG2PQjp3ZcnOWWing6noon​SInvi0/Ex+IzAreevPhe+Cawp​gP1/pMTMDo64G0sTCXIM+KdOn​FWRfQKdJvQzV1+Bt8OokmrdtY​2yhVX2a+qrykJfMq4Ml3VR4cV​zTQVz+UoNne4vcKLoyS+gyKO6​EHe+75Fdt0Mbe5bRIf/wjvrVm​hbqBN97RD1vxrahvBOfOYzoos​H9bq94uejSOQGkVM6sN/7HelL​4t10t9F4gPdVzydEOx83Gv+uN​xo7XyL/FtFl8z9ZAHF4bBsrEw​AAAC1JREFUCNc1xzESABAMAMF​zUfn/L5EZpSoq2y33jrIykNmw​lsgS2fGbHUmREzyxuA54W8GDm​wAAAABJRU5ErkJggg==";​10)

7

CloseDrawing()

EXAMPLE_02
EXAMPLE_03
1

OpenDrawing(220;​220)

2

ChartData(13 8 15 5 16 9 6 15)

3

RadarChart()

4

RadarChartOptions(1;​poly)

5

FillStyle(1;​255 0 0 20)

6

BorderStyle(1;​poly;​1.5;​darkRed)

7

AxisLine(all;​0) /* Hide axis lines. */

8

AxisMajorTicks(all;​0) /* Hide tick marks. */

9

MajorGridLineColors(all;​all;​210 210 210)

10

/* ChartBackgroundPict(xy;resource;38) Deprecated. */

11

/* Instead, use the function below. */

12

ChartBackground(xy;​2 0.5 0.5 0.0 255 255 255 255 1.0 181 226 167 255;​;​0)

13

CloseDrawing()

EXAMPLE_03
Scroll to Top