Giter Site home page Giter Site logo

Comments (5)

ramiy avatar ramiy commented on May 1, 2024

Hi @anied

As mentioned in CodePen, I want to simplify the framework. To be able to change chart type from 'bar' to pie without changing the <table> structure.

Currently the example in CodePen requires not only the --size variable but also the --start variable. I'm still looking for a way to do the same without the --start variable.

Do you know how we can move the accumulated amount of the "--size" variables to the next TR > TD ?

from charts.css.

n3storm avatar n3storm commented on May 1, 2024

I found out adding 0.01 to the calc renders an "acceptable" pie chart

      td {
        @include position-fullwidth();

        transform: rotate( calc( 1turn * var( --start, 0 ) ) );

        background: conic-gradient(
          var( --color, transparent ) 0 calc( 100% * ( var( --size, 0 ) + 0.01 ) ),
          transparent 0 100%
        );

from charts.css.

AshfordN avatar AshfordN commented on May 1, 2024

I think this would necessarily require CSS to keep track of the increasing start position, but there is currently no way of doing that.

from charts.css.

shaunroselt avatar shaunroselt commented on May 1, 2024

Seems like Pie Charts are available now: https://chartscss.org/charts/pie/

It's still missing from the Chart Builder though.

from charts.css.

ramiy avatar ramiy commented on May 1, 2024

@shaunroselt You are correct. Pie chart was added in version 1.0.0. You can read all about it in the Migrate to v1.0 guide and in the pie chart page. You should also check the supported features page.

It's a different type of chart, a circular chart. Most of the features are not yet supported.

from charts.css.

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.