Yes you can integrate CanvasJS with csv google spreadsheet url.
Shawn,
This feature is not available yet.
Thanks for reporting. We will fix it in our upcoming release.
[update]
We have just released v1.9.6 Beta with Methods & Properties, which allows you to programmatically export chart as image, print chart, access internally calculated values, etc. Please refer to the release blog for more information.
Please check this jsfiddle
This feature is not available yet. We will consider to implement in our future version.
Thanks for reporting. This issue has been fixed and won’t be there in 1.8.0 GA. And please use this pastebin 1.8.0 Beta if you want to try new features. To use v1.7.0 please use this internal build.
We have tried your code and it is working fine with the latest version. We had this issue with the older version.
Here is a jsFiddle.
Looks like you have forgotten to update/save the fiddle before posting. Can you please create it again and send.
David,
I can confirm this is a bug. We will consider fixing this in upcoming version.
Thanks for reporting.
roryray,
We have tested the latest version with IE8 and it is working fine. Most probably the issue is related to trailing comma in Array/Object. Please refer to this stackoverflow thread for more information. If this doesn’t solve the problem please post the code, so we can have a look.
colopez,
Here is the jsfiddle for the same.
bambinou,
Can you please post the complete JSON returned to jsonData or provide a link to the page if it can be publicly accessible.
bambinou,
You have to parse the json before assigning to dataPoints. Here is the code to do the same.
<script type=”text/javascript”>
window.onload = function () {
var jsonData = <?php echo json_encode($rows); ?>;
var dataPoints = [];
for (var i = 0; i <= jsonData.length - 1; i++) {
dataPoints.push({ x: new Date(jsonData[i].y), y: Number(jsonData[i].label) });
}
var chart = new CanvasJS.Chart("chartContainer", {
theme: "theme2",
title:{
text: "Earthquakes – per month"
},
animationEnabled: true,
axisX: {
//valueFormatString: "MMM",
interval:1,
intervalType: "week"
},
axisY:{
includeZero: false
},
data: [
{
type: "line",
lineThickness: 3,
dataPoints: dataPoints
}
]
});
chart.render();
}
</script>
colopez,
Here is the jsfiddle for the same.
cProg,
There are few issues with the code.
– Y value you are assigning is a String instead of a Number.
– drawChart method is not defined
– dataPoints is null Array
What you can do is
– Assign a Number as y-value.
– Define a method drawChart to update dataPoints as show below.
function drawChart(dataPoints){
chart.options.data[0].dataPoints = dataPoints;
chart.render();
}