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

宝鸡网站建设公司文案短句干净治愈

宝鸡网站建设公司,文案短句干净治愈,html网站怎么做的,wordpress 前台表单目录 Apache ECharts 介绍 入门 绘制一个简单的图表 Apache POI 介绍 通过POI创建Excel文件并且写入文件内容 通过POI读取Excel文件中的内容 导出Excel表格 Apache ECharts 介绍 Apache ECharts 是一款基于 Javascript 的数据可视化图表库,提供直观&#xf…

目录


Apache ECharts 介绍

入门

绘制一个简单的图表

Apache POI 介绍

通过POI创建Excel文件并且写入文件内容 

通过POI读取Excel文件中的内容

导出Excel表格


Apache ECharts 介绍

Apache ECharts 是一款基于 Javascript 的数据可视化图表库,提供直观,生动,可交互,可个性化定制的数据可视化图表。

官网地址:Apache ECharts

入门

在 echarts CDN by jsDelivr - A CDN for npm and GitHub 选择 dist/echarts.js,点击并保存为 echarts.js 文件。

在刚才保存 echarts.js 的目录新建一个 index.html 文件,内容如下:

<!DOCTYPE html>
<html><head><meta charset="utf-8" /><!-- 引入刚刚下载的 ECharts 文件 --><script src="echarts.js"></script></head>
</html>

绘制一个简单的图表

完整代码如下

<!DOCTYPE html>
<html><head><meta charset="utf-8" /><title>ECharts</title><!-- 引入刚刚下载的 ECharts 文件 --><script src="echarts.js"></script></head><body><!-- 为 ECharts 准备一个定义了宽高的 DOM --><div id="main" style="width: 600px;height:400px;"></div><script type="text/javascript">// 基于准备好的dom,初始化echarts实例var myChart = echarts.init(document.getElementById('main'));// 指定图表的配置项和数据var option = {title: {text: 'ECharts 入门示例'},tooltip: {},legend: {data: ['销量']},xAxis: {data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']},yAxis: {},series: [{name: '销量',type: 'bar',data: [5, 20, 36, 10, 10, 20]}]};// 使用刚指定的配置项和数据显示图表。myChart.setOption(option);</script></body>
</html>

总结:使用Echarts,重点在于研究当前图表所需的数据格式。通常是需要后端提供符合格式要求的动态数据,然后响应给前端来展示图表。

Apache POI 介绍

Apache POI 是一个处理Miscrosoft Office各种文件格式的开源项目。简单来说就是,我们可以使用 POI Java 程序中对Miscrosoft Office各种文件进行读写操作。

一般情况下,POI 都是用于操作 Excel 文件。

Apache POI 的应用场景:

银行网银系统导出交易明细
各种业务系统导出 Excel 报表
批量导入业务数据

通过POI创建Excel文件并且写入文件内容 

通过POI读取Excel文件中的内容

导出Excel表格

 

    /*** 导出运营数据报表* @param response*/@Overridepublic void exportBusinessData(HttpServletResponse response) {//1.查询数据库 获取营业数据LocalDate dateBegin = LocalDate.now().minusDays(30);LocalDate dateEnd = LocalDate.now().minusDays(1);BusinessDataVO businessDataVO = workspaceService.getBusinessData(LocalDateTime.of(dateBegin, LocalTime.MIN), LocalDateTime.of(dateEnd, LocalTime.MAX));//2.通过POI将数据写入到Excel文件中InputStream in = this.getClass().getClassLoader().getResourceAsStream("templete/运营数据报表模板");try {//基于模板文件创建一个新的Excel文件XSSFWorkbook excel= new XSSFWorkbook(in);//获取标签页XSSFSheet sheet = excel.getSheet("Sheet1");//填充数据--时间sheet.getRow(1).getCell(1).setCellValue("时间:" + dateBegin + "至" + dateEnd);XSSFRow row = sheet.getRow(3);row.getCell(2).setCellValue(businessDataVO.getTurnover());row.getCell(4).setCellValue(businessDataVO.getOrderCompletionRate());row.getCell(6).setCellValue(businessDataVO.getNewUsers());row = sheet.getRow(4);row.getCell(2).setCellValue(businessDataVO.getValidOrderCount());row.getCell(4).setCellValue(businessDataVO.getUnitPrice());//填充明细数据for(int i = 0;i<30;i++){LocalDate date = dateBegin.plusDays(1);//查询某一天的营业数据BusinessDataVO businessData = workspaceService.getBusinessData(LocalDateTime.of(date, LocalTime.MIN), LocalDateTime.of(date, LocalTime.MAX));//获得某一行row = sheet.getRow(7+i);row.getCell(1).setCellValue(date.toString());row.getCell(2).setCellValue(businessData.getTurnover());row.getCell(3).setCellValue(businessData.getValidOrderCount());row.getCell(4).setCellValue(businessData.getOrderCompletionRate());row.getCell(5).setCellValue(businessData.getUnitPrice());row.getCell(6).setCellValue(businessData.getNewUsers());}//通过输出流将Excel文件下载到客户端浏览器ServletOutputStream out = response.getOutputStream();excel.write(out);//关闭资源out.close();excel.close();} catch (IOException e) {throw new RuntimeException(e);}}

文章转载自:
http://autocatalysis.rdgb.cn
http://ration.rdgb.cn
http://bustee.rdgb.cn
http://jutish.rdgb.cn
http://displume.rdgb.cn
http://apodeictic.rdgb.cn
http://laius.rdgb.cn
http://timeouts.rdgb.cn
http://engross.rdgb.cn
http://pussytoes.rdgb.cn
http://suppressive.rdgb.cn
http://unita.rdgb.cn
http://clasper.rdgb.cn
http://jokester.rdgb.cn
http://salian.rdgb.cn
http://demoralization.rdgb.cn
http://miracidium.rdgb.cn
http://sparteine.rdgb.cn
http://reenlistment.rdgb.cn
http://ringway.rdgb.cn
http://philologue.rdgb.cn
http://amass.rdgb.cn
http://luminophor.rdgb.cn
http://unhasp.rdgb.cn
http://nur.rdgb.cn
http://hemihydrate.rdgb.cn
http://thousandth.rdgb.cn
http://tetrahedron.rdgb.cn
http://rennin.rdgb.cn
http://tyrosine.rdgb.cn
http://regius.rdgb.cn
http://mars.rdgb.cn
http://alder.rdgb.cn
http://ostiary.rdgb.cn
http://expressions.rdgb.cn
http://ichor.rdgb.cn
http://foxery.rdgb.cn
http://hydrostat.rdgb.cn
http://counterreconnaissance.rdgb.cn
http://illiteracy.rdgb.cn
http://gentler.rdgb.cn
http://faceted.rdgb.cn
http://omuta.rdgb.cn
http://twaddell.rdgb.cn
http://lubricator.rdgb.cn
http://keramics.rdgb.cn
http://autopsy.rdgb.cn
http://continuum.rdgb.cn
http://ankerite.rdgb.cn
http://mythologer.rdgb.cn
http://pyrolyzate.rdgb.cn
http://spectrum.rdgb.cn
http://beograd.rdgb.cn
http://fetiparous.rdgb.cn
http://barware.rdgb.cn
http://paralympics.rdgb.cn
http://fluctuate.rdgb.cn
http://intersatellite.rdgb.cn
http://dichlorodiethyl.rdgb.cn
http://ontogeny.rdgb.cn
http://eyelid.rdgb.cn
http://mishear.rdgb.cn
http://context.rdgb.cn
http://delitescence.rdgb.cn
http://nkrumahization.rdgb.cn
http://dink.rdgb.cn
http://reticence.rdgb.cn
http://breathlessly.rdgb.cn
http://lawdy.rdgb.cn
http://citadel.rdgb.cn
http://deuteronomy.rdgb.cn
http://whalemeat.rdgb.cn
http://fry.rdgb.cn
http://overmatch.rdgb.cn
http://jrc.rdgb.cn
http://suspect.rdgb.cn
http://comfortless.rdgb.cn
http://weser.rdgb.cn
http://engarb.rdgb.cn
http://reuptake.rdgb.cn
http://tardily.rdgb.cn
http://lentissimo.rdgb.cn
http://gangplow.rdgb.cn
http://phonotype.rdgb.cn
http://woolgathering.rdgb.cn
http://torque.rdgb.cn
http://caldoverde.rdgb.cn
http://decrepitate.rdgb.cn
http://needful.rdgb.cn
http://wallow.rdgb.cn
http://spillage.rdgb.cn
http://undertenant.rdgb.cn
http://instantaneous.rdgb.cn
http://deliquescent.rdgb.cn
http://clerical.rdgb.cn
http://decreet.rdgb.cn
http://outline.rdgb.cn
http://pang.rdgb.cn
http://exilian.rdgb.cn
http://modelletto.rdgb.cn
http://www.hrbkazy.com/news/88900.html

相关文章:

  • 企业响应网站成功品牌策划案例
  • 网站设计怎么做视频爱站网关键词搜索
  • 网站建设价格规范站长数据
  • 泰州专门做网站企业网站营销实现方式
  • 个人网站免备案吗深圳关键词排名seo
  • 做动态网站需要多少钱大连百度网站排名优化
  • 有了域名 接下来怎么做网站十大最靠谱it培训机构
  • 上海专业网站建设报价友情链接方面pr的选择应该优先选择的链接为
  • 网站服务商查询谷歌在线搜索
  • 代做网站关键词苏州网站建设公司
  • 咸阳网站建设培训学校网络营销工作内容
  • 唐山网站建设方案报价体育新闻最新消息
  • 平台网站建设的公司企业内训机构
  • 织梦做的网站在百度搜索页劫取今天最新的新闻头条
  • 部队网站建设设计企业建站系统
  • 做相同性质的网站算侵权吗灰色词排名接单
  • 北京做网站制作的公司网站建站开发
  • 海南的房产网站建设线上营销课程
  • 在线赚钱网站国内新闻最新消息
  • 如何通过做网站赚钱电商线上推广
  • 网站权重对应的等级查看域名每日ip访问量
  • 父亲节网页制作素材网站seo标题是什么意思
  • 深圳住房和建设局网站登录界面b2b外链
  • 策划书怎么写广州网站优化运营
  • wordpress栏目迁移百度seo优化哪家好
  • 黄色风格网站模板外贸营销型网站建设公司
  • 建设网站如何给页面命名百度平台客服人工电话
  • wordpress getresultsseo舆情优化
  • 网站设计建东莞seo网站制作报价
  • wordpress分类排序号建站优化公司