Bar chart X series

Hi all,
Sorry I may have asked similar question for Y series, but this time I have a question regarding x Series,
My X series will always return no more than 3 values Red, Green and Yellow,
what I want to do is to change the bar color based on the each value , attached an example,
thanks for your help

Comments

  • edited April 17

    To change the "Low" bar to red, try (in beforeDrawDataPoint):

    if(dph.getBaseDisplayValue() == "Low") {fill.set( 255, 0, 0, 255 );}

    Jeff F.
    Customer Support Engineer I
    OpenText
  • Hey Jeff,
    I have applied the code into Script tab > beforeDrawDataPoint as you mentioned

    if(dph.getBaseDisplayValue() == "Low") {fill.set( 255, 0, 0, 255 );}

    but it make the chart disappear, as it doesnt work, is it possible that might be in different version of designer ?
    OpenText Analytics Designer
    Version: 24.4.0
    and the second part is If I want to apply all 3 colors would I repeat it with and? and if so how?

    thanks

  • If the chart disappears, there might be more information about what is causing the issue in the Eclipse Error Log.

    I created an example that does multiple changes to the bar colors. I put comments in the code indicating the effect of each line of code. I hope it is helpful.

    Jeff F.
    Customer Support Engineer I
    OpenText
Sign In or Register to comment.