-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance feature setLegendElemsState with element type and value selectivity #110
Comments
I think there are two different side for this: First: regarding setLegendElemsState setLegendElemsState = "show" // will show all legend element (current behavior)
// OR
setLegendElemsState = {
"areaLegend": "show", // will show all element in areaLegend
"plotLegend": "hide", // will hide all element in plotLegend
"myLegendClassName": "hide", // will hide all element in myLegendClassName
...
}, The user pass the CSS class name of the legend it want to show/hide. Now, with this out of the way... {
'plot' : {'min': 1000, 'max': 1200},
'area' : {'min': 10, 'max': 20}
} |
Hello, Thank for your study on this new feature. I agree with you on all the things. However, as in this example : http://jsfiddle.net/neveldo/xd2azoxL/, the elements can be tied to more than one value :
This is why the 'showElementsInRange' option should also accept an object of the form :
Or maybe :
In order to tell which value we want to filter ? |
I performed a PR for the first part (the easiest, actually ^^). You are right, I forgot the multiple values. {
'plot' : {
0 : { // valueIndex
'min': 1000,
'max': 1200
},
1 : { // valueIndex
'min': 10,
'max': 12
}
},
'area' : {
{'min': 10, 'max': 20} // No valueIndex, only an object, use 0 as valueIndex (easy case)
}
} |
Thank you, I saw it, nice work ! I just added some little comments. |
This issue can be closed! 😎 |
You are right, thank you for all your great work ! |
Enhance feature setLegendElemsState: be able to tell which kind of elements we want to hide or show : 'areas', 'plots' or 'links', and for which interval of values (if the elements are associated to one or more value(s), it has to be compatible with multiple valued elements). For example : "I want to show only the plots which the associated value is between 1000 and 1200) :
It would allow to play with some sliders in order to allow users to select ranges of values for which we want to show the elements.
The text was updated successfully, but these errors were encountered: