Aarya,
Can you please provide the link to jsfiddle with sample data?
___
Suyash Singh
Team CanvasJS
Aarya,
The dataPoints in multi-series charts need to be aligned, i.e. there should be the same number of dataPoints in all the data-series. In cases where y values are missing in some of the data-series adding a dataPoint will null y value should work fine. I have updated your jsfiddle, please take a look.
___
Suyash Singh
Team CanvasJS
@wtf,
Despite the fact that I am not calling the render function
The chart is getting rendered as change
method is called which in turn calls chart.render()
.
function change() {
newTitle = "is going on";
chart.render(); // chart.render() gets called inside change
}
change(); // Call to the change method
Please take a look at this MDN Page on Javascript Functions.
cannot be changed by changing the data and re-rendering.
The title is not being updated as chart options are not updated within change method instead, you are updating newTitle. You can use set method to update the chart title. Please add the following line after chart.render()
method in change()
;
chart.title.set("text", newTitle);
You can take a look at this Documentation Link on set() for more info.
Also, we noticed that you haven’t set the dataPoints properly. dataPoints should be an array which is number in your case.
dataPoints: 0 // incorrect, should be an []
The chart should work fine after making all these changes.
___
Suyash Singh
Team CanvasJS
Chris,
Please have a look at this jsfiddle.
___
Suyash Singh
Team CanvasJS
The functions calculateMovingAverage()
and calculateMovingAverageScrap()
will generate the same set of dataPoints as essentially they are same. Can you please brief us further about your requirements along with a jsfiddle with your sample data, or pictorial representation, so that we can understand your requirements better and help you out.
___
Suyash Singh
Team CanvasJS
Can you please share a sample project along with sample data reproducing the issue that you are facing and share it over one drive(or any other similar service) so that we can understand your code better and help you out?
___
Suyash Singh
Team CanvasJS
We observe that you are passing an array as y-value to a column chart. Since Column Chart accepts a single numeric y-value, you can either use one of the values from your highlow
array or change the chart type to Range Column Chart as in this jsfiddle.
If this doesn’t suit your requirements can you please create a sample jsfiddle or
give us a pictorial representation so that we can understand your requirements better and help you out?
___
Suyash Singh
Team CanvasJS
The visual appearance of charts to a large extent is dependent on the color combination, the thickness of the lines and other related customizations. Can you please try changing color and lineThickness so that it looks better.
___
Suyash Singh
Team CanvasJS
Can you please share a sample project along with sample data reproducing the issue you are facing so that we can look into it and help you out?
___
Suyash Singh
Team CanvasJS
Chris,
Please have a look at this jsfiddle.
___
Suyash Singh
Team CanvasJS
Can you please brief us more about your requirements, so that we can understand it better and help you out. Also, it would be great if you could create a jsfiddle reproducing the issue that you are facing so that we can look into it and help you out.
___
Suyash Singh
Team CanvasJS
Can you please share your code/image to info@canvasjs.com so that we can look into it and help you out?
___
Suyash Singh
Team CanvasJS
calculateMovingAverage()
should be called before calling chart.render()
. Please replace chart3.render();
by
calculateMovingAverage(chart3);
chart3.render();
___
Suyash Singh
Team CanvasJS