datastorm-open / rAmCharts

API for Amcharts
48 stars 17 forks source link

Cannot skip missing date #76

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi, when ploting candlestick, there is always some date with no data due to no trade happend in that days. But your plot of candlestick would still plot them with blank. Even in your example, the code you used cannot reproduce the right result on my computer.

if(!require(rAmCharts)){install.packages("rAmCharts")}
data("data_candleStick2")
amCandlestick(data = data_candleStick2, dataDateFormat = "YYYY-MM-DD", 
              labelRotation = -45)

Here is what your print: image Here are what I got: image

bthieurmel commented 6 years ago

Hi,

one way is to not parse date, like this :

data("data_candleStick2")
amCandlestick(data = data_candleStick2)

# Parse date              
amCandlestick(data = data_candleStick2, 
              dataDateFormat = "YYYY-MM-DD")
ghost commented 6 years ago

@bthieurmel But that does not solve the problem.