Revision history [back]

click to hide/show revision 1
initial version

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

bztom35 gravatar image bztom35

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

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

        @Override
        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.
                   chart.getSeries(2).getDragDrop().setDraggableY(true);

            }else {
                  //disabl drag and drop on Y axis.
               chart.getSeries(2).getDragDrop().setDraggableY(false);


            }

        } 
    });

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

chart.addEventListener(Events.ONCTRLKEY

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

{

        @Override
        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.
                   chart.getSeries(2).getDragDrop().setDraggableY(true);

            }else {
                  //disabl drag and drop on Y axis.
               chart.getSeries(2).getDragDrop().setDraggableY(false);


            }

        } 
    });
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More