ssrs-set chart area background color based on x-axis and Y-axis value

  • I am creating a report that shows a scatter chart. I want to set the chart area in two colors based on x axis and y axis value.

    x-axis-1 to 10

    y axis-1 to 10

    area between x axis value 0 to <=5 and y axis 0 to <=5 set to pink

    area between x axis value >5 to <=10 and y axis >5 to <=10 set to green.

  • You can do this with striplines. These can be found in the axis properties, by which I mean selecting the axis and pressing F4, not through the right click menu.

    So for your vertical axis properties you would add two striplines. The pink one with a StripWidth of 5 and then a green one with an IntervalOffset of 5 and a StripWidth of 5.

    You should now have two horizontal strips on your chart.

    Now add a green one to the horizontal axis, with an IntervalOffset of 5 and a StripWidth of 5. This should overlay the far end of the pink one.

  • Hi Spiff,

    Thanks for your approach. But it is not resolving my issue .

    Actually it is a scatter chart. The values that fall in the region(area between x axis value 0 to <=5 and y axis 0 to <=5 pink) show the behavior (Bad and getting worse)with pink color .And the values that fall in the region(area between x axis value >5 to <=10 and y axis >5 to <=10) show the behavior (Good and getting better) with green color.

    With your approach it is also coloring the areas(area between x axis value >0 to <=5 and y axis >5 to <=10) and (area between x axis value >5 to <=10 and y axis >0 to <=5) also with green color which is contradicting with my requirement which is displaying the behavior.

  • Ahh I see.

    I have a feeling I either managed this once or failed - can't remember which but I have tried something similar before.

    However, I've had a quick attempt and can't work it out.

    If the axes are fixed max and min you can create an image with the appropriate layout and use it as a background to the chart area.

  • Can you please elaborate how to create that image

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply