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

Timeless candle chart #246

Open
mdx67 opened this issue Sep 17, 2019 · 5 comments
Open

Timeless candle chart #246

mdx67 opened this issue Sep 17, 2019 · 5 comments

Comments

@mdx67
Copy link

mdx67 commented Sep 17, 2019

Hi, I need to build a timeless graph... In actual examples, when I put two equals data, one override another.. How I can plot candles considering list order and without override?

@minyor
Copy link

minyor commented Aug 16, 2020

Anyone? How can one put hours and minutes in dates?
Seconds?
No example there...

@minyor
Copy link

minyor commented Aug 16, 2020

Unix datestamps in place of dates are not working.
How can I put data in chart with time not just date?

@minyor
Copy link

minyor commented Aug 16, 2020

I mean, what date format should I put here:
{
"Date": "28-Apr-2019",
"Open": "0.291600",
"High": "0.291700",
"Low": "0.291400",
"Close": "0.291700",
"Volume": "23"
},
To specify hours and minutes?
Thanks

@minyor
Copy link

minyor commented Aug 16, 2020

Huh, found the solution.
Located line:
var parseDate = d3.timeParse("%d-%b-%y");

Changed it to:
var parseDate = d3.timeParse("%d-%b-%y %H:%M");

Who needs dates with days only?
Very confusing examples you have here...

Anyways. now dates like "28-Apr-2019 04:30" works.
Hope it helps someone.

@trasherdk
Copy link

From the samples:

Date,Open,High,Low,Close,Volume
9-Jun-14,62.40,63.34,61.79,62.88,37617413
6-Jun-14,63.37,63.48,62.15,62.50,42442096
var parseDate = d3.timeParse("%d-%b-%y");
{
  date: parseDate(d.Date),
  volume: +d.Volume,
  open: +d.Open,
  high: +d.High,
  low: +d.Low,
  close: +d.Close
}

Data with unix timestamp:

{
  date: new Date(d.time * 1000),
  volume: +d.Volume,
  open: +d.Open,
  high: +d.High,
  low: +d.Low,
  close: +d.Close
}

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

3 participants