-
大小: 12.66MB文件類型: .rar金幣: 1下載: 0 次發布日期: 2023-07-26
- 語言: JavaScript
- 標簽: 圖表??3D圖表??Highcharts??
資源簡介
用javascript編寫的各類圖表,包含3D特效圖表,非常精致。
代碼片段和文件信息
/**
?*?@license?Highcharts?JS?v2.3.3?(2012-11-02)
?*
?*?(c)?20012-2014
?*
?*?Author:?Gert?Vaartjes
?*
?*?License:?www.highcharts.com/license
?*/
package?com.highcharts.export.converter;
import?java.io.File;
import?java.io.IOException;
import?java.net.SocketTimeoutException;
import?java.util.HashMap;
import?java.util.Map;
import?java.util.NoSuchElementException;
import?java.util.concurrent.TimeoutException;
import?org.apache.commons.io.FileUtils;
import?org.apache.log4j.Logger;
import?org.springframework.beans.factory.annotation.Autowired;
import?org.springframework.stereotype.Service;
import?com.google.gson.Gson;
import?com.highcharts.export.pool.PoolException;
import?com.highcharts.export.pool.BlockingQueuePool;
import?com.highcharts.export.server.Server;
import?com.highcharts.export.util.MimeType;
@Service(“svgConverter“)
public?class?SVGConverter?{
@Autowired
private?BlockingQueuePool?serverPool;
protected?static?Logger?logger?=?Logger.getLogger(“converter“);
private?static?final?String?SVG_DOCTYPE?=?“l?version=\“1.0\“?standalone=\“no\“?>“;
public?String?convert(String?input?MimeType?mime
String?constructor?String?callback?String?globalOptions?Float?width?Float?scale?String?filename)?throws?SVGConverterException?PoolException?NoSuchElementException?TimeoutException?{
return?this.convert(input?globalOptions?null?null?mime?constructor?callback?width?scale?filename);
}
public?String?convert(String?input?String?globalOptions?String?dataOptions?String?customCode?MimeType?mime
String?constructor?String?callback?Float?width?Float?scale?String?filename)?throws?SVGConverterException?PoolException?NoSuchElementException?TimeoutException?{
Map?params?=?new?HashMap();
Gson?gson?=?new?Gson();
if?(filename?!=?null)?{
params.put(“outfile“?filename);
}?else?{
params.put(“type“?mime.name().toLowerCase());
}
params.put(“infile“?input);
if?(constructor?!=?null?&&?!constructor.isEmpty())?{
params.put(“constr“?constructor);
}
if?(callback?!=?null?&&?!callback.isEmpty())?{
params.put(“callback“?callback);
}
if?(globalOptions?!=?null?&&?!globalOptions.isEmpty())?{
params.put(“globaloptions“?globalOptions);
}
if?(dataOptions?!=?null?&&?!dataOptions.isEmpty())?{
params.put(“dataoptions“?dataOptions);
}
if?(customCode?!=?null?&&?!customCode.isEmpty())?{
params.put(“customcode“?customCode);
}
if?(width?!=?null)?{
params.put(“width“?String.valueOf(width));
}
if?(scale?!=?null)?{
params.put(“scale“?String.valueOf(scale));
}
//?parameters?to?JSON
String?json?=?gson.toJson(params);
//?send?to?phantomJs
String?output?=?““;
output?=?requestServer(json);
//?check?first?for?errors
if?(output.length()?>?5?&&?output.substring(05).equalsIgnoreCase(“error“
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????.......??????2290??2014-09-02?11:24??Highcharts\examples\3d-column-interactive\index.htm
????.......??????1483??2014-09-02?11:24??Highcharts\examples\3d-column-null-values\index.htm
????.......??????2133??2014-09-02?11:24??Highcharts\examples\3d-column-stacking-grouping\index.htm
????.......??????1787??2014-09-02?11:24??Highcharts\examples\3d-pie\index.htm
????.......??????1488??2014-09-02?11:24??Highcharts\examples\3d-pie-donut\index.htm
????.......??????4707??2014-09-02?11:24??Highcharts\examples\3d-scatter-draggable\index.htm
????.......??????3170??2014-09-02?11:24??Highcharts\examples\area-basic\index.htm
????.......??????2097??2014-09-02?11:24??Highcharts\examples\area-inverted\index.htm
????.......??????2207??2014-09-02?11:24??Highcharts\examples\area-missing\index.htm
????.......??????1159??2014-09-02?11:24??Highcharts\examples\area-negative\index.htm
????.......??????2180??2014-09-02?11:24??Highcharts\examples\area-stacked\index.htm
????.......??????2171??2014-09-02?11:24??Highcharts\examples\area-stacked-percent\index.htm
????.......??????1497??2014-09-02?11:24??Highcharts\examples\arearange\index.htm
????.......??????3999??2014-09-02?11:24??Highcharts\examples\arearange-line\index.htm
????.......??????2051??2014-09-02?11:24??Highcharts\examples\areaspline\index.htm
????.......??????2152??2014-09-02?11:24??Highcharts\examples\bar-basic\index.htm
????.......??????3047??2014-09-02?11:24??Highcharts\examples\bar-negative-stack\index.htm
????.......??????1394??2014-09-02?11:24??Highcharts\examples\bar-stacked\index.htm
????.......??????2477??2014-09-02?11:24??Highcharts\examples\box-plot\index.htm
????.......??????1374??2014-09-02?11:24??Highcharts\examples\bubble\index.htm
????.......??????2672??2014-09-02?11:24??Highcharts\examples\bubble-3d\index.htm
????.......??????2369??2014-09-02?11:24??Highcharts\examples\column-basic\index.htm
????.......??????5383??2014-09-02?11:24??Highcharts\examples\column-drilldown\index.htm
????.......??????1163??2014-09-02?11:24??Highcharts\examples\column-negative\index.htm
????.......??????1693??2014-09-02?11:24??Highcharts\examples\column-parsed\index.htm
????.......??????2462??2014-09-02?11:24??Highcharts\examples\column-placement\index.htm
????.......??????2646??2014-09-02?11:24??Highcharts\examples\column-rotated-labels\index.htm
????.......??????2456??2014-09-02?11:24??Highcharts\examples\column-stacked\index.htm
????.......??????1822??2014-09-02?11:24??Highcharts\examples\column-stacked-and-grouped\index.htm
????.......??????1515??2014-09-02?11:24??Highcharts\examples\column-stacked-percent\index.htm
............此處省略484個文件信息
- 上一篇:酒店預定管理系統項目源碼.rar
- 下一篇:全國全量省級邊界矢量數據
評論
共有 條評論