Showing posts with label colouring. Show all posts
Showing posts with label colouring. Show all posts

Tuesday, February 14, 2012

Colouring the chart plot area based on x-axis scale

Hi,

I have a report based on a line chart.

The values on X-axis are scaled from -100 to +100. I want to colour the band from -100 to 0 with red colour and that from 0 to +100 in green colour, and i want to provide legend for these bands/sections. How can i do this?

This doesn't look like a tough thing to do but i can't find a way to do it within the chart properties.

Basically i would like to divide the chart (plot area) into multiple vertical bars, each having a different colour. The colour is determined by the range that vertical bar covers on the x-axis

Thanks a lot!

Simranjeev

To color the bars on the chart, go to Chart Properties -> Data -> Edit button in the Values section -> Appearance Tab -> click the Series Style button -> Fill tab

You will have to enter an expression in the color property for the bar to be one solid color. The expression should look something like:
IIF(Fields!XAxisField.Value < 0, "Red", "Green")

You can do this if the axis value is a number or date. You may have to nest a couple of IIF statements if there are a lot of sections that you want to use. I don't think you can use the legend provided by reporting services for what you want it to accomplish since it is based on the series fields. You can create your own legend with a few lines, textboxes, and property changes though.

Colouring the chart plot area based on x-axis scale

Hi,

I have a report based on a line chart.

The values on X-axis are scaled from -100 to +100. I want to colour the band from -100 to 0 with red colour and that from 0 to +100 in green colour, and i want to provide legend for these bands/sections. How can i do this?

A prompt response would be really appreciated

Thanks a lot!!

Simranjeev

Hi!

This is a little urgent so i would really appreciate some response.

This doesn't look like a tough thing to do but i can't find a way to do it within the chart properties.

Basically i would like to divide the chart (plot area) into multiple vertical bars, each having a different colour. The colour is determined by the range that vertical bar covers on the x-axis

Thanks!

Simranjeev