On hover of MD chart it is showing error in console " ERROR RangeError: Maximum call stack size exceeded".
Can you please suggest how to resolve it.
And on hover of MD chart we don't want to see all chart values and just want to see green lines custom info(Means title).
while Zooming how to make this color graph smooth zooming.Attached a screen shot where we are zooming using .net teechart control getting expected result.
teechart JS : on hover of chart getting RangeError: Maximum call stack size exceeded
teechart JS : on hover of chart getting RangeError: Maximum call stack size exceeded
- Attachments
-
- steemaJsZoomed.png (291.15 KiB) Viewed 41909 times
-
- Expected zoom.png (136.16 KiB) Viewed 41909 times
-
- eventInfoTest.zip
- (276.11 KiB) Downloaded 2091 times
Re: teechart JS : on hover of chart getting RangeError: Maximum call stack size exceeded
Hello,
Regarding the RangeError, debugging your sources, I see a couple of issues:
First, you are calling your startRefresh method at the end of your redrawMdLine:
And the startRefresh code calls the redrawMdLine function again:
So basically, you are creating an endless loop here. And you are adding 10 new Line series each time redrawMdLine is called, which I'm not sure if it's what you wanted to do.
Try changing the isLive flag before calling startRefresh:
Secondly, you are reassigning the tip.old_refresh in that redrawMdLine function. And this is calling itself several times. I would just remove that part of code:
Regarding the RangeError, debugging your sources, I see a couple of issues:
First, you are calling your startRefresh method at the end of your redrawMdLine:
Code: Select all
function redrawMdLine() {
//...
if (isLive) {
startRefresh();
isLive = false;
}
}
Code: Select all
function startRefresh() {
setInterval(redrawMdLine(), 5000);
}
Try changing the isLive flag before calling startRefresh:
Code: Select all
function redrawMdLine() {
//...
if (isLive) {
isLive = false;
startRefresh();
}
}
Code: Select all
function redrawMdLine() {
//...
/*tip.old_refresh = tip.refresh;
tip.refresh = function (series, index) {
if (series !== mdChart.series.items[0]) {
tip.old_refresh(series, index);
}
}*/
//...
}
I don't see titles assigned to the lines, so I'm adding them. Then, you could use the tip.ongettext to get the series title:
Code: Select all
function drawMD(data) {
//...
for (i = 0; i < lineArray.length; i++) {
//...
line.title = "Mean " + i;
}
//...
tip.ongettext=function(tip,text,series,index) {
return series.title;
}
//...
}
The example here seems to do the smoothed=false correctly.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: teechart JS : on hover of chart getting RangeError: Maximum call stack size exceeded
Actually MD chart will be refresh every time and lines will be drawn in different positions. So that every time on hover of line we need to show the title. And one more thing is on hover of chart values are showing and out of chart also it is reflecting. Actually we don't need to show all the values except on hover of lines. Please give us solution like this. If any doubt, we will give clarity on that.
Regards,
Ashutosh
Regards,
Ashutosh
Re: teechart JS : on hover of chart getting RangeError: Maximum call stack size exceeded
Hello,
We've discussed this through mail but if anyone else comes here and wants to know the solution to the issues exposed here we go.
We've discussed this through mail but if anyone else comes here and wants to know the solution to the issues exposed here we go.
That's the purpose of the ToolTip ongettext event:
Code: Select all
tip.ongettext=function(tip,text,series,index) {
return series.title;
}
That was the purpose of the redefinition of the ToolTip refresh function, to ensure the ToolTip responds to all the series in that chart except on the first one:
Code: Select all
tip.old_refresh = tip.refresh;
tip.refresh = function (series, index) {
if (series !== mdChart.series.items[0]) {
tip.old_refresh(series, index);
}
else {
tip.hide();
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |