Announcement

Collapse
No announcement yet.

setBarFgColor() doesn't change the color of the current bar

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

  • setBarFgColor() doesn't change the color of the current bar

    I have a line plot, and when I call setBarFgColor(), the plot changes color on the following bar, but not on the current bar that I'm plotting. Not sure what I'm doing wrong here.

    Thanks in advance for your help,
    Norm

  • #2
    Code that demonstrates the problem

    This code demonstrates the problem:

    Code:
        if( getCurrentBarIndex() == 0 )
            setBarFgColor(Color.white);
    I would expect the color of bar 0 to be white, but instead, it sets the color to white AFTER this bar is displayed. If I want bar 0 to be white, it seems that I need to set the color to white on bar -1. Am I understanding this correctly?

    Norm

    Comment


    • #3
      Do you have setComputeOnClose() in your preMain()? If so, remove it.

      Comment


      • #4
        Thanks, Steve. That's a good guess, but I'm not.

        Today I needed to move my code so that it's called from efsInternal(), and now setBarFgColor() isn't doing anything. I think that's the correct behavior, but I'm not sure. If so, my first question is now irrelevant.

        Norm

        Comment


        • #5
          Is your plot type set to PLOTTYPE_INSTANTCOLORLINE?

          "plot a line that responds to color changes on the signal bar"

          setPlotType(PLOTTYPE_INSTANTCOLORLINE, 0);

          Comment

          Working...
          X