faheem801 / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Select plugin: color change #370

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes I need to change the color of the selection while it is being 
updated. It would be nice to add a public method to set the options like 
"color" of the selection after the instatiation of the "$.plot" object already 
happened. I added a public method myself and it works perfectly to change 
options of the selection on runtime. 

function setSelectionOptions(options) {
     var o = plot.getOptions();
     $.extend(o.selection,options);
}

Best regards,
Mitja

Original issue reported on code.google.com by mitjako...@gmail.com on 28 Jun 2010 at 12:23

GoogleCodeExporter commented 9 years ago
Hi!

I think you can do this already with something like 
plot.getOptions().selection.color = "#f00";. This was not documented, but I've 
added a note to API.txt and one in the top of the selection plugin code 
(selection support is now in a plugin). So I hope this takes care of it. Thanks 
for the suggestion!

Original comment by olau%iol...@gtempaccount.com on 14 Dec 2010 at 4:56