Line and Bar chart

0

I’m having some trouble aligning the data on the line and bar chart with the same x-axis. I want the data on both the line and bar chart to be plotted as is without the values being sorted from largest to smallest. The data on the bar chart is plotted as is based on the x-axis range values, however the data on the line chart is being plotted randomly and doesn’t align with the bars that are plotted on a given ranges.

E.g. Given the below sample dataset, I want the value 1 for both line and bar column to be plot on 2001, so that the two values for the same x-axis point overlap each other on the chart.

However, the chart plots value 1 for bar on 2001 and then plots value 3 for the line on top of the bar, instead of actually plotting value 1 for the line as well.

x-axis
Line data
Bar data

2001
1
1

2002
2
2

2003
3
3

Thanks in advance for your help

Dana

dana.ansari answered
    1

    Thank you, this was helpful. I realized the problem was with the tooltip values not matching the line being plotted.

    Dana

    dana.ansari answered
      0

      Thank you for the instructions. Turns out the problem was the tooltip value being displayed incorrectly on the chart. I mentioned this issue on another post. Basically, the line plots properly but the tooltip values displayed do not correspond to the line being plotted.

      Thanks,

      Dana

      dana.ansari answered
        0

        Hello Dana!

        Thanks for writing.

        If I understand correctly you are using a line and bar chart and you want both the line and the chart to correspond to their respective values aligned on the x-axis.

        With the values you provide, the bar and line should look something like this…

        To get this result selet the bar and line chart. Once selected look over to the panel on the right hand side and notice that there are two blocks. One corresponds to the bar chart and the other corresponds to the line chart.

        you can either drag the file you want to include to the corresponding block or you can type these manually by double clicking on the blue box.

        Make sure that the id (in this case the year) is the same for the bar and for the line as this will align the x-axis and make sure they are plotted together.

        I hope this helps! Let me know if you have any other questions.

        PS- when I first did this I wasn’t able to see the line correctly so I managed to change the color by going to the style panel and get a larger thickness.

        Quadrigram answered
          ×

          Login