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