Earlier WebKit allowed 448MB of canvas buffer memory whereas now they have dropped it to 224MB. Because of this, there was some memory issue with CanvasJS Charts in the latest iOS. However, we have optimized memory consumption in CanvasJS v2.3 – please check out this release blog for more info. Kindly download the latest version of CanvasJS Charts from our download page and let us know your feedback.
We are closing this thread as this is duplicate of Canvas line Chart not Visible IPAD. Please check / revert back in the other thread.
—
Vishwas R
Team CanvasJS
In the code that you have shared, the JSON-format(data and value) doesn’t seems to be proper. Storing names as array of string and values as array of numbers should work fine in this case. Please find the code-snippet for parsing JSON data below.
for(var j = 0; j < probForObj["data"].length; j++){
dataPoints.push({label: probForObj["data"][j], y: Math.round(probForObj["value"][j])});
}
Please take a look at this JSFiddle for working sample.
—
Vishwas R
Team CanvasJS
If I have CanvasJS Chart License and I want to use my company logo(our customizing logo) on CanvasJS Chart, Is there any support to do it?
You can overlay images on top of chart, please take a look at documentation on Position Image Over Chart for step-by-step tutorial on the same.
And to remove ‘Trial Version’ and ‘CanvasJS’ Credit Link, need Commercial Version of CanvasJS, Right?
Commercial version of CanvasJS doesn’t contain any ‘Trial Version’ or ‘CanvasJS’ credit link. You can download commercial version of CanvasJS from My Account page, once the license is purchased.
—
Vishwas R
Team CanvasJS
Setting xValueType to ‘dateTime’ should work fine in your case, as you are passing timestamp as x-value. If this doesn’t solve your issue, kindly create a sample project and share it with us via Google-Drive or Onedrive so that we can look into the code, understand it better and help you out?
—
Vishwas R
Team CanvasJS
valueFormatString defines how values must be formatted before they appear on Axis X. Changing ValueFormatString
to valueFormatString
should work fine in your case.
—
Vishwas R
Team CanvasJS
@xps,
An HTML document can only have one html tag and one body tag. To display multiple charts in a page, you can have multiple chart-containers (div in this case) and have just one script-tag where you create both chart1 and chart2 and render them. Please take a look at this tutorial on Rendering Multiple Charts in a Page.
Also please take a look at tutorial on HTML and this stackoverflow thread for more info.
—
Vishwas R
Team CanvasJS
Variable S and A gets value and goes to global scope inside updateChart method, which gets executed after 10ms (based on the value of updateInterval). But you are consoling the values is outside the method – which gets executed first. Consoling S and A after the first execution of updateChart method should work fine in this case.
Example:
var updateChart = function () {
S = 35;
A = Math.sin(Xa * Math.PI / 180);
}
setInterval(function(){
updateChart();
consoleValues();
}, 1000);
function consoleValues(){
console.log(S); //Still accessible outside updateChart method
console.log(A);
}
—
Vishwas R
Team CanvasJS
Jens,
Yes, it’s possible to style subtitle by changing fontColor, fontSize, fontFamily, backgroundColor, margin, padding and other available properties. Please take a look at documentation on subtitles for complete list of available customization options.
—
Vishwas R
Team CanvasJS
As suggested by @shashiranjan, title & subtitle can be positioned in the center of the pie/doughnut by setting dockInsidePlotArea and verticalAlign properties.
As your requirement includes having a title to the top of the chart, you can use subtitles to be positioned at the center of the chart ( You can add as many subtitles as you want to a chart – so even if you like to have a subtitle at the top of the chart, you can still add another subtitle at the center of the chart). Please find the code-snippet for the same below.
title: {
text: "Doughnut Chart"
},
subtitles: [{
text: "Subtitle 1"
}, {
text: "Subtitle 2",
verticalAlign: "center",
dockInsidePlotArea: true
}],
Please take a look at this updated JSFiddle for complete code.
—
Vishwas R
Team CanvasJS
The data doesn’t render, when I run this code. But, when I try to console.log (data.columns[“latitude”]) outside the for-loop, I am able to access the data which I need.
You are consoling data.columns[“latitude”] which is getting consoled whereas while parsing you are considering it as data[i].columns[“latitude”] which should ideally be data.columns[“latitude”][i]. Parsing the data received from JSON accordingly should work fine in this case. Please take a look at this JSFiddle.
—
Vishwas R
Team CanvasJS
@ronaldtakarai @jstaufferbohlereng-com @raluca @badman31 Brian,
We have fixed the issue and will make it public soon. Meanwhile, please use this internal build with the fix and kindly let us know if it works fine.
Please download the React Sample Project with the internal build of CanvasJS from this link.
—
Vishwas R
Team CanvasJS
Webkit allowed 448MB of canvas buffer memory earlier whereas they have dropped it to 224MB. Because of this, there was some memory issue with CanvasJS Charts in latest iOS. However we have optimized memory consumption in CanvasJS v2.3 – please checkout release blog for more info. Kindly download latest version of CanvasJS Charts from our download page and let us know your feedback.
If the issue still persists, kindly share sample project over Google-Drive or Onedrive, so that we can look into the issue and help you resolving it.
—
Vishwas R
Team CanvasJS
Guilherme,
Chart animates only on the first render, as of now. When you use set method, chart re-renders based on the 3rd parameter. During the first render, as there are no dataPoints present, animation wouldn’t be visible. During second render (happened because of set method) animation wouldn’t happen.
To update dataPoints dynamically and to animate chart, you can instantiate the chart, update dataPoints via chart-options and then call chart.render as shown in the code snippet below:
var chart = new CanvasJS.Chart("chartContainer", {
title: {
text: "Animation Test"
},
animationEnabled: true,
data: [{
type: "column",
dataPoints: []
}]
});
chart.options.data[0].dataPoints = [{ label: "Apple", y: 658 },
{ label: "Orange", y: 200 },
{ label: "Banana", y: 900 }];
chart.render();
Please take a look at this updated JSFiddle for an example with sample code.
—
Vishwas R
Team CanvasJS
Chetan Kumar,
One of our team-members have contacted you over e-mail. Please check your inbox for the complete list of change-logs from v1.8 to v2.2.
—
Vishwas R
Team CanvasJS