lfuente
lfuente

Reputation: 77

Coloured scatter-plots with javascript

I need a scatterplot like this: http://www.highcharts.com/demo/scatter but, instead of having one color for each serie (male and female, in the example), I need to select the color for each element. Following the example, each person would be coloured with a different level of gray, depending on their age.

As far as I know, Highcharts allow you to select the color of the elements, but it only affects the element pop-up information when you're using scatterplot.

Any other library to do scatterplots? Any way to do it with Highcharts?

Thanks!

Upvotes: 0

Views: 1842

Answers (2)

tonycoupland
tonycoupland

Reputation: 4247

I've used AMCharts in a few javascript projects, they include a scatter chart and are quick and very easy to implement.

They have a free version if you are happy with their name in the corner of your chart canvas.

To set the colour of a specific point you can set the color property of a GraphDataItem - as in this documentation http://www.amcharts.com/docs/v.2/javascript_reference/graphdataitem

Upvotes: 0

jbalsas
jbalsas

Reputation: 3502

You should be able to do this inside Hightcharts using the color property inside the data array.

You can see the documentation here, and there is also an example for this.

You could try preprocessing your data and transform it appending the color information to the array.

Upvotes: 5

Related Questions