5 Replies Latest reply: Aug 1, 2012 12:48 PM by Andi Mohr RSS

    How to Change Bar Border Color in Bar Chart?

      In a bar chart, I'm able to create a black border around the bars in my bar chart by going to Expressions > Bar Border Width and increasing the value from 0 to 1.

       

      However, I can't seem to find any way to change the color of this border.

       

      What I'd like to do ultimately is set the border color to the same color as the background, thus creating a 1 pixel "negative space" between stacked values in my bar chart, like in the following image:

       

      white-borders.jpg

      Can anyone give me some advice on doing this?

        • How to Change Bar Border Color in Bar Chart?
          Subin Thomas

          You could probably change and check with different Looks in the' Style' Tab under 'Properties'.

           

          Have attached the screenshot of a stacked bar with simple look and no Border.

           

           

          nogap.JPG

            • How to Change Bar Border Color in Bar Chart?

              Thanks for the suggestion subin, but unfortunately none of the styles shown in the "Styles" tab seem to cover what I'm trying to do.

               

              I can recreate your screenshot (stacked bar with multiple colors and no border) but what I really want is to create a whitespace between the stacked datasets like in the top image. One way to accomplish this would be to create a border and change its color to the background color; another way would simply be to put some padding between the stacked data. Unfortunately, I can't find a way to do either of these things currently.

                • How to Change Bar Border Color in Bar Chart?
                  Subin Thomas

                  Oh . I thought you din want the space . What your request is easy.

                  Just go to the properties and under the expression add some value to the Bar Offset as shown in the below screenshot which would give the space between each bar as required. For you to achieve one pixel you could give a value of 0.09 or 0.1

                   

                  Here is the attached screenshot.nogap.JPG

                  Let me know incase if you still din get it.

                   

                  BR

                  Subin

                    • How to Change Bar Border Color in Bar Chart?

                      Bar offset did create the space in between the stacked data segments, but there were a couple of issues: one issue was that creating a bar offset affected the horizontal axis somehow. Where the old axis went to the maximum of my data (158), after creating a bar offset I found that the new axis only went to just past 100.

                       

                      I was able to remedy this by setting a static axis length and calculating it to max(Aggr(count(<valuedata>),<dimension>)).

                       

                      The second issue (which is much more minor) is that the offset between each data segment seems to be slightly (one or two pixels) different. Probably wouldn't bother most people but I find it driving me crazy!

                       

                      Anyway, hope that Qlikview creates the ability to customize bar border color in future releases (or even to customize what borders (i,e left, right, top, bottom) are shown - that would have been the absolute best way to handle this.

                        • Re: How to Change Bar Border Color in Bar Chart?

                          You may be able to work around this by going to Chart Properties > Presentation, and adding white 1pt reference lines at the max value for each of your stacked segments. Seems to work for me anyway, I'm on version 11.

                           

                          If you're not sure how many segments you have it might be a bit tricky though - perhaps if you know the maximum possible number of segments you could create one reference line for each but make their appearance conditional on the data.