Home Forums StockChart Support How to make the x-axis labels fixed

How to make the x-axis labels fixed

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

    Hello

    I have a stock chart, where under charts array I have multiple charts, which makes the container scrollable. I only have axisX2 label for the top chart. My requirement is that while keeping the scroll feature I need to make the x-axis labels for the top most chart within view, i.e (the top most chart’s x-axis will be fixed) even if the user scrolls.

    Fiddle link: https://jsfiddle.net/sgh1wpb4/2/
    Fixed axisX2 for top chart

    #43031

    @mustadirmahmood,

    It is not possible to fix the x-axis to the top of the stockchart while scrolling through other charts in a stockchart as of now. However, you can position an overlayed canvas on top of the first chart and copy the x-axis to the overlayed canvas to achieve your requirement.

    Please check this updated JSFiddle for a working example.


    Thangaraj Raman
    Team CanvasJS

    #60646

    Can someone show me how to make y axis labels stationary?

    This fiddle (copied and modified from above) https://jsfiddle.net/svc51ym8/ has labels on x axis stationary.

    I would like to learn how to make y axis labels stationary.

    #60652

    @dpanscik,

    To make the y-axis stationery, you can position an overlayed canvas on top of the stockchart and copy the y-axis onto the overlayed canvas.

    Please check this StackBlitz for a working example.


    Thangaraj Raman
    Team CanvasJS

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

You must be logged in to reply to this topic.