Hi there,
I'm attempting to set a "No Data Message" for various charts and I've been using the chart's databound event to check on the number of records returned and then add a "No Data" div to the chart object as per various online discussions. My Databound event is as follows:
This *almost* works in that if I debug the code above, the message is shown, then the alert is shown....however, as soon as I click OK at the alert, the chart appears to be re-rendered, which then removes the newly added div, meaning I'm left with an empty chart with no message.
Is there a way around this?
I'm attempting to set a "No Data Message" for various charts and I've been using the chart's databound event to check on the number of records returned and then add a "No Data" div to the chart object as per various online discussions. My Databound event is as follows:
<
br
>function ConsultantParetoBound(e)<
br
> { <
br
> if (this.dataSource.data().length == 0) { $('<
div
class
=
"custom-overlay"
><
p
class
=
"errorMessage"
>No data available for the selected range</
p
></
div
>').appendTo('#consultantPareto'); alert(); } }
This *almost* works in that if I debug the code above, the message is shown, then the alert is shown....however, as soon as I click OK at the alert, the chart appears to be re-rendered, which then removes the newly added div, meaning I'm left with an empty chart with no message.
Is there a way around this?