Many data sets include color descriptions of an item, such as a shirt color. This plugin allows sales of 'red' items to be displayed with a red data point.
1. Create the scatter chart you'd like to put this logic in
2. In the widget editor screen, click the three bar menu at the top right, and then click 'Edit Script'.
3. Copy the contents of the script thats attached to this post, ScatterChart-CustomColors.js, into the widget editor screen.
4. Click save, then refresh the widget.
In this example, I used the hexadecimal color values om the break by. #000000 corresponds to the color black, so data in that group gets displayed as black. If you're unsure of what hexadecimal color value to use, you can use this resource: http://www.w3schools.com/tags/ref_colorpicker.asp
Using Text, Rather Than Hexadecimal Values
In addition to hexadecimal values, plain text color values can be used with this script. A full list of valid color values for this can be found here: http://www.w3schools.com/html/html_colornames.asp
In this example, you can see that the valid color values get displayed correctly. However, invalid color values, such as N\A and Silver/Black, are displayed as black.
Please sign in to leave a comment.