Home Forums Chart Support How to make y-axis centered rather staying in the left

How to make y-axis centered rather staying in the left

Viewing 7 posts - 1 through 7 (of 7 total)
  • #14768

    Please check the sample image below

    sample image

    • This topic was modified 7 years, 8 months ago by yueming.
    #14772

    @yueming,

    As of now it is not possible to position axisY at the center of the chart. However, you can workaround this by positioning axisY of another chart (without any dataPoint) in the background of current chart. Please check this jsfiddle.
    ___
    Suyash Singh
    Team CanvasJS

    #14803

    I tried the jsfiddle, it works. Thanks very much for your prompt response. But how can it support zooming in this case? The axisY chart is not zoomed with the main chart.

    • This reply was modified 7 years, 8 months ago by yueming.
    #14816

    @yueming,

    You can use rangeChanged event of chart1 to programmatically zoom axis of chart2. Please check this updated jsfiddle.

    You can also refer tutorial on Sync Zooming and Panning across Multiple Charts.


    Vishwas R
    Team CanvasJS

    #15595

    Thanks. I have one more question, is it possible to export chart1 and chart2 to one png file?

    #15603

    Unnecessary to export chart1 and chart2 to one png file. I did it by screen capturing.

    #15605

    @yueming,

    Glad that you found a way to handle it.

    ___
    Suyash Singh
    Team CanvasJS

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

You must be logged in to reply to this topic.