学习unigui【24】Echart的使用:多个坐标系
1.unidbgrid的rowedit=true2.unigui的demo-\Demos\Desktop\DBAppDemo\SimpleDemo.dproj【11】3.unigui的session【1】4.unigui菜单【3】5.unigui的ini文件读写【6】6.unigui导出TMS.Flexcel【5】7.unigui+fastreport 打印【4】8.unigui显示uniTreeVview使用TUniTreeNode内存泄漏的问题【14】9.unigui显示websocket服务端向客户端发送信息【15】10.学习unigui【17】-数据集和JSON互相转换-DataSetConverter4D 开源项目11.学习unigui【18】unidbgrid的GridsGroupingSorting12.学习unigui【19】unidbgrid的Group By This Field汉化13.学习unigui【20】unistringGrid14.学习unigui【21】unistringGrid的标题栏动态增加15.学习unigui【22】unistringGrid的标题栏双击事件16.学习unigui【23】uniDBGrid的使用摘要17.学习unigui【25】关于图标
18.学习unigui【24】Echart的使用:多个坐标系
19.学习unigui【26】关于Unigui控件的个性化CSS框架20.学习unigui【27】像pg的jsonb一样编辑json。21.unigui的菜单树补习【2】treeview22.unigui的程序编译后自动运行傻傻的手动【7】23.unigui的ServerModule的重要属性【8】24.unigui的错误delphi clientHeight:property clientheight does not exist【10】25.学习unigui【28】UniGUI接收POST/GET使用echart非常简单,网上有介绍。
主要放一个unihtmlFrame。然后unihtmlframe.text := 'html的代码',就会渲染(初次调用echart的js库要一点稍后)。
unigui本身的chart貌似不能动态生成。
option = { title: [{ text: 'TOP10(抗菌药物使用人数)', top: '1%', left:'center', textStyle:{ // color:'#d1ecff', fontStyle:'normal', fontWeight:'600', fontFamily:'sans-serif', fontSize:13 } },{ text: "TOP10(使用率%)", top:'18.2%', left:'center', textStyle:{ //color:'#ccc', fontStyle:'normal', fontWeight:'600', fontFamily:'sans-serif', fontSize:13 } }, { text: "TOP10(抗菌药物并送检人数)", top:'36%', left:'center', textStyle:{ // color:'#ccc', fontStyle:'normal', fontWeight:'600', fontFamily:'sans-serif', fontSize:13 } }, { text: "TOP10(送检率)", top:'52%', left:'center', textStyle:{ // color:'#ccc', fontStyle:'normal', fontWeight:'600', fontFamily:'sans-serif', fontSize:13 } }, { text: "TOP10(抗菌药物未送检人数)", top:'70%', left:'center', textStyle:{ // color:'#ccc', fontStyle:'normal', fontWeight:'600', fontFamily:'sans-serif', fontSize:13 } }, { text: "TOP10(未送检率)", top:'86%', left:'center', textStyle:{ // color:'#ccc', fontStyle:'normal', fontWeight:'600', fontFamily:'sans-serif', fontSize:13 } }, ], legend: {}, tooltip: {}, dataset: { source: [ // ['product', '2012', '2013', '2014', '2019'], // ['Product A', 79.1, 66, 70.2, 155,99], // ['Product B', 50, 50, 50, 50,88], // ['Product c', 70, 50, 50, 50,77] ] }, xAxis: [ { type: 'category', gridIndex: 0,name: '科室',data: ['20121', '20131', '2014','2019','2020'] }, { type: 'category', gridIndex: 1,name: '科室',data: ['20122', '20132', '20142','2019','手术'] }, { type: 'category', gridIndex: 2,name: '科室',data: ['内科', '外科', '中医','心内科'] }, // 新增坐标轴,设置其所属网格为新添加的第三个网格 { type: 'category', gridIndex: 3,name: '科室',data: ['内科', '外科', '中医','心内科'] }, { type: 'category', gridIndex: 4,name: '科室',data: [] }, { type: 'category', gridIndex: 5,name: '科室',data: ['内科', '外科', '中医','心内科'] } ], yAxis: [ { gridIndex: 0,name:'' }, { gridIndex: 1,name:'' }, { gridIndex: 2,name:'' }, // 新增坐标轴,设置其所属网格为新添加的第三个网格 { gridIndex: 3,name:'' }, { gridIndex: 4,name:'' }, { gridIndex: 5,name:'' } ], grid: [ {id: 'grid-top-1', top: '5%', height: '10%',title : '报警、处理次数分析统计'}, {id: 'grid-top-2', top: '22%', height: '10%'}, {id: 'grid-top-3', top: '41%', height: '8%'}, {id: 'grid-bottom-1',bottom: '3%', height: '8%'}, {id: 'grid-bottom-2',bottom: '17%', height: '10%'}, {id: 'grid-bottom-3',bottom: '35%', height: '10%'} ], series: [ { label:{show:true,position:'top',formatter:function(data){return data.value+'人'}}, type: 'bar',seriesLayoutBy: 'row', xAxisIndex: 0, yAxisIndex: 0,data:[79.1, 66, 70.2, 155,99] }, { label:{show:true,position:'top',formatter:function(data){return data.value+'人'}}, type: 'bar', seriesLayoutBy: 'row', xAxisIndex: 2, yAxisIndex: 2, data:[50, 60, 90, 50,88] }, { label:{show:true,position:'top',formatter:function(data){return data.value+'%'}}, type: 'bar', seriesLayoutBy: 'row', xAxisIndex: 1, yAxisIndex: 1,data:[70, 50, 50, 50,77] }, // 新增系列 { label:{show:true,position:'top',formatter:function(data){return data.value+'%'}}, type: 'bar', seriesLayoutBy: 'row', xAxisIndex: 3, yAxisIndex: 3, data: [70, 50, 50, 50,77] }, { type: 'bar', seriesLayoutBy: 'row', xAxisIndex: 4, yAxisIndex: 4, data: [] }, { type: 'bar', seriesLayoutBy: 'row', xAxisIndex: 5, yAxisIndex: 5, data: [70, 50, 50, 50,77] }, ] };
需要更新数据的话,直接使用占位符替换。然后把代码赋值给uniHTMLFrame.text,立马渲染出来。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
2021-04-20 高格-一些特点话题【9】 绕人的含税价
2021-04-20 SQLServer中事务处理