This sample is to set the fill color by using user-defined JavaScript function.

The JavaScript function returns a hexadecimal color code based on value.
You need to set the value of fillJsFunction to the name of the JavaScript function.
●Layout
<Bubble3DSeries yField="Profit" fillJsFunction="fillJsFunc"/>

●Script

Parameters:
seriesId: Series ID 
index: The index of the item in the series.
data: The record of the dataset declared for creating the chart.
values: The value is an array and each element in the array is different depending on the chart type.
	Bar2D(3D)Series      0: X-axis value, 1: Y-axis value
	Column2D(3D)Series   0: X-axis value, 1: Y-axis value
	Area2DSeries         0: X-axis value, 1: Y-axis value
	Bubble3DSeries       0: X-axis value, 1: Y-axis value 2: radius
	Line2DSeries         0: X-axis value, 1: Y-axis value
	Pie2D(3D)Series      0: value, 1: percentage, 2: nameField

function fillJsFunc(seriesId, index, data, values)
{
	if(values[2] > 2000)
		return "#FF3366";
	else if(values[2] > 1000)
		return "0xFFFF33";
	else
		return "0xFF9999";	
}