4 Replies Latest reply on Oct 6, 2016 1:35 PM by Xiang Li

    How to color Bar chart

    Xiang Li



      Please help me! In each bar, I want to above orange line are colored red while values below orange line are green. Is that possible?

      Thanks so much for help!

        • 1. Re: How to color Bar chart
          Joe Oppelt

          See attached.


          In Sheet 2 (copy of Sheet 1) I created a color calc to set red/green.


          But you can see that some of the reds are still below the orange line, and that's because the axis for the two parts of the chart aren't synchronized.  And because [Two Digit] is a measure, you can't simply do "Synchronize Axis" here.  (I think that's the reason why...)


          So see Sheet 3.  On this one I added a reference line to both axes.  It's a table calc that computes the biggest number on both sides.  ([Reference Line].)  That forces both sides to have the same max value, and that lines things up for you.


          On Sheet 4 (copy of sheet 3) I edited the two reference lines so that they don't display.

          • 2. Re: How to color Bar chart
            Xiang Li

            Hi Joe,


            Thanks so much for helping. I think you misunderstand my purpose. For example, I want to above red spot are colored orange while values below red spot are green in one bar. Thanks again!


            • 3. Re: How to color Bar chart
              Joe Oppelt

              Yup.  I misunderstood.


              OK, so in the attached I made two calcs.  You'll notice that I cut off the colors using INT(avg(...)).  Maybe that's right.  Maybe not.  You can play with the calcs to use the actual AVG values instead.

              1 of 1 people found this helpful
              • 4. Re: How to color Bar chart
                Xiang Li

                Hi Joe,


                Thanks a lot! Very Cool!