调用Dash Event将小部件链接在一起

时间:2018-07-21 02:44:42

标签: plotly plotly-dash

我目前正在使用Plotly的Dash库,并试图将仪表板组件的动作链接在一起。例如,我希望DateRangePicker启动回调函数,但仅作为事件。我已经尝试过通过此功能使用事件功能

   Scanner scnr = new Scanner(System.in);  
        Random rando = new Random();
        String name = "no";
        int cycles = 0;
        int value = 0;
        int match = 0;
        ArrayList<Team> teams = new ArrayList<Team>();
        Team newTeam = new Team(name,1);
        System.out.println("Welcome to the Advanced Sportsball Tracker!");

        while (!name.equals("x")) // looping print statement
        { // x loop begins
            System.out.println("Which team just won? (x to exit)");
            match = 0;
            cycles++;
            name = scnr.next();
            for (Team list : teams)
            {
                if (list.getName().equals(name)) // compares the name of the team to the input value
                    {
                        match++;
                    }
            }
            if (match == 0)
            {
                teams.add(newTeam);
            }

        }// x loop ends
        System.out.print(newTeam.getName());
        if (cycles == 1) // prints no data if user immediately exits
        {
            System.out.println("No data input");
        }
        if (cycles > 1) 
        {
        System.out.println("Final Tally: "); //  loop to print final Talley
        for (Team list : teams) // FIXME
        {
            list.toString(list.getName(),list.getWinCount());  // makes a string out of the string and wincount of the team
        }

但该事件似乎未触发回调。

0 个答案:

没有答案