0
我想捕獲畫布R圖形圖像並將該圖像保存到我自己的文件夾中。將畫布圖像保存到我自己的文件夾中
我使用下面的代碼繪製[R圖:
var drawXChartGraph = function() {
var line1 = new RGraph.Line({
id: 'cvs',
data: [
[15, 15, 15, 15, 15, 15, 15, 15, 15, 15]
],
options: {
linewidth: 1,
gutterLeft: 40,
backgroundGrid: false,
title: 'X-CHART',
colors: ['red'],
fillstyle: 'rgba(255,0,0,0.2)',
ymin: 0,
ymax: 16,
labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
scaleDecimals: 2,
key: ['UCL', 'LCL', 'XBar', 'AVG'],
keyPosition: 'gutter',
keyColorShape: 'circle',
keyColors: ['red', 'red', 'green', 'black'],
textSize: 10,
textAccessible: true
}
}).draw();
};
$(document).ready(function() {
drawXChartGraph();
});
請人幫我。 謝謝
是的,這是工作,但我無法將圖像保存到文件夾 –
你檢查了你正在寫入的文件夾的權限?你在服務器上使用什麼語言? –
這裏有一個例子:http://www.rgraph.net/canvas/docs/integration-with-server-side-scripting.html#image – Richard