Sunday, March 25, 2012

Bars on Bar chart

Is there a way to set the width of each bar on a barchart? Currently the
bars run into the next bar on the graph. I want to be able to leave a blank
space between bars. Can this be done?
Thanks,
PhillThere is a way to control the width of columns and bars. The property is
called "PointWidth". However, the property is only supported on the report
server (and designer preview).
What you need to do is:
* open your RDL file in a text / xml-editor or in "code view" of designer
* search for the chart (<chart name="...">)
* add a PointWidth value between 0 and 100 (by default it is 55)
Example:
<Chart Name="Sales">
<PointWidth>30</PointWidth>
...
</Chart>
See also:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsrdl/htm/rsp_ref_rdl_elements_fp_87lg.asp
Note: PointWidth is a constant value, so if you have an unknown number of
categories at runtime you might want to use two identical charts (one with
regular PointWidth, the other with a small PointWidth) and based on a
condition (number of categories) always hide one chart.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"smogerp" <smogerp@.discussions.microsoft.com> wrote in message
news:F57A3443-3F65-425C-A4E5-5A7E2004F921@.microsoft.com...
> Is there a way to set the width of each bar on a barchart? Currently the
> bars run into the next bar on the graph. I want to be able to leave a
> blank
> space between bars. Can this be done?
> Thanks,
> Phillsql

No comments:

Post a Comment