DASH回调功能似乎具有更多的输入

发布于 2025-02-12 02:41:21 字数 1088 浏览 1 评论 0原文

我正在执行IBM的数据Sci Cert,并且遇到了一个具有两个输入的DASH回调函数,但是该函数本身具有7个输入。怎么可能?该功能在下面发布。

@

app.callback( [Output(component_id='plot1', component_property='children'),
            Output(component_id='plot2', component_property='children'),
            Output(component_id='plot3', component_property='children'),
            Output(component_id='plot4', component_property='children'),
            Output(component_id='plot5', component_property='children')],
           [Input(component_id='input-type', component_property='value'),
            Input(component_id='input-year', component_property='value')],
           # REVIEW4: Holding output state till user enters all the form information. In this case, it will be chart type and year
           [State("plot1", 'children'), State("plot2", "children"),
            State("plot3", "children"), State("plot4", "children"),
            State("plot5", "children")`enter code here`
            ])

# Add computation to callback function and return graph
def get_graph(chart, year, children1, children2, c3, c4, c5):

I was doing IBM's data sci cert and I encountered a dash callback function that has two inputs, but the function itself has 7 inputs. How is this possible? The function is posted below.

@

app.callback( [Output(component_id='plot1', component_property='children'),
            Output(component_id='plot2', component_property='children'),
            Output(component_id='plot3', component_property='children'),
            Output(component_id='plot4', component_property='children'),
            Output(component_id='plot5', component_property='children')],
           [Input(component_id='input-type', component_property='value'),
            Input(component_id='input-year', component_property='value')],
           # REVIEW4: Holding output state till user enters all the form information. In this case, it will be chart type and year
           [State("plot1", 'children'), State("plot2", "children"),
            State("plot3", "children"), State("plot4", "children"),
            State("plot5", "children")`enter code here`
            ])

# Add computation to callback function and return graph
def get_graph(chart, year, children1, children2, c3, c4, c5):

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文