문제

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