㈠ js 做3D的柱狀圖和餅狀圖的js庫有哪些求大神們介紹。只限制js庫,或者純javascript。謝謝~~
當然是highchart 好用 !!!!
㈡ 用jsp怎樣生成柱狀圖,餅狀圖,折線圖
jsp生成柱狀圖,餅狀圖,折線圖可以藉助於jfreechart。
1、柱狀圖的生成源碼:
/**
*生產柱狀圖
*@version1.0
*@since
*/
@SuppressWarnings("serial")
{
@Override
protectedvoidservice(HttpServletRequestrequest,
HttpServletResponseresponse)throwsServletException,IOException{
response.setContentType("text/html");
//使用普通數據集
=newDefaultCategoryDataset();
//增加測試數據,第一個參數是訪問量,最後一個是時間,中間是顯示用不考慮
chartDate.addValue(55,"訪問量","2010-01");
chartDate.addValue(65,"訪問量","2010-02");
chartDate.addValue(59,"訪問量","2010-03");
chartDate.addValue(156,"訪問量","2010-04");
chartDate.addValue(452,"訪問量","2010-05");
chartDate.addValue(359,"訪問量","2010-06");
try{
//從資料庫中獲得數據集
DefaultCategoryDatasetdata=chartDate;
//使用ChartFactory創建3D柱狀圖,不想使用3D,直接使用createBarChart
JFreeChartchart=ChartFactory.createBarChart3D(
"網站月訪問量統計",//圖表標題
"時間",//目錄軸的顯示標簽
"訪問量",//數值軸的顯示標簽
data,//數據集
PlotOrientation.VERTICAL,//圖表方向,此處為垂直方向
//PlotOrientation.HORIZONTAL,//圖表方向,此處為水平方向
true,//是否顯示圖例
true,//是否生成工具
false//是否生成URL鏈接
);
//設置整個圖片的背景色
chart.setBackgroundPaint(Color.PINK);
//設置圖片有邊框
chart.setBorderVisible(true);
Fontkfont=newFont("宋體",Font.PLAIN,12);//底部
FonttitleFont=newFont("宋體",Font.BOLD,25);//圖片標題
//圖片標題
chart.setTitle(newTextTitle(chart.getTitle().getText(),titleFont));
//底部
chart.getLegend().setItemFont(kfont);
//得到坐標設置字體解決亂碼
CategoryPlotcategoryplot=(CategoryPlot)chart.getPlot();
categoryplot.setDomainGridlinesVisible(true);
categoryplot.setRangeCrosshairVisible(true);
categoryplot.setRangeCrosshairPaint(Color.blue);
NumberAxisnumberaxis=(NumberAxis)categoryplot.getRangeAxis();
numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
BarRendererbarrenderer=(BarRenderer)categoryplot.getRenderer();
barrenderer.setBaseItemLabelFont(newFont("宋體",Font.PLAIN,12));
barrenderer.setSeriesItemLabelFont(1,newFont("宋體",Font.PLAIN,12));
CategoryAxisdomainAxis=categoryplot.getDomainAxis();
/*------設置X軸坐標上的文字-----------*/
domainAxis.setTickLabelFont(newFont("sans-serif",Font.PLAIN,11));
/*------設置X軸的標題文字------------*/
domainAxis.setLabelFont(newFont("宋體",Font.PLAIN,12));
/*------設置Y軸坐標上的文字-----------*/
numberaxis.setTickLabelFont(newFont("sans-serif",Font.PLAIN,12));
/*------設置Y軸的標題文字------------*/
numberaxis.setLabelFont(newFont("宋體",Font.PLAIN,12));
/*------這句代碼解決了底部漢字亂碼的問題-----------*/
chart.getLegend().setItemFont(newFont("宋體",Font.PLAIN,12));
//生成圖片並輸出
ChartUtilities.writeChartAsJPEG(response.getOutputStream(),1.0f,
chart,500,300,null);
}catch(Exceptione){
e.printStackTrace();
}
}
}
2、生成餅狀統計圖:
/**
*生成餅狀統計圖
*@version1.0
*@since
*/
@SuppressWarnings("serial")
{
protectedvoidservice(HttpServletRequestrequest,
HttpServletResponseresponse)throwsServletException,IOException{
response.setContentType("text/html");
//默認數據類型
DefaultPieDatasetdataType=newDefaultPieDataset();
//數據參數內容,數量
dataType.setValue("IE6",156);
dataType.setValue("IE7",230);
dataType.setValue("IE8",45);
dataType.setValue("火狐",640);
dataType.setValue("谷歌",245);
try{
DefaultPieDatasetdata=dataType;
//生成普通餅狀圖除掉3D即可
//生產3D餅狀圖
PiePlot3Dplot=newPiePlot3D(data);
JFreeChartchart=newJFreeChart(
"用戶使用的瀏覽器類型",//圖形標題
JFreeChart.DEFAULT_TITLE_FONT,//標題字體
plot,//圖標標題對象
true//是否顯示圖例
);
//設置整個圖片的背景色
chart.setBackgroundPaint(Color.PINK);
//設置圖片有邊框
chart.setBorderVisible(true);
//配置字體
Fontkfont=newFont("宋體",Font.PLAIN,12);//底部
FonttitleFont=newFont("宋體",Font.BOLD,25);//圖片標題
//圖片標題
chart.setTitle(newTextTitle(chart.getTitle().getText(),titleFont));
//底部
chart.getLegend().setItemFont(kfont);
ChartUtilities.writeChartAsJPEG(response.getOutputStream(),1.0f,
chart,500,300,null);
}catch(Exceptione){
e.printStackTrace();
}
}
}
3、柱狀分布統計圖:
/**
*柱狀分布統計圖
*@version1.0
*@since
*/
@SuppressWarnings("serial")
{
protectedvoidservice(HttpServletRequestrequest,
HttpServletResponseresponse)throwsServletException,IOException{
response.setContentType("text/html");
=newDefaultCategoryDataset();
//這是一組數據
dataTime.addValue(52,"0-6","2010-1-1");
dataTime.addValue(86,"6-12","2010-1-1");
dataTime.addValue(126,"12-18","2010-1-1");
dataTime.addValue(42,"18-24","2010-1-1");
//這是一組數據
dataTime.addValue(452,"0-6","2010-1-2");
dataTime.addValue(96,"6-12","2010-1-2");
dataTime.addValue(254,"12-18","2010-1-2");
dataTime.addValue(126,"18-24","2010-1-2");
//這是一組數據
dataTime.addValue(256,"0-6","2010-1-3");
dataTime.addValue(86,"6-12","2010-1-3");
dataTime.addValue(365,"12-18","2010-1-3");
dataTime.addValue(24,"18-24","2010-1-3");
try{
DefaultCategoryDatasetdata=dataTime;
//使用ChartFactory創建3D柱狀圖,不想使用3D,直接使用createBarChart
JFreeChartchart=ChartFactory.createBarChart3D(
"網站時間段訪問量統計",
"時間",
"訪問量",
data,
PlotOrientation.VERTICAL,
true,
false,
false
);
//設置整個圖片的背景色
chart.setBackgroundPaint(Color.PINK);
//設置圖片有邊框
chart.setBorderVisible(true);
Fontkfont=newFont("宋體",Font.PLAIN,12);//底部
FonttitleFont=newFont("宋體",Font.BOLD,25);//圖片標題
//圖片標題
chart.setTitle(newTextTitle(chart.getTitle().getText(),titleFont));
//底部
chart.getLegend().setItemFont(kfont);
//得到坐標設置字體解決亂碼
CategoryPlotcategoryplot=(CategoryPlot)chart.getPlot();
categoryplot.setDomainGridlinesVisible(true);
categoryplot.setRangeCrosshairVisible(true);
categoryplot.setRangeCrosshairPaint(Color.blue);
NumberAxisnumberaxis=(NumberAxis)categoryplot.getRangeAxis();
numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
BarRendererbarrenderer=(BarRenderer)categoryplot.getRenderer();
barrenderer.setBaseItemLabelFont(newFont("宋體",Font.PLAIN,12));
barrenderer.setSeriesItemLabelFont(1,newFont("宋體",Font.PLAIN,12));
CategoryAxisdomainAxis=categoryplot.getDomainAxis();
/*------設置X軸坐標上的文字-----------*/
domainAxis.setTickLabelFont(newFont("sans-serif",Font.PLAIN,11));
/*------設置X軸的標題文字------------*/
domainAxis.setLabelFont(newFont("宋體",Font.PLAIN,12));
/*------設置Y軸坐標上的文字-----------*/
numberaxis.setTickLabelFont(newFont("sans-serif",Font.PLAIN,12));
/*------設置Y軸的標題文字------------*/
numberaxis.setLabelFont(newFont("宋體",Font.PLAIN,12));
/*------這句代碼解決了底部漢字亂碼的問題-----------*/
chart.getLegend().setItemFont(newFont("宋體",Font.PLAIN,12));
ChartUtilities.writeChartAsJPEG(response.getOutputStream(),1.0f,
chart,500,300,null);
}catch(Exceptiones){
es.printStackTrace();
}
}
}
㈢ 【R語言】--- 餅狀圖
餅狀圖,又稱為餅圖,能夠劃分幾個扇形的圓形統計圖。可以描述量、頻率、佔比的相對關系。R語言中,可以用graphics包的pie()函數、ggplot2包的geom_bar()配合coord_polar()函數繪制,3D 的餅狀圖,可以使用 plotrix包的pie3D()函數。本文詳細介紹餅狀圖的繪制。
x: 數值向量,表示每個扇形的面積
labels: 字元型向量,表示各扇形面積標簽
edges: 多邊形的邊數(圓的輪廓類似很多邊的多邊形)
radius: 餅圖半徑
main: 餅圖標題
clockwise: 邏輯值,用來指示餅圖各個切片是否按順時針做出分割
angle: 設置底紋的斜率
density: 底紋的密度,默認值為 NULL
col: 是表示每個扇形的顏色,相當於調色板
[1] Robert I. Kabacoff (著). R語言實戰(高濤/肖楠/陳鋼 譯). 北京: 人民郵電出版社.
[2] https://www.runoob.com/r/r-pie-charts.html
[3] https://zhuanlan.hu.com/p/80415566
㈣ wps餅狀圖如何弄成立體的
1、首先,我們打開我們的電腦,然後我們打開wps,之後我們在wps中輸入如圖所示的數據;
㈤ chartlet控制項如何調整3D餅狀圖的厚度
JFreeChart chart = ChartFactory.createPieChart3D("Pie Chart 3D Demo 3",
dataset, true, true, false);
PiePlot3D plot = (PiePlot3D) chart.getPlot();
plot.setDepthFactor(0.055d); //餅圖的高度
把這個設置加上就行了
㈥ 請問下在網頁前端中怎樣實現直線圖和餅狀圖的效果具體顯示如下
這個是有插件的。可以研究一下水晶報表之類的控制項看看 或者JQUERY裡面也有這樣的功能
㈦ 如何使用illustrator製作立體餅狀圖
分區上色用實時上色工具
下面有光源
可以增加光源來增強白光的強度
描邊效果
㈧ wps怎麼做三維餅圖
以WPS的PPT文檔為例,製作三維餅圖的方法如下:
1、首先打開WPS的PPT窗口,進入後再點擊工具欄中的「插入」,如圖所示。
㈨ ppt如何做3d餅狀圖
做PPT圖表時,一般採用在Excel中創作好圖表後,在粘帖到PPT中,Excel和PPT中操作方法類似,(以ppt2013創作為例)點擊菜單欄中,依次點擊「插入」→「圖標」→「餅圖」→「3D餅圖」後點擊確定。
㈩ WPS表格製作圖表的問題,如何讓圖表擁有3D感。
您好,很高興為您解答!
你可以選定你需要展示的數據,「插入」——「圖表」試試,不過3D效果WPS現還不支持,後續會推出,歡迎關注後續版本信息,
如果您有論文排版、模版下載、論文遇到難題,可以訪問:http://docer.wps.cn/zt/lunwen?from=qyzd
更多WPS辦公軟體教程,請訪問:http://bbs.wps.cn,祝你使用愉快,謝謝
如有疑問,請點擊我的頭像提問。祝您生活愉快!