We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exception while redrawing chart

Thread ID:

Created:

Updated:

Platform:

Replies:

121714 Jan 19,2016 10:27 AM UTC Jan 20,2016 12:32 PM UTC JavaScript 1
loading
Tags: ejChart
Andrea Perazzolo
Asked On January 19, 2016 10:27 AM UTC

Hi, I have the current situation: I need to have a chart who shows the data of a single month, so I need to have the primary X axis of type 'datetime' to go from the first day to the last day of the month, without "overflowing" to other months, because that'll show no data for days that might have data.

The data is loaded by AJAX and I can change month, so, when redrawing the chart, I change both the data and the range.
Here go the pseudo-code at the end of the AJAX call:

chart.model.series = monthSeries;
chart.model.primaryXAxis.range.interval = 3;
chart.model.primaryXAxis.range.max = firstOfMonth;
chart.model.primaryXAxis.range.min = endOfMonth;
chart.model.primaryXAxis.setRange = true;
chart.redraw();

Without the "chart.model.primaryXAxis.setRange = true;", all the range settings are ignored.

Redrawing some months gives an error, while others go smoothly.
There is no correlation in the data of the months giving errors, as far as I can tell.

The error and its stack trace is the following:
'Unable to get property 'Region' of undefined or null reference'
Line: var p=this.chartObj.model.chartRegions[y].Region.Bounds
 y is 0
 'this.chartObj.model.chartRegions' is an array of length = 0
 
ej.EjSeriesRender.prototype.textPosition [Line: 10, Col: 4403406], ej.web.all.min.js
ej.EjSeriesRender.prototype.drawDataLabel [Line: 10, Col: 4378716], ej.web.all.min.js
Anonymous function [Line: 10, Col: 4508815], ej.web.all.min.js
each [Line: 360, Col: 5], jquery-2.2.0.js
ej.ejChart.drawDisplayText [Line: 10, Col: 4507273], ej.web.all.min.js
ej.ejChart.renderSeries [Line: 10, Col: 4506328], ej.web.all.min.js
ej.ejChart.seriesRender [Line: 10, Col: 4498445], ej.web.all.min.js
ej.ejChart.draw [Line: 10, Col: 4487563], ej.web.all.min.js
ej.ejChart.bindTo [Line: 10, Col: 4514243], ej.web.all.min.js
redraw [Line: 10, Col: 4701599], ej.web.all.min.js


Saravana Kumar Kanagavel [Syncfusion]
Replied On January 20, 2016 12:32 PM UTC

Hi Andrea Perazzolo,

Thanks for contacting syncfusion support. We have analyzed your query and replicated the scenario in our sample. We can able to reproduce the reported issue. We have logged issue report on this. For your better follow-up we have created the new branched incident in your account.

Please let us know if you have any concern.

Regards,
Saravana Kumar K

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;