How can i change the width of the results horizontal graph? Basically the view of the survey list is the summary.aspx of the Survey List. End goal is to show the survey in a small box in the lower right section as a webpart in the main page, so current dilemma is that the graphs are too long...

Here's the example -

enter image description here

I tried changing the css ms.surveyhbarb but im not sure which element is controlling the width.

This is Sharepoint 2013.

1 Answer 1


There are two classes to control that

  • A class called ms-surveyHBar for the blue section.
  • A class called ms-surveyHBarB for the grayed section.

The two classes have only a height property, so you just need to add a new width property like this

    width: 50pt !important;

But I think this is will not match your requirement to show the survey in a small box in the lower right section as a web part in the main page! where the web part width will not change! as shown below

enter image description here

So in your case, you will need to create a custom web part to get survey graphical result and show it in a chart with your custom bars and width then add it in your page.

To can achieve that, check the code at, Getting survey graphical result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.