質問

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