Skip to content
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

Feature Request: add ID to X/YValueIndicator, X/YRangeIndicator #680

Open
wolfig opened this issue Dec 6, 2024 · 1 comment
Open

Feature Request: add ID to X/YValueIndicator, X/YRangeIndicator #680

wolfig opened this issue Dec 6, 2024 · 1 comment

Comments

@wolfig
Copy link

wolfig commented Dec 6, 2024

Current Version: 11.3.1

Current state:
Instance of X/YValueIndicator/RangeIndicator is added to the chart's plugins. (to my knowledge) there is no way to identify the individual instance of an indicator. Currently I can only filter the plugins using .filter(plugin -> plugin instanceof ). This will fail if there is more than one indicator with the same class.

Request:
Add a possibility to add an ID to the indicator instance with corresponding setters/getters to be able to filter for specific indicator instance by name (id)

@wirew0rm
Copy link
Member

wirew0rm commented Dec 6, 2024

Hey,

I think you are correct that this exact behavior is currently not implemented. What is implemented is that a ValueIndicator will set a css class for y-ValueIndicator, ValueIndicator and y-ValueIndicator-<n> where ' ' is a unique index. So if you just want them to e.g. have different colors, you could do that with what is currently implemented. (see {here and here for the implementation)

Also the X/YWatchValueIndicator (basically an indicator with a little flag displaying the value on top of the axis) extends the ValueIndicator and implements an ID which also gets applied to the css class, it shouldn't be to much change to pull these methods up into the base class to make this useful feature available to all the Indicator variants. I'd be happy to review and merge a PR that implements this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants