You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
addListener(name = "syncZoom", expression = paste("for (var x in charts) {
charts[x].addListener("zoomed", syncZoom);
charts[x].addListener("init", addCursorListeners);
}
function addCursorListeners(event) {
event.chart.chartCursor.addListener("changed", handleCursorChange);
event.chart.chartCursor.addListener("onHideCursor", handleHideCursor);
}
function syncZoom(event) {
for (x in charts) {
if (charts[x].ignoreZoom) {
charts[x].ignoreZoom = false;
}
if (event.chart != charts[x]) {
charts[x].ignoreZoom = true;
charts[x].zoomToDates(event.startDate, event.endDate);
}
}
}
function handleCursorChange(event) {
for (var x in charts) {
if (event.chart != charts[x]) {
charts[x].chartCursor.syncWithCursor(event.chart.chartCursor);
}
}
}
function handleHideCursor() {
for (var x in charts) {
if (charts[x].chartCursor.hideCursor) {
charts[x].chartCursor.forceShow = false;
charts[x].chartCursor.hideCursor(false);
}
}
}"))
Thank you.
The text was updated successfully, but these errors were encountered:
Hi,
Nice package you put together. I use it a lot.
I'm trying to replicate the JS example in https://www.amcharts.com/kbase/syncing-zoom-across-several-date-based-serial-charts/ using listeners in rAmChart but I've not been able to get it to work after several trials. I added the JS below to my existing serial charts per your suggestion in http://datastorm-open.github.io/introduction_ramcharts/advance.html but nothing happened. Could you please tell me what I'm doing wrong. I'm not familiar with JS so this might be something simple that I'm missing.
Thank you.
The text was updated successfully, but these errors were encountered: