0

I know this is bad practise on stack overflow to ask a question without any attempt at the code myself, but I am a javascript novice and wouldn't know where to start, but all I am looking for a is a super simple donut chart, that looks like this:

donut chart

Only showing 1 sector (a percentage of 100).

I have searched stack overflow and came across a question for a donut chart, but the solution given is really complex (multiple sectors and ability to change chart dynamically with buttons):

http://jsfiddle.net/philippkuehn/jDLux/

<div class="wrapper">
<div class="donutchart">
    <div class="graph"></div>
    <div class="graph-center"></div>
</div>
<div class="buttons">
    <a class="button button-active" href="#" data-id="0">1</a>
    <a class="button" href="#" data-id="1">2</a>
    <a class="button" href="#" data-id="2">3</a>
</div>

Sorry I cannot locate the question I found this answer on, but that fiddle is not my work to be clear.

Can any one give me a very simple solution to this question, either a fiddle or a tutorial (although all the ones I have found are for very complex donut charts or pie charts, I just need a very simple implementation).

Again sorry I have not attempted this code on my own but like I say I am such a novice with javascripting.

Thanks for any help

Jon

gion_13
  • 41,171
  • 10
  • 96
  • 108
Jon Kyte
  • 1,962
  • 3
  • 26
  • 40
  • 2
    You might rather want to have a look at existing libraries, such as gRaphael: http://g.raphaeljs.com/. – Felix Kling Feb 25 '13 at 12:44
  • Thanks Felix, this is almost exactly what I was looking for, just playing around with a fiddle of it and it's looking like it's going to do the trick. Thanks a lot for pointing me in the right direction :) – Jon Kyte Feb 25 '13 at 15:43

1 Answers1

0

Try with a pie chart in CSS and adjust things with Javascript. There are some cool here: http://speckyboy.com/2010/11/04/10-awesome-pure-css-graph-and-chart-techniques/

Nacho
  • 81
  • 3