2 Replies Latest reply on Sep 15, 2016 7:54 AM by Yunus Gittham

    Straight Line Graph - Help Needed

    Yunus Gittham

      How do I draw a straight line graph similar to below with two reference lines around the diamond?

       

      I have tried Dual Axis charts but the line, the diamond and the colors don't seem to be working. For the two reference lines, will just creating the reference lines work?

       

      Can someone please help?

        • 1. Re: Straight Line Graph - Help Needed
          Andrew Watson

          Apart from the colours most of this seems to be simple using a dual axis.

           

          It looks like you want your maximum value to be 100 (%?). Assuming this should be a % create a calculated field called 'one' with the value 1. This will be used as your bar chart, which will be your straight line, it will go from 0 to 1 or 0% to 100%.

           

          Your diamond is brought into the dual axis but with a different mark type, a shape, as opposed to a bar. Within a dual axis chart you are able to alter the chart type of each of the 2 components of the dual axis. Synnchronise the axes.

           

          Use reference lines for your 2 lines.

           

          You can colour the diamond using a standard calculated field - i.e. IF [FIELD] < 50 THEN 'Red' ELSE 'BLue' END

           

          Colouring the bar is something I'm less sure about. Perhaps someone else out there can give a quick answer to that should it be very simple and I can't think of it off the top of my head.

           

          Please ask if my description isn't clear.

          • 2. Re: Straight Line Graph - Help Needed
            Yunus Gittham

            Hi Andrew

             

            Thanks for the quick response.

             

            See my comments below.

             

            Apart from the colours most of this seems to be simple using a dual axis - Yes I will be using dual axis.

            It looks like you want your maximum value to be 100 (%?). Assuming this should be a % create a calculated field called 'one' with the value 1. This will be used as your bar chart, which will be your straight line, it will go from 0 to 1 or 0% to 100%. - Yes, the values will be from 1 to 100. This is a good option that you have presented. I will try that.

             

             

            Your diamond is brought into the dual axis but with a different mark type, a shape, as opposed to a bar. Within a dual axis chart you are able to alter the chart type of each of the 2 components of the dual axis. Synnchronise the axes. - Yes, I tried that and that will work hopefully, when I have all the data points. The client is still constructing the  line points.

             

            Use reference lines for your 2 lines. - Hopefully the reference lines should work based on the values that the data provides. There will be two fields for reference lines, so I can use that field to create a calculated filed and can use it in the reference line.

             

            You can color the diamond using a standard calculated field - i.e. IF [FIELD] < 50 THEN 'Red' ELSE 'BLue' END - The color formula that I have is very complicated and hopefully it works.

             

            And your description is very clear.

             

            Will reach out to you in case of any further questions.