Home forums Using CanvasJS is there a way to have two charts share 1 y-axis?

This topic contains 5 replies, has 3 voices, and was last updated by  xiaosongzou 5 months ago.

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

    xiaosongzou
    Member

    I have a line chart and a bar chart on my page. i want to use y axis of the line chart as the x axis of the bar chart.
    is there a way to do that? please refer to the screenshot for an example
    http://prntscr.com/bg1k8d

    #11360

    Vishwas R
    Keymaster

    Sorry, as of now Bar chart Cannot be combined with any other chart types except Bar and Stacked Bar charts.

    #11381

    xiaosongzou
    Member

    Do you have any suggestion or work around for this?Thanks!

    #11383

    xiaosongzou
    Member

    All i want to do is to align the y-axis of two charts. Let me ask some other questions which may help.
    1. can we control the width of labels(not max-width)
    2. can we remove the gap between bars?

    I marked them in the following screenshot

    http://prntscr.com/bggq8b

    #11385

    Sanjoy
    Moderator

    xiaosongzou,

    1) As of now we don’t have width property of label. Using margin you can align the axis of both the chart.
    2) For controlling gap between bars you can use dataPointMinWidth.

    Also you can check interval,viewportMinimum and viewportMaximum for aligning the labels/grid-lines.

    #11494

    xiaosongzou
    Member

    With dataPointMinWidth, how can i remove gap between bars without overlap? Overlapping bars look weird.

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

You must be logged in to reply to this topic.