Code Monkey home page Code Monkey logo

Comments (10)

Fiorina161 avatar Fiorina161 commented on May 18, 2024

It would also be nice that the baseline could be set to an arbitrary angle for burndown charts and other similar needs where we want to check if the line follows and ideal or expected trend.

from peity.

benpickles avatar benpickles commented on May 18, 2024

Adding a baseline to the line graph: You're not the first to ask for this sort of thing and I've been giving it some thought. I'd like to tackle it by exposing the information that the chart has about how the input numbers map to output x and y positions which would allow you to query this data and further decorate the chart.

Donut chart: This would be a different type of chart.

from peity.

 avatar commented on May 18, 2024

Although they're named differently, the functionality is identical. The only difference being the donut may sustain more data, however in this case they would be too small to do so. Adding an optional hole would be an aesthetics gain.

Though a minor detail, it may produce a big difference.

from peity.

 avatar commented on May 18, 2024

I've put together a JSFiddle of the piechart with a donut hole. I've also managed to integrate it

Would be fantastic if you could add this as an option into peity.

from peity.

benpickles avatar benpickles commented on May 18, 2024

Those donuts look great :D

I want to add donuts but I'd like to do it by drawing each sector of the ring instead of using a mask as it will enable some further features.

from peity.

benpickles avatar benpickles commented on May 18, 2024

I've done a little work on exposing the data to allow extending a chart with arbitrary baselines and the like. Here's an example of adding a line:

http://jsfiddle.net/benpickles/5947ffrz/

Have a play and see what you think. As you can see it's a manual process so unlikely to be used (!) but it's actually made the internal code cleaner and easier to fathom.

from peity.

benpickles avatar benpickles commented on May 18, 2024

I have a branch with donuts on, it's built on the changes that allowed baselines and the like:

https://github.com/benpickles/peity/tree/donut

Here's an example:

http://jsfiddle.net/benpickles/n78jzv1p/

from peity.

benpickles avatar benpickles commented on May 18, 2024

Donut charts are now included in version 3 of Peity which also exposes the mapping functions between values and x/y coordinates on the <svg> allowing you to further decorate the charts.

from peity.

 avatar commented on May 18, 2024

Brilliant stuff. Perhaps make note about the baseline on the homepage, so others can see it's do able.

from peity.

benpickles avatar benpickles commented on May 18, 2024

Thanks, will do. I've opened a work-in-progress pull-request that builds on this work: #45

from peity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.