I have a chart built in Report Builder (MS Reporting Services), where vertical axe is categorical.
Label names of categorical axe is very long.
Is it possible to shrink the length of names for first 10 symbols and show full names when mouse coursor is over the names?
I don't think this is possible natively in SSRS but you might be able to get an acceptable compromise.
First click on the chart, so the config pane opens, click on your category group and then edit the label property to something like this
=LEFT(Fields!Caption.Value, 10)
(Caption is the name of the field containing the label that appears on the Y axis in my case)
Now that you have the shortened name showing you need to show the full name somewhere. Unfortunately, the group labels do not support tooltips but chart series do.
Click anywhere on the bar (but not on the data label) and then set the tooltip property to something like
=Fields!Caption.Value & " " & Fields!Amount.Value
When we run the report and hover the mouse over the 3rd green bar, we get the following...
Related
In slate, chart widget have label option that display legend (color dot + label name) at some place of the chart (top, left, bottom, ...).
I notice 2 limitations with this legend on bar chart and I would like to improve them on my Slate apps.
1 issue: label are ordered in the order series appears on the bar chart (from left to right).
2 issue: when segmented and not-segmented data are stacked on the bar chart, label of not-segmented data have wrong color (even if we set series color parameter, and if we don't color attribution is random and change from one loading to the next).
For that reason I decided to produce my on labels in an HTML widget. I get a nice result just with a function that sort label and return a <div class="bp3-label" style="background:${labelColor};">${labelName}<\div> for each label. But I loose the interactivity (this is a convenient function of labels).
Is there a way to transfer this interactivity to my "custom label" and make click on this selecting all relevant bars on my bar chart?
I'm thinking to use slClickEvent and slClickEventValue props on the DIVs to push data relative to the clicked Label in a variable and to make the bar chart "selectedValue" property dependant of this variable.
Is it the best ways ?
Will the bar be highlighted in accorance with chart "selectedValue"?
You're on the correct track here - I often build custom chart legends in an HTML widget to have more control over the appearance and interaction compared to the native legend. If you search on your Foundry instance, you'll even find a folder of Slate apps that are examples of different HTML widget patterns, including one called HTML - Legend that shows some examples with custom CSS and Blueprint styles.
For the interactivity, I'd probably go with using custom HTML selection, rather than custom HTML click events, because with the custom selection, Slate will automatically add a selected class to whatever element you've added the selection to, which will make it easy to update the styling to reflect the selection.
Nothing would stop you from doing this with custom clickEvents instead, but you'd then need to also do some more work to reflect the selection status in the legend or else go without that extra affordance.
If you search your Foundry instance for Line Chart Series Selection with Custom Legend you'll find an example that shows exactly this. In that specific example, the Line "selection" is indicated on the chart by changing the line styling; with a Bar chart, you'd actually want to template (with Handlebars) the selection status of the chart in the </> panel. Then, when the user makes a selection using the legend, the chart will reflect that selection as if they'd chosen by clicking on the bars themselves.
I'm on VS2012 SSRS and trying to do a report prepared for each AgentID. The agent needs to see his bar highlighted and IDs for other agents should be hidden.
We agreed I can go with plan A putting or planB completely hiding IDs other than the selected one from horizontal label.
I've illustrated this in the picture with ID 22222.
I managed to highlight the bar with an expression on the fill property of the series. But I'm not sure how to modify the axis label individually. I think that the property for axis label refers to the label for every group. I can hide all of them, but can't manipulate them individually.
In the category group properties you can dynamically assign the axis label for the entry. This is on a value-by-value basis and only effects the labels, not the grouping. So if you have multiple labels that end up the same they won't end up grouped together.
So in your case the expression for the label would probably be something like
=IIF(Fields!AGENT_ID.Value=Parameters!AGENT_ID.Value,Fields!AGENT_ID.Value," ")
Do note: I've used a space(" ") and not just an empty string(""). Using an empty string SSRS will fill the empty categories with numbers. A space will blank out the category name.
I'm using Report Builder 3.0 and trying to figure out if i can break out one datafield with the few values I need for my bar chart. The data looks like this;
[[44278,47411],[{"name":"$41,000/year goal","y":41000}],["",""]]
I want bar 1 to be the 44,278 value, bar 2 to be the 47,411 value and the 41000 to be embedded as a goal. I've attached a screenshot of how we have it working with other grid and charting products, but this is going to be embedded in a much more in-depth SSRS report. Any sort of help would be great as i'm new to the whole SSRS reporting system.
You can do this with a custom StripLine:
Right-click the vertical chart axis and click Vertical Axis Properties.
The axis properties are displayed in the Properties window.
In the Appearance section of the Properties pane, for the StripLines property, click the Edit Collection (…) button to open the ChartStripLine Collection Editor.
Click Add to add a new strip line to the collection.
Click StripWidth to specify the width of the strip line. If your goals will fluctuate, you might want to make it relative to your Goal e.g. =Fields!YourGoalField.Value/100
Set the StripWidthType property to Number.
Set the InvervalOffset value to =Fields!YourGoalField.Value.
Set the IntervalOffsetType value to Number.
More on StripeLines: http://technet.microsoft.com/en-us/library/dd239316.aspx
EDIT To get the Goal Label outside the Chart Area as depicted, we have to do a sort of hack:
Delete the StripLine Title as there is no way to get that outside the Chart Area.
Right Click the Chart and select Add New Title.
On your new Chart Title's Properties Pane
Set the Docking Position to Right Center.
Set the TextOrientation to Horizontal.
Adjust the Font style and color to match your spec.
Set the Caption Expression to =Format(Fields!YourGoal.Value,"$0,000") & "/year goal"
Here is where the hack comes in. In order to get the Goal label to line up with the Goal Line, you need to add a certain number of carriage return/line feeds to your Caption Expression. To do this, append & vbcrlf to the Caption Expression a bunch of times and keep testing until it lines up. You might also want to adjust the DockingOffset property to move the Label closer to the Chart Area.
I believe that placing legend at the end of line series is user friendlier rather than placing legend in the table. I do not think SSRS is able to do that...
I could put the series names manually; however, I wish them to be dynamic.
Please advise if you know how to put legend next to the series line as in example below:
Click on the values for the chart data
In the properties toolbar go to Labels - Label -Label
Put the text you want for the label
Click the drop down on visible (it is several fields below label)
Click expression
Put in the logic to only show it if it is the rightmost part on the x axis. For example, if the X axis is a date field make it only show for the max date.
=IIF(Fields!CreatedOn.Value = MAX(Fields!CreatedOn.Value, "DataSet1"), TRUE, FALSE)
Here is what I end up with:
Is there a way to change the color of specific line items in an SSRS chart? For example, in the Data tab using an expression within a series group or the values area, or perhaps with a variable? I'm not terribly keen on the color palette that in my current chart, wanting certain areas to stick out a bit more and not sure how to get started.
Thanks.
We do this to ensure different departments are coloured consistently across all reports. In our database we have a colour field on our department table, then in the bar graphs we do the following:
Right click the chart body and choose Properties
Click the Data tab
In the Values section, click the Edit button
Click on the Appearance tab
Click the Series Style button
Click the Fill tab
In the Color text box, put the expression that you want the colour to be. Given that we have this in our department database already, we simply use:
=Fields!DeptColour.Value
and then our departments are coloured the same on every bar graph.
For line graphs, you have to do the same except this time you put the colour expression in the Color text box on the Border and Line tab on the Series Style dialogue (rather than in the Fill).