2
votes

I'm working on SSRS Line Charts. In a single graph I have like 4 lines, each two is of comparisions. I woud like to add a title to each line in the chart like below. This will really help to understand the data without checking the color code of each lines from axes definitions located at the end of the chart. Please guide me how to achieve it. enter image description here

Update: Please find my requirement with the question below in Excel. I would like to do something similar in SSRS

https://superuser.com/questions/807068/how-to-display-series-name-inside-bars-of-stacked-bar-chart

1
How to achieve it? I can't imagine what's stopping you from just building it with textboxes. What part of this are you stuck on?Tab Alleman

1 Answers

2
votes

You can set the Label property of the series to show the helper text conditionally to a specific x-axis value.

Click the serie you need to label, in my case the [Sum(Cancelations)] as you can see in the below screenshot.

enter image description here

Press F4, a properties window will appear. In the property window, search for Label node and expand it, you will get something like this:

enter image description here

In the Label property you have to use an expression to determine where you have to place the label, in my case I've used:

=IIF(Fields!Day.Value="123",
"Cancelation",
Nothing
)

This expression says, show the Cancelation label when the x-axis label is equal to 123, if the day field (x-axis) is not 123 it shows nothing.

The same logic if you want the label appearing at the beginning of your the line, in that case you have to use the first value in your x-axis.

=IIF(Fields!Day.Value="2",
"T-2",
Nothing
)

It says if Day.Value is equal to 2 then show T-2 as the label. Otherwise show nothing.

I've created an example.

enter image description here

Alternatively, you can use tooltips if you are generating your report in an interactive format like MHTML. Note the tooltip appears when you pass the mouse over the line.

Note you have to set the Visible property to True as pointed in the screenshot.

Let me know if this helps.