Difference between revisions of "Highlight curve via slider"
From JSXGraph Wiki
Jump to navigationJump to searchA WASSERMANN (talk | contribs) |
A WASSERMANN (talk | contribs) |
||
Line 5: | Line 5: | ||
var g = board.createElement('functiongraph', [function(x){ return x*x;}], | var g = board.createElement('functiongraph', [function(x){ return x*x;}], | ||
{ | { | ||
− | strokeColor:function(){ return (s.Value()<0.5)?'red':'blue';} | + | strokeColor:function(){ return (s.Value()<0.5)?'red':'blue';}, |
+ | strokeWidth:function(){ return (s.Value()>=0.5)?3:1;}, | ||
}); | }); | ||
var f = board.createElement('functiongraph', [function(x){ return x+1;}], | var f = board.createElement('functiongraph', [function(x){ return x+1;}], | ||
{ | { | ||
− | strokeColor:function(){ return (s.Value()>=0.5)?'red':'blue';} | + | strokeColor:function(){ return (s.Value()>=0.5)?'red':'blue';}, |
+ | strokeWidth:function(){ return (s.Value()>=0.5)?3:1;}, | ||
}); | }); | ||
</jsxgraph> | </jsxgraph> |