Position Labels on Bar Chart

  • I have a simple bar chart within a cell in my SSRS report.  I can't for the life of me position the labels so that they don't get messed up.  (see image)
    There is a 'BarLabelStyle' property under 'CustomAttributes' as well as a 'Position' property under 'Label'.  Changing either property doesn't seem to make any difference.  Originally I had thought that perhaps creating an expression for the position property would help. i.e. =iif(Fields!Variance.Value<=0,"Right","Left")  I tried top, bottom, outside...nothing works.

    Ideally, it would be nice to see the label on the opposite side of the bar direction but I'd settle for a consistent legible label.

    Cheers,


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • From appearances, your "cell" isn't really wide enough to handle the chart's possible size.   It's clearly cutting off text or flowing it into the next line, and that's going to be messy or it's going to require a change to a font size for the label that's probably going to be too small to be legible.   You really HAVE to give SSRS the room to hold your chart.   It's kind of like starting a lego project with big blocks, and suddenly realizing you need much smaller legos to make it look good, but you only have big ones.   So you break the big ones into pieces to solve your problem and then complain that the blocks are too messy because of the broken edges.   SSRS can be like that somewhat at times...

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • sgmunson - Tuesday, August 7, 2018 12:21 PM

    From appearances, your "cell" isn't really wide enough to handle the chart's possible size.   It's clearly cutting off text or flowing it into the next line, and that's going to be messy or it's going to require a change to a font size for the label that's probably going to be too small to be legible.   You really HAVE to give SSRS the room to hold your chart.   It's kind of like starting a lego project with big blocks, and suddenly realizing you need much smaller legos to make it look good, but you only have big ones.   So you break the big ones into pieces to solve your problem and then complain that the blocks are too messy because of the broken edges.   SSRS can be like that somewhat at times...

    You're absolutely right regarding the size.  If I extend it at least things won't get cut off but of course, now it's not nice and compact like I wanted.  That being said I had hoped there was a way to move the label dynamically based on the value.  So if the value was negative put the label to the right or vice versa.  In theory, the label should have plenty of room.  I'm just not sure if there is a way to specify the right position that I'm looking for.

    It might just be better to add another column with the value next to the chart in this case...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • Y.B. - Tuesday, August 7, 2018 12:28 PM

    sgmunson - Tuesday, August 7, 2018 12:21 PM

    From appearances, your "cell" isn't really wide enough to handle the chart's possible size.   It's clearly cutting off text or flowing it into the next line, and that's going to be messy or it's going to require a change to a font size for the label that's probably going to be too small to be legible.   You really HAVE to give SSRS the room to hold your chart.   It's kind of like starting a lego project with big blocks, and suddenly realizing you need much smaller legos to make it look good, but you only have big ones.   So you break the big ones into pieces to solve your problem and then complain that the blocks are too messy because of the broken edges.   SSRS can be like that somewhat at times...

    You're absolutely right regarding the size.  If I extend it at least things won't get cut off but of course, now it's not nice and compact like I wanted.  That being said I had hoped there was a way to move the label dynamically based on the value.  So if the value was negative put the label to the right or vice versa.  In theory, the label should have plenty of room.  I'm just not sure if there is a way to specify the right position that I'm looking for.

    It might just be better to add another column with the value next to the chart in this case...

    One good thing is that if you at least temporarily expand the size of your cell, you can see, more or less, by experimentation, exactly what it will or won't do, given plenty of room, and then make a decision on methodology from there.   Usually best to start really large, and shrink stuff down as you make room... and as SSRS co-operates.... 😉

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

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

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