I use ChartFX for JavaServer 7.0
I'm trying to add a new Command to the ToolBar, with a new image and setting to call a javascript. I'm following the documentation in the Programmers Guide. The line in bold/italic doesnt work. What is the correct syntax?
Thanks
cmds = chart1.getCommands();
cmds.add(new Command(20));
cmds.get(20).setImageIndex(1);
cmds.appendImage(new ImageIcon("/selfservice/images/left_arrow.jpg").getImage());
cmds.get(20).setStyle(CommandStyles.SMART_LIST);
cmds.get(20).setEnabled(true);
cmds.get(20).setChecked(true);
cmds.get(20).setScript("goBack");
cmds.get(20).setText("custom Cmd");