Voting Chart for all SP questions?


#1

Hello,

I was following this example: Voting Chart but it seems you have to do the same dashboard configuration manually for each question on your sharepoint list?

The example shows data with three questions and based on the configuration the dashboard displays the three questions. Although when you follow that configuration it only displays it by single question.

Is there a way to just display all the questions and answers in one dashboard? like how Miscrosoft forms does or SharePoint Survey App:

MS Forms:

SharePoint Survey app:

I am really just looking for something like this:

image

Thanks!


#2

Dear @Riftsan,
Unfortunately, even though I understand what you mean, I am afraid there is no way to do, unless you provision charts programmatically.

Each Dashboard Designer chart is its own webpart, and each chart needs its own configuration.


#3

That’s okay. I was just making sure the example was not misleading as It did to me. The example should state that the graph being displayed is actually three web-parts/graphs and not just one. Or something like “repeat these instructions per question in your list”. This may work for a three question survey or poll that you are working on but when you deal with 10+ questions the work to set up becomes daunting. Do you happen to have an example of provisioning charts? I looked around and didn’t see any articles or people talking about that.


#4

Dear Riftsan,
Sorry for the delay, we’ve researched the potential options for publishing charts, and they depend on which version you use - is it SharePoint Online or SharePoint On-Premises?


#5

Hello,

I use both versions if you happen to have the two possibilities I would like to know. Thank you.


#6

Dear Riftsan,
We have a working script for SharePoint On-Premises, which you can use to provision charts. I’ll attach it to this message. Here: publishchart.txt (2.1 KB)

Just follow these steps:

  1. Export chart’s configuration from your site:

image

  1. Save it in your file system.

  2. If a data source list on the target site has different server-relative URL, open the configuration file and replace webUrl and listUrl values with {webUrl} and {listUrl}. Also can replace other varaibles. Like this:

{"dataSource":{"webUrl":"{webUrl}","listUrl":"{listUrl}","viewNa...

  1. Rename the attached .txt file to .ps1

  2. Set variables to corresponding values: $targetWebUrl, $pagesLibrary, etc

Now, this script will only work for On-Premises servers, if you need a version for SP Online, you can modify it to work with Office365, or you can contact us at [email protected] and we can do it for you, though this would require some extra support time.

Hope this helps!