Draggable points on zk chart

asked 2020-08-25 01:43:28 +0800

bztom35 gravatar image bztom35
53 4

How can I set chart series(2) data points draggable?

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
link publish delete flag offensive edit


Thank for your quick response. I was able to turn on the correct series for draggable point. However, is there a way to enable/disable the draggable point features dynamically? I don't want it enable all the time. It gets in the way of normal chart interaction.

bztom35 ( 2020-08-26 02:53:50 +0800 )edit

answered 2020-08-26 02:59:33 +0800

bztom35 gravatar image bztom35
53 4

updated 2020-08-26 10:23:07 +0800

hawk gravatar image hawk
2655 1 5
http://hawkphoenix.blogsp... ZK Team

I tried to enabled/disabled draggable, but it didn't do anything.

chart.addEventListener(Events.ON_CTRL_KEY , new EventListener()  {

        public void onEvent(Event event) throws Exception {
            int keyCode = ((KeyEvent) event).getKeyCode();
            System.out.println("Key coded: " + keyCode);

            if (keyCode == 90){
                   System.out.println("Pressed Ctrl + z");
                   //enable drag and drop on Y axis.

            }else {
                  //disabl drag and drop on Y axis.


link publish delete flag offensive edit


Because zkchart doesn't support ctrlKeys attribute, you need to implement other event listeners e.g. onClick event for a button to enable drag&drop

hawk ( 2020-08-26 10:33:24 +0800 )edit

Thanks! I guess I will use the button method and hopefully, the ctrlkeys attribute will be added in future releases.

bztom35 ( 2020-08-26 13:55:07 +0800 )edit

answered 2020-08-26 14:16:29 +0800

bztom35 gravatar image bztom35
53 4

updated 2020-08-26 14:16:49 +0800

Is there away to capture/display the new dragged y-axis values?

For example, when I dragged the original y-value from 100 to 150. The chart shows the correct value visually, but when I clicked on the newly dragged value, it was still the old value(100).

|             *                   (150)
|************* ****************** (100)
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2020-08-25 01:43:28 +0800

Seen: 11 times

Last updated: Aug 26

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More