当前位置: 首页 > wzjs >正文

贵州新站优化程序员自己做网站赚钱

贵州新站优化,程序员自己做网站赚钱,百度云 编辑wordpress,比较好的建站程序大家好,这次使用的是AntV的蚂蚁数据可视化X6框架,类似于审批流的场景等,代码如下: X6框架参考网址:https://x6.antv.vision/zh/examples/showcase/practices#bpmn 可以进入该网址,直接复制下方代码进行调试…

大家好,这次使用的是AntV的蚂蚁数据可视化X6框架,类似于审批流的场景等,代码如下:
X6框架参考网址:https://x6.antv.vision/zh/examples/showcase/practices#bpmn
可以进入该网址,直接复制下方代码进行调试或观察。
效果图如下:
在这里插入图片描述

<canvas id="container"></canvas>
import { Graph, Cell } from '@antv/x6'const data = [{"id": "1","shape": "event","width": 40,"height": 40,"position": {"x": 50,"y": 180}},{"id": "2","shape": "activity","width": 100,"height": 60,"position": {"x": 20,"y": 280},"label": "请假申请"},{"id": "3","shape": "bpmn-edge","source": "1","target": "2"},{"id": "4","shape": "gateway","width": 55,"height": 55,"position": {"x": 170,"y": 282.5}},{"id": "5","shape": "bpmn-edge","source": "2","target": "4"},{"id": "6","shape": "activity","width": 100,"height": 60,"position": {"x": 300,"y": 240},"label": "领导审批"},{"id": "7","shape": "activity","width": 100,"height": 60,"position": {"x": 300,"y": 320},"label": "人事审批"},{"id": "8","shape": "bpmn-edge","source": "4","target": "6"},{"id": "9","shape": "bpmn-edge","source": "4","target": "7"},{"id": "10","shape": "gateway","width": 55,"height": 55,"position": {"x": 460,"y": 282.5}},{"id": "11","shape": "bpmn-edge","source": "6","target": "10"},{"id": "12","shape": "bpmn-edge","source": "7","target": "10"},{"id": "13","shape": "activity","width": 100,"height": 60,"position": {"x": 560,"y": 280},"label": "人事审批"},{"id": "14","shape": "bpmn-edge","source": "10","target": "13"},{"id": "15","shape": "event","width": 40,"height": 40,"position": {"x": 710,"y": 290},"attrs": {"body": {"strokeWidth": 4}}},{"id": "16","shape": "bpmn-edge","source": "13","target": "15"}
]
// 设置event类型节点的样式(起点和终点的样式)
Graph.registerNode('event',{inherit: 'circle',attrs: {body: {strokeWidth: 2,stroke: '#5F95FF',fill: '#FFF',},},},true,
)
// 设置activity类型节点的样式
Graph.registerNode('activity',{inherit: 'rect',markup: [{tagName: 'rect',selector: 'body',},{tagName: 'image',selector: 'img',},{tagName: 'text',selector: 'label',},],attrs: {body: {rx: 6,ry: 6,stroke: '#5F95FF',fill: '#EFF4FF',strokeWidth: 1,},img: {x: 6,y: 6,width: 16,height: 16,'xlink:href':'https://gw.alipayobjects.com/mdn/rms_43231b/afts/img/A*pwLpRr7QPGwAAAAAAAAAAAAAARQnAQ',},label: {fontSize: 12,fill: '#262626',},},},true,
)
// 设置gateway类型节点的样式
Graph.registerNode('gateway',{inherit: 'polygon',attrs: {body: {refPoints: '0,10 10,0 20,10 10,20',strokeWidth: 2,stroke: '#5F95FF',fill: '#EFF4FF',},label: {text: '+',fontSize: 40,fill: '#5F95FF',},},},true,
)
// 设置bpmn-edge类型线段的样式
Graph.registerEdge('bpmn-edge',{inherit: 'edge',attrs: {line: {stroke: '#A2B1C3',strokeWidth: 2,},},},true,
)
// 设置展示canvas图表的容器
const graph = new Graph({container: document.getElementById('container')!,connecting: {router: 'orth',},
})// 处理一下数据的格式,开始渲染图表
const cells = []
data.forEach((item: any) => {if (item.shape === 'bpmn-edge') {cells.push(graph.createEdge(item))} else {cells.push(graph.createNode(item))}
})
graph.resetCells(cells)
graph.zoomToFit({ padding: 10, maxScale: 1 })

最后,原创不易,如本文对您有所帮助,麻烦点个赞收藏谢谢!

http://www.dtcms.com/wzjs/592832.html

相关文章:

  • 做网站还能挣钱吗wordpress创建数据表
  • 成都企业网站维护北京设计院
  • 云南工贸网站建设Wordpress文章页面小工具
  • 做公司网站建设价格低虚拟机网站建设
  • 网站内容更新制作芝士需要哪些设备
  • 国外创意网站欣赏快乐十分网站开发
  • 直接进网站的浏览器wordpress 果酱小程序
  • 商家网站建设模板股票查询网站模板 wordpress
  • 网站建设 赚钱吗适合高中生做网站的主题
  • 建设论坛网站自学注册人力资源公司大概要多少钱
  • wordpress网站全过程长沙专业外贸网站建设
  • 怎么做购物微信网站wordpress 多语言插件哪个好
  • 优化网站 提高查询门户网站 解决方案
  • 网站获取信息wordpress撰写设置
  • vue做购物网站黄冈商城网站制作哪家好
  • 济南网站建设用途沈阳旅游团购网站建设
  • 建设工程网站广州网站代运营 如何纳税
  • 北京南站停车场收费标准wordpress好用的地图
  • 重庆网站优化公司哪家便宜微信商城后台管理系统
  • 哪里有做桥梁模型的网站开什么工作室最赚钱
  • 茂名免费做网站绍兴网站定制公司
  • 建设自己的网站首页wordpress nginx 500错误
  • 在哪可以接企业网站建设的活h5响应式音乐网站模板
  • 怎么说服企业做网站临沂seo代理商
  • 设计公司网站什么重要找网站做外链是什么意思
  • 阜新网站优化哪个网站建设最好
  • 专门做外国的网站吗开发网站公司排行
  • 大连网站建设那家好设计网页的目的
  • 做外贸仿牌网站深圳市福田区公司
  • 报电子商务(网站建设与运营)广西南宁生活网