Skip to content

Custom text doesn't replace default hover in Candlestick charts #1370

@senthilthyagarajan

Description

@senthilthyagarajan

Candlestick charts by default come with hover high,open,close,low. So when you try to replace it with custom hover text it still shows the default hover text.

library(plotly)
getSymbols("AAPL",src='yahoo')
# basic example of ohlc charts
df <- data.frame(Date=index(AAPL),coredata(AAPL))
df <- tail(df, 30)

p <- df %>%
  plot_ly(x = ~Date, type="candlestick",
          open = ~AAPL.Open, close = ~AAPL.Close,
          high = ~AAPL.High, low = ~AAPL.Low,
          text = ~paste("TEXT1:", ~AAPL.High,"<br>TEXT2: ", AAPL.Low)) %>%
  layout(title = "Basic Candlestick Chart")
p

Created on 2018-10-17 by the reprex package (v0.2.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions