View Full Version : Scatter Plot, Highlight Certain Points According to Flag in Data

30 Jan 2013, 4:44 PM
Hi all,

I want to figure out a way to highlight certain points in my scatter plot. I've spent some time looking into it but have found no easy way. If I was plotting data that looked like this:

numberOne: 50, numberTwo:45, highlight:0
numberOne: 65, numberTwo:30, highlight:0
numberOne: 35, numberTwo:50, highlight:1
numberOne: 25, numberTwo:45, highlight:1
numberOne: 60, numberTwo:75, highlight:0

So the points representing the third and fourth row above would show up as a different shape or color or size. Does anyone have any insight on this?

thank you!

1 Feb 2013, 11:33 AM
All markers and the entire line in each series are going to be the same.

5 Feb 2013, 11:28 AM
Thanks for the reply!

Would there be a way to break up a store into two different series depending on some flag variable in the store. Like having each series represent different rows of data from the same store. I know you cant have more than one store associated with a chart

6 Feb 2013, 5:50 PM
I figured out a way to color the markers differently according to a flag in the data. I used a renderer in the series, here is the code:

renderer:function(sprite, record, attr, index){
var highlight = record.get('highlight');
var color = null;
if (highlight == 1) {
color = "#1BE01B";
color = "#E81717";
return Ext.apply(attr, { fill: color });