-
Notifications
You must be signed in to change notification settings - Fork 77
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
Charts 11.7 - Customization #74
Comments
Ok just to get it right, you would like to define your own mouse event handler? So I could add something like onMousePressed(), onMouseReleased(), onMouseMoved() to the chart. For the text on the chartitems I could add a method to define a formatString e.g. "%.0f%%" for percentage or whatever you like but it will only format the value. Would that help? The text size might be more problematic but I will take a look at it. |
- showPopup(true/false) - setFormatString(String) - setSelectedItemFill(Color) - Added individual handlers for MousePressed, MouseReleased and MouseMoved - Added method to getSelectedItem by MouseEvent
I've implemented parts of your request with commit 05c0052 in the jdk17 branch. Mouse entered is not that easy because the Canvas is just one node. Instead I've added MouseMoved and a method that returns the selected item for a given MouseEvent. Please check the CoxcombChartTest in the jdk17 branch, there I've added the new features with an example. |
Hello, thanks for the quick response and already done work. But yeah, to clarify I dont know whether als this is possible /just too much work and i was wondering if you just tested in on the jdk17 branch or if you´d copy it on the jdk11 branch if everything is set and done. |
Hi there, so I've added more stuff related to your request.
I've started to add the text thing you mentioned to the canvas but removed it again because it does not make sense. it is too specific. I suggest you add another layout container e.g. a VBox with 3 Labels, make it mouseTransparent(true) and add it on top of the chart using a StackPane. I've added this also to the CoxcombChartTest in the jdk17 branch so you can see how that works. This gives you the ability to overlay whatever you want without making the CoxcombChart getting features that are useful to you but maybe not for everyone :) |
Hi there :) I´ve looked at your commits and i love it, its exactly what i want/need! Would appreciate it, if you release it on jdk11. Btw, for all the work i was causing: is there any way to paypal a beer/coffee to you? |
Ok so I've backported the code to the main branch and released v11.11, might take some time to show up on Maven central. And there is also 17.1.7 which contains the same changes in the jdk17 branch. Both jars are also available via the github releases. Glad it works for you :) |
Hello :)
I rellay like the CoxCombChart, but i see no way of customizing it (or am i wrong?!).
Basically i´d like to change the MouseEvent from MOUSE_PRESSED to MOUSE_ENTERED.
I´d also like to add something to the "...%" text on the ChartItems and change the size and text
on the canvas showing after the MOUSE_PRESSED-Event.
The text was updated successfully, but these errors were encountered: