Code Monkey home page Code Monkey logo

Comments (3)

Abhinandan-Kushwaha avatar Abhinandan-Kushwaha commented on June 16, 2024 1

@novamaster-git Thanks for requesting this feature. I will release it in the next version.

from react-native-gifted-charts.

Abhinandan-Kushwaha avatar Abhinandan-Kushwaha commented on June 16, 2024

Hi @novamaster-git
You can make 3 donut charts and use position: 'absolute to put them above one another.

Here's an example-

onst d1 = [
  {value: 4, color: '#E33716'},
  {value: 9, color: '#381C16'},
];
const d2 = [
  {value: 4.5, color: '#B0D44C'},
  {value: 9, color: '#303621'},
];
const d3 = [
  {value: 4, color: '#43D5FC'},
  {value: 9, color: '#16353C'},
];

return (
  <View style={{flex: 1, backgroundColor: 'black'}}>
    <PieChart data={d1} donut innerCircleColor="black" innerRadius={92} />
    <View style={{position: 'absolute', top: 38, left: 38}}>
      <PieChart
        data={d2}
        donut
        radius={82}
        innerCircleColor="black"
        innerRadius={62}
      />
    </View>
    <View style={{position: 'absolute', top: 68, left: 68}}>
      <PieChart
        data={d3}
        donut
        radius={52}
        innerCircleColor="black"
        innerRadius={32}
      />
    </View>
  </View>
);

The output is-

Screenshot 2024-03-01 at 7 23 13 PM

Note: Curved sections are not supported yet. I will add this feature soon.

from react-native-gifted-charts.

novamaster-git avatar novamaster-git commented on June 16, 2024

Thank you for replying, but I need it to be dynamic, meaning the number of progress bars will depend on the number of datasets.

from react-native-gifted-charts.

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.