Home forums Chart Support Change one candle color and get info from the dataPoints

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #28602

    I have two questions.
    1- Is it possible to get te information from a specific chart?
    For example, I wanna know if the chart is a hammer or not. Then it’ll have a for to each candle and verify if it is ou not a hammer.
    2- Based on that for, can I change the color for a specific chart?
    If it is a hammer, the color of the chart changes.

    Can I do those things?

    • This topic was modified 10 months, 3 weeks ago by Heni.


    Hammer pattern in a Candlestick chart can be detected based on the dataPoint y-values as explained in this article. Please take a look at this JSFiddle for an example on adding indexLabel when the hammer pattern is found in a dataPoint.

    Manoj Mohan
    Team CanvasJS



    That helped a lot. Can I make a logic for every candle and verify if it’s a hammer or not?
    Then, if it’s a hammer, I use indexLabel to write hammer in it.



    The JSFiddle shared above shows how to detect and add indexLabel to hammer dataPoints(candles).

    Manoj Mohan
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.