Вопрос

I'm using AmStockChart to show usual line graphs. I'm trying to attach Click events to each bullet on the graph but it produces no result. The other events works, but not the Click.

For example if I do:

...
chart.addListener('zoomed', chartClick);
...
function chartClick () {
    console.log("Zoomed!");
}

it works if I resize the graph. But if I change it to:

...
chart.addListener('clickStockEvent', chartClick);
...
function chartClick () {
    console.log("Clicked!");
}

it doesn't react on any click neither on bullet nor anywhere else. Here is the jsfiddle (addListener is at the buttom)

Это было полезно?

Решение

Do you actually have stock events on the chart? as If you have simple bullets, not events, then you should use clickGraphItem event instead of clickStockEvent.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top