Home forums Using CanvasJS custom annotation with highlight time range

This topic contains 5 replies, has 3 voices, and was last updated by  Bivek Singh 6 months, 3 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #15175

    cancanvas
    Member

    Hi there,

    I have two questions about using canvajs.

    1. I know using startValue and endValue to define stripline width. But is it possible to define stripline height as well if stripline options are set to axisX?

    2. Is it possible to draw a flag on a specific position right above axis, just like an annotation?

    Thank you!

    #15176

    Suyash Singh
    Moderator

    @cancanvas,

    1. Defining the stripLine height is not possible as of now.

    2. For something like annotations you can position either image on the chart as in this example or add a scatter or bubble dataSeries as a work-around.
    ___
    Suyash Singh
    Team CanvasJS

    #15186

    cancanvas
    Member

    Suyash,

    Thank you for the response.

    The work-around does not meet my needs. Any ways to draw a customized flag on a defined position of the line chart?

    Thank you!

    #15189

    Suyash Singh
    Moderator

    @cancanvas,

    Sorry, we are unable to understand your requirements properly. Can you please clarify what do you mean by a customized flag? Is it an image or you want to draw flags on the chart yourself? Also it would be helpful if you can provide us with some pictorial representation.
    ___
    Suyash Singh
    Team CanvasJS

    #15190

    cancanvas
    Member

    Let’s use your example:http://jsfiddle.net/canvasjs/u50cqf09/
    My question is the following:
    1. Is it possible to place the chrome icon in an arbitary position? for example, (35,20).
    2. Instead of chrome icon, can we draw a square and place a number in it? Just like draw on a canvas?

    Thanks!

    #15196

    Bivek Singh
    Moderator

    @cancanvas

    Yes, you can place an image at any position you like. You just need to provide the pixel co-ordinates position to the top and left CSS properties of image. You can also make use of convertPixelToValue and convertValueToPixel methods provided in the library.

    For your second query, You can draw anything you like on the canvas. Please take a look at this jsFiddle.

    —-
    Bivek Singh

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

You must be logged in to reply to this topic.