按下按钮时在对话框中显示图表 [英] Show chart in dialog box when a button is pressed

查看:42
本文介绍了按下按钮时在对话框中显示图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是启动一个弹出窗口或对话框或消息框,无论弹出并能够包含图形.对话框正在运行,但图表数据没有进入 sapui5

解决方案

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

openDialog: function() {如果(!this.draggableDialog){this.draggableDialog = 新对话框({title: "图表",类型:消息",内容宽度:900px",内容高度:700px",可调整大小:真实,内容: [新的径向微图表({百分比:75,总数:100,尺寸:响应式",valueColor:关键"})],开始按钮:新按钮({文字:关闭",按:函数(){this.draggableDialog.close();}.绑定(这个)})});this.getView().addDependent(this.draggableDialog);}this.draggableDialog.open();}

My Goal is to launch a popup or dialog or messagebox whatever pops up and is able to contain the graph. Dialog is working but chart data is not coming in sapui5

解决方案

Using SAPUI5's JSView to create the dialog and Radial Chart, triggered by button press event, you can have a look at the full application here 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();

}

这篇关于按下按钮时在对话框中显示图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆