I am populating the bar graph using the sql query in the report viewer. I am successfully able to populate the bar graph however I would like the bars colour based on condition such as (Please see Bar Chart 1).
Now looking through the forum I found some pointers but the examples were associated to when the bar chart is used in the vision screen. Unlike the bar chart properties in vision screen where one can easily use getBarColor Extention to dynically colour the bars based on the condition, I couldn’t find something similar in the report viewer window.
Here is how I want the bar screen to look (Please Note: This bar screen was populated in the vision window and I used getBarColor extention and code used is below this graph)
BAR CHART 1 - Inserted in Vision Window
’from java.avt import Color
if value >= 4.3:
if value > 4 and value < 4.3:
Now, in the report viewer when I am populating bar graph using sql query, it is noticed that they are all one colou**r. **
BAR CHART 2 - Created in Report Viewer
I am guessing in order to add dynamic colour to the bars I need to use the ‘configurechart’ definition in the report viewer found under the configuration. Please see below the screen shots
I believe the code will go here but I don’t know how to properly do this.
In a nut shell, could you please provide assistance as to how I can fill the bar’s in the bar chart dynamically based on condition in the report viewer window.