按下按钮时在对话框中显示图表

问题描述 投票:-2回答:1

我的目标是启动弹出窗口或对话框或消息框,无论弹出什么并且能够包含图形。 Dialog正在运行,但图表数据不会出现在sapui5中

sapui5
1个回答
1
投票

使用SAPUI5JSView创建对话框和径向图表,由按钮按下事件触发,您可以在这里查看完整的应用程序SAPUI5 Dialog

openDialog: function() {
  if (!this.draggableDialog) {
    this.draggableDialog = new Dialog({
      title: "Charts",
      type: "Message",
      contentWidth: "900px",
      contentHeight: "700px",
      resizable: true,
      content: [
        new RadialMicroChart({
          percentage: 75,
          total: 100,
          size: "Responsive",
          valueColor: "Critical"
        })
      ],

      beginButton: new Button({
        text: "Close",
        press: function() {
          this.draggableDialog.close();
        }.bind(this)
      })
    });
    this.getView().addDependent(this.draggableDialog);
  }
  this.draggableDialog.open();

}
© www.soinside.com 2019 - 2024. All rights reserved.