Next
Update
Prev
Default

You can fill color in the bubble chart using the JavaScript function. To fill custom color in the bubble chart, you must set a JavaScript function name to the value of fillJsFunction attribute in the <Bubble2DSeries> or <Bubble3DSeries> element tags.

This sample bubble chart is to show how to define a JavaScript function to fill custom color in the bubble chart based on data values.

...
<Bubble3DChart ... >
'''
  <Bubble3DSeries ... fillJsFunction="fillJsFunc" >
    ...
  </Bubble3DSeries>
...
</Bubble3DChart>
...
					
function fillJsFunc(seriesId, index, data, values)
{
  if (values[1] > 2000)
    return "#FF3366";
  else if (values[1] > 1000)
    return "0xFFFF33";
  else
    return "0xFF9999";	
}

© 2017 KoolChart. All rights reserved.