0

I'm looking for an option to display data from a list I have in SharePoint online (hosted as part of office 365) but my options seem very limited

does anyone know a for sure option. I do not mind paying for the product.

Thanks

3
  • Display it how? In charts or graphs? Nov 17, 2014 at 20:34
  • Pie charts,Bar charts, Line charts.. I don't think well need anything too advanced to start off with but basicly what is avaiable in excel at somepoint someone will ask for it
    – Crash893
    Nov 18, 2014 at 15:18
  • 1
    Hi Crash893! Colbs posted the working answer.
    – Gennady G
    Mar 24, 2017 at 17:14

1 Answer 1

1

Chart.js is a free library and it pretty awesome to work with. Here is a quick little sample I used to create a pie graph / KPI. All you have to do is set the 'salesPercent'

http://www.chartjs.org/docs/

<script src="Chart.js"></script>

<div id="foo">
   <canvas height='160' width='160' id='salesCanvas' ></canvas>
</div> 

<script>
var doughChart, ctx, data;
var salesPercent = $('#SalesPercent').text().replace("%", "");
//***Sales***
ctx = document.getElementById('salesCanvas').getContext('2d');
data = [
    {
        value: 100 - parseInt(salesPercent),
        color: "#EF7D31",
        highlight: "#EF7D31",
        label: "Goal"
    },
    {
        value: parseInt(salesPercent),
        color: "#005D84",
        highlight: "#005D84",
        label: "Actual"

    }
]

//Create new Doughnut chart for Sales
doughChart = new Chart(ctx).Doughnut(data, {
    animateScale: true,
    animateRotate: true
});

</script>
5
  • How would one pull data from a list with this?
    – Crash893
    Nov 18, 2014 at 16:17
  • depends on the context of the list and the type of code you want to use. I think that warrants another question Nov 18, 2014 at 16:29
  • It really shouldnt be that hard to say point at list sales and graph a pie chart of district by sales $. or even a xy plot why is this not just built into sharepoitn its built into excel online
    – Crash893
    Nov 21, 2014 at 16:08
  • You're right! Maybe a better option for you is Excel Services, although I haven't used it in the Online version Nov 21, 2014 at 16:19
  • As far as I understand - for new version this code is not actual, but this library works. Colbs, Thank You Much!
    – Gennady G
    Mar 24, 2017 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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