Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I get the value of the candle I clicked? #204

Open
sumihiro opened this issue Jul 3, 2017 · 7 comments
Open

How do I get the value of the candle I clicked? #204

sumihiro opened this issue Jul 3, 2017 · 7 comments

Comments

@sumihiro
Copy link

sumihiro commented Jul 3, 2017

I added a click event based on the graph of the next candle foot.
However, the value of the candle clicked cannot be taken.
How can I get a value?

http://bl.ocks.org/andredumas/27c4a333b0e0813e093d

svg.selectAll("g.candlestick")
.on('click', function(d,i,x) {
    console.log(d3.select(this).datum()); // will return all of values. I want a value of this item.
});
@episage
Copy link

episage commented Apr 24, 2018

+1

1 similar comment
@icastillejogomez
Copy link

+1

@episage
Copy link

episage commented Oct 2, 2018

As for me, it turns out that it was easier to "write techan.js in d3" by myself. Seriously, it's not that hard.

@icastillejogomez
Copy link

I don’t understand you @episage How did you do it?

@episage
Copy link

episage commented Oct 2, 2018

@icastillejogomez I learned https://d3js.org/ and wrote the code for drawing candles myself. It is not that difficult.
It took some significant time investment but it was worth it. Now I can draw very customised charts and techan.js doesn't limit me.
You can also modify techan.js code but I went the other way.

@icastillejogomez
Copy link

In this issue I can get the candle data that my mouse hover it. #226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants