7 Replies Latest reply: Mar 26, 2015 8:44 AM by Eric Johnson RSS

    Change color of trend line

    Joao Gutheil



      i would like to change the color of trend line in a bar chart.


      Is it possible?


      Thank you



        • Re: Change color of trend line
          John Witherspoon

          I don't think it is, but I could be wrong.  If you really need it to be a different color, you could calculate your own trend line as a second expression.  In the attached file, the first chart demonstrates calculating your own trend line, here in the context of forecasting sales as a linear trend from recent values.


          Edit: Hit post instead of attach.  File should now be attached.

          • Change color of trend line
            Stefan Wühl

            I think the color can be set / changed in the Colors tab. Not quite sure about the logic (which color id in the sequence is used for the trend line, especially with multiple dimensions, but you can probably spot the color quite easily).


            Then, you probably need to change the background color of your expression back to the color you want (I assume it should be different from the trend line). You can do this in expression tab, open expression attributes by clicking on the plus sign and add a color expression to background color).


            [At least with QV11, I noticed that you could set colors e.g. for Totals and others in Colors tab. Why not for trend lines? I don't know]

            • Re: Change color of trend line
              Jeroen Jordaan

              Hello everyone,


              My reaction is a bit late but what I did is I changed the color of the background property in the expression with a RGB code.

              This changes the color of the bars but not the color of the trendline.


              I hope this helps.

              • Re: Change color of trend line
                pauljn k

                Change the color of total in Colors tab . Special Segment >Total

                • Re: Change color of trend line
                  Eric Johnson

                  Had this same question... very simple and straightforward as noted above. Go to Properties > Colors and in the data appearance box, set the colors. The trendline color is represented by the first unused color in the set. So in a simple line graph, the line of the actual data points is represented by color 1 (default blue) and the trendline would be the second color (default red). Click on that red box to pull up the color pallet and change the color.