| <!DOCTYPE html> |
| <html> |
| |
| <head> |
| <meta charset="utf-8"> |
| <title>ZingSoft Demo</title> |
| <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script> |
| <style> |
| .chart--container { |
| |
| width: 500px; |
| height: 350px; |
| } |
| |
| .zc-ref { |
| display: none; |
| } |
| </style> |
| </head> |
| |
| <body> |
| <div id="myChart" class="chart--container"><a class="zc-ref" href="https://www.zingchart.com/">Powered by ZingChart</a></div> |
| <script> |
| ZC.LICENSE = ["xxx", "xxx"]; |
| let colors = { |
| gray: '#EBEBEB', |
| grayDark: '#3F3F3F', |
| }; |
| |
| |
| let randomVal = (min, max, num) => { |
| let aData = []; |
| for (let i = 0; i < num; i++) { |
| let val = Math.random() * (max - min) + min; |
| aData.push(parseInt(val)); |
| } |
| return aData; |
| }; |
| |
| let chartConfig = { |
| type: 'area', |
| plot: { |
| tooltip: { |
| text: "%kl<br><span style='color:%color'>%t: </span>%v<br>", |
| backgroundColor: 'white', |
| bold: true, |
| borderColor: '#e3e3e3', |
| borderRadius: '5px', |
| fontColor: '#2f2f2f', |
| fontSize: '12px', |
| padding: '15px', |
| shadow: true, |
| shadowAlpha: 0.2, |
| shadowBlur: 5, |
| shadowColor: '#a1a1a1', |
| shadowDistance: 4, |
| textAlign: 'left', |
| visible: true, |
| }, |
| animation: { |
| delay: 400, |
| effect: 'ANIMATION_EXPAND_TOP', |
| method: 'ANIMATION_BOUNCE_EASE_OUT', |
| sequence: 'ANIMATION_NO_SEQUENCE', |
| speed: 500, |
| }, |
| aspect: 'spline', |
| }, |
| scaleX: { |
| guide: { |
| alpha: 1, |
| lineColor: colors.gray, |
| lineStyle: 'solid', |
| }, |
| item: { |
| color: colors.grayDark, |
| }, |
| lineColor: colors.gray, |
| lineWidth: '1px', |
| tick: { |
| lineColor: '#C7C7C7', |
| lineWidth: '1px', |
| }, |
| }, |
| scaleY: { |
| guide: { |
| alpha: 1, |
| lineColor: colors.gray, |
| lineStyle: 'solid', |
| }, |
| item: { |
| color: colors.grayDark, |
| }, |
| lineColor: colors.gray, |
| lineWidth: '1px', |
| step: 10, |
| tick: { |
| lineColor: '#C7C7C7', |
| lineWidth: '1px', |
| }, |
| }, |
| series: [{ |
| values: randomVal(22, 42, 10), |
| backgroundColor: '#80DEEA', |
| lineColor: '#80DEEA', |
| lineWidth: '2px', |
| marker: { |
| backgroundColor: '#80DEEA', |
| }, |
| }, |
| { |
| values: randomVal(7, 32, 10), |
| backgroundColor: '#69F0AE', |
| lineColor: '#69F0AE', |
| lineWidth: '2px', |
| marker: { |
| backgroundColor: '#69F0AE', |
| }, |
| }, |
| ], |
| }; |
| |
| zingchart.render({ |
| id: 'myChart', |
| data: chartConfig, |
| height: '100%', |
| width: '100%', |
| }); |
| </script> |
| </body> |
| |
| </html> |
- 效果图

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?