andredumas / techan.js

A visual, technical analysis and charting (Candlestick, OHLC, indicators) library built on D3.
http://techanjs.org/
MIT License
2.4k stars 537 forks source link

Gap at the end of the chart #247

Open p-xyxy opened 4 years ago

p-xyxy commented 4 years ago

Hello, How we can make a gap to the right side of our chart while we receiving the real data? I mean in end of the Chart data which are most new Untitled

trasherdk commented 4 years ago

Whats wrong with:

data.shift();
data.push(newdata);
redraw(data);

Or you could add a few objects to data array with only date.

emptydata = {
  date: DateInFuture
}
data.push(emptydata);