Announcement

Collapse
No announcement yet.

Query re painting a region of the screen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Query re painting a region of the screen

    Is there a way to paint a portion of the background screen a different color than the rest, conditional on certain conditions?

    Currently I'm using some extra bands to mark off a small variable area around the pivot, but it would be nice if I could just paint that section a different color.

    In the attached chart, you can see the two extra pale-yellow lines on either side of the pivot. It's that region I'd like to make a navy blue or gray, etc.

    Thanks,

    Steve Miller
    Attached Files

  • #2
    Steve
    The image you posted is blank.
    Alex

    Comment


    • #3
      Yes, Alex, the image is blank. Don't know what went wrong.

      Steve

      Comment


      • #4
        Trying again.
        Attached Files

        Comment


        • #5
          Steve
          You can do that using the optional yMin and yMax parameters in setBarBgColor()
          For an example see the efs attached to this post
          Alex

          Comment


          • #6
            Thanks, Alex -- that's very cool!

            Steve

            Comment


            • #7
              Here's a related question. When I use the Ymin and Ymax parameters of setBarBgColor, it paints over a band that I'd like to be able to see for quick clarity. The band should be at the top of the Daily Pivot Range, as it is at the bottom of that range, but setBarBGColor very often paints over it.

              Comment


              • #8
                Steve

                When I use the Ymin and Ymax parameters of setBarBgColor, it paints over a band that I'd like to be able to see for quick clarity
                You may want to post a working code example that illustrates the issue you describe as this is not apparent from the image you posted. As far as I can see at my end bands and lines are being drawn over the background.

                Looks like the graphic upload didn't take -- or is it that the moderator has to okay it first?
                If you attach a file and then use Preview Reply the attachment is removed so you need to attach it again before clicking Submit Reply.
                Alex

                Comment


                • #9
                  Maybe this one will be more legible:
                  If you notice, at the upper right of the navy blue rectangle, there's a cyan dot. That's all that shows of the cyan band that is there, parallel to the one visible at the bottom of the rectangle.
                  Attached Files

                  Comment


                  • #10
                    Steve
                    To resolve this simply assign setBarBgColor() to that specific series of the return array or any one that preceeds it. For example try replacing the command with the following
                    PHP Code:
                    setBarBgColor(Color.RGB(0,0,80),3,DPRminus,DPRplus); 
                    and you should get the plots as shown in the image enclosed below in which you can see the line is now visible.
                    Alex

                    Comment


                    • #11
                      Well, that absolutely works. And thank you.

                      But I'm not clear what happened. I thought the series offset referred to the number in the array -- not true?

                      Steve

                      Comment


                      • #12
                        Steve

                        I thought the series offset referred to the number in the array -- not true?
                        The series parameter refers to the item in the return statement.
                        Alex

                        Comment

                        Working...
                        X