zoukankan      html  css  js  c++  java
  • Kendo UI diagram 更改connnect线颜色,及shapes的属性值

    1、改diagram中连线的颜色:redraw一下就OK

    // Change the Line Green
    diagram.connections[indexS].redraw({
    stroke:{
    color:"green"
    }
    });
    diagram.connections[indexD].redraw({
    stroke:{
    color:"green"
    }
    });

    2、更新diagram的dataSource

    // 获取diagram
    var
    diagram = $("#diagram").getKendoDiagram(); serverInfo[2].title = "Not OK"; serverInfo[2].image = "errorServer_48.png"; connStateInfo.ServerName = "123";
    // 清除原有的diagram,设置更新了的dataSource。connStateInfo 为原来的DataSource,上面的代码把里面的某些值改变了,但diagram不会自动的刷新 diagram.clear(); diagram.setDataSource(connStateInfo);
  • 相关阅读:
    PCA
    Less
    Node.js的运行
    跨域
    Jquery中的Ajax
    JSON
    Ajax应用查询员工信息
    xampp中localhost与DreamWaver站点设置问题
    PHP
    HTTP是什么
  • 原文地址:https://www.cnblogs.com/tx8899/p/3719784.html
Copyright © 2011-2022 走看看