Reputation: 1109
I am having problems with locking on setSelection(). The correct value is being selected no problem, but the graph is not being locked afterward.
I have tried:
graph = new Dygraph(satgraph, data, { labels: [ "Score", "Percentage of people at this score"] });
.
.
.
graph.setSelection(intoStepSpace, { locked: [true] });
graph.setSelection(intoStepSpace, "", true);
graph.setSelection(intoStepSpace, null, true);
graph.setSelection(intoStepSpace, undefined, true);
and, just in case they want a highlightSeriesOpts instead of the name of a series:
graph.setSelection(intoStepSpace, { highlightSeriesOpts: [
{strokeWidth: 3},
{strokeBorderWidth: 1},
{highlightCircleSize: 5}]
}, true);}
These were all tried individually, not sequentially like the above code shows.
Likely, this is a problem with my not understanding optional parameters in JavaScript well enough, but after reading about this concept I think I have it right. Is it obvious to anyone what I am doing wrong? It's been a long time since I've used JavaScript for anything, and I'm happy to be using Dygraphs to get back into it.
Thank you very much for the help.
-Brian J. Stinar-
Upvotes: 1
Views: 654
Reputation: 1109
My super awesome programmer friend Jeremy Pepper mentioned two things to me:
1.) Locking appears to lock the selection to a specific series, not locking the entire graph.
2.)
graph.mouseMove_ = doNothing;
function doNothing()
{
}
Works. I don't know why this solution makes me feel dirty...
Upvotes: 1