Line color and function(obj)

Hi, i can’t use function(obj) in line color logic

i have series and i can’t use function(obj) in the color attribute for line:
it’s - undefined value

student.addSeries({
view: “line”,
value:“#student_id#”,
line: {
color: function(obj){
var m = obj.student_id;
if (m==1) {
return “#FFFF00”;
} else {
return “#FF0000”;
}
},
width: 3
},
tooltip: {
template: “#student_id#”
}
});

Hi
Could you provide an image with expected result?
I will provide you correct color settings based on the picture