HighCharts导出图片和Pdf

本文介绍如何在使用HighCharts开发报表时,实现图形的图片和PDF导出功能。参考了dengsilinming的文章,并结合SpringMVC框架提供了实现代码示例,包括index.jsp、highCharts.jsp和CommonControl.java的相关内容。相关资源可在指定CSDN链接下载。
摘要由CSDN通过智能技术生成

        使用HighCharts开发报表图形,最后碰到了如何将图形以图片和Pdf的形式导出,从dengsilinming的文章中获得了启示,非常感谢网上的各位大神,

http://blog.csdn.net/dengsilinming/article/details/7352054

        因为工作的需要,工程使用了SpringMVC框架,以下发布index.jsp、highCharts.jsp和CommonControl.java的代码,所需要的jar包和配置文件可以从以下链接中下载。

http://download.csdn.net/detail/white_smile/6936623

index.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主页</title>
</head>
<body>
    <ul>
        <li><a href="highCharts.htm">HighCharts导出图片</a></li>
    </ul>
</body>
</html>

highCharts.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!
Back in 2003, when I wanted to implement charts for my home page, Flash-based charting solutions were totally dominating the market. I resented the idea of meeting my nontechnical readers with a prompt to install a browser plugin just to view my content, so I went looking for other solutions. There were server-side libraries that produced a static chart image, but they didn't provide any form of interactivity. So I built a chart based on an image created dynamically on the server, overlaid with tool tips created in JavaScript. This still runs on my website and has survived the coming of the touch age without modification. But I still had an idea of something simpler. By 2006 all major browsers had support for vector graphics through either SVG or VML, so this seemed the way to go. I started working on Highcharts on weekends and vacations, and released it in 2009. It was an instant success. Today, three years later, it has grown to become the preferred web charting engine by many, perhaps most, developers. Our bootstrapper company has nine persons working full time on developing, marketing, and selling Highcharts, and we have sold more than 22,000 licenses. Our clients include more than half of the 100 greatest companies in the world. I was thrilled when Packt Publishing contacted me for reviewing this book. I soon realized that the author, Joe Kuan, has a tight grip on Highcharts, jQuery, and general JavaScript. He also does what I love the most to see from Highcharts users—he bends, tweaks, and configures the library, and creates charts that surpass what we even thought possible with our tool. All done step by step in increasingly complex examples. I can't wait to recommend this book to our users. Torstein Hønsi CTO, Founder Highsoft Solutions
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值